diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-05-27 14:02:21 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-06-01 22:26:55 +0200 |
commit | 16954d5d9d7d44356b46864d41b06dbefd867521 (patch) | |
tree | e443eb7515fc8e53781be28f9e5076e7356401e4 /gdb/guile | |
parent | f69123aac56b383081bdb8eb3909087809927557 (diff) | |
download | gdb-16954d5d9d7d44356b46864d41b06dbefd867521.zip gdb-16954d5d9d7d44356b46864d41b06dbefd867521.tar.gz gdb-16954d5d9d7d44356b46864d41b06dbefd867521.tar.bz2 |
guile: Allow compilation with Guile <= 2.0.5.
gdb/
2014-06-01 Ludovic Courtès <ludo@gnu.org>
* configure.ac: When Guile is available, check for the
availability of 'scm_new_smob'.
* configure, config.h.in: Regenerate.
* guile/guile-internal.h (scm_new_smob) [!HAVE_SCM_NEW_SMOB]: New
function.
Diffstat (limited to 'gdb/guile')
-rw-r--r-- | gdb/guile/guile-internal.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/guile/guile-internal.h b/gdb/guile/guile-internal.h index e2e1c01..ff891b5 100644 --- a/gdb/guile/guile-internal.h +++ b/gdb/guile/guile-internal.h @@ -97,6 +97,18 @@ typedef struct #define gdbscm_is_false(scm) scm_is_eq ((scm), SCM_BOOL_F) #define gdbscm_is_true(scm) (!gdbscm_is_false (scm)) +#ifndef HAVE_SCM_NEW_SMOB + +/* Guile <= 2.0.5 did not provide this function, so provide it here. */ + +static inline SCM +scm_new_smob (scm_t_bits tc, scm_t_bits data) +{ + SCM_RETURN_NEWSMOB (tc, data); +} + +#endif + /* Function name that is passed around in case an error needs to be reported. __func is in C99, but we provide a wrapper "just in case", and because FUNC_NAME is the canonical value used in guile sources. |