From 892f3592cc81dccb8ffe5be7cfce16a4b70a340b Mon Sep 17 00:00:00 2001 From: Brian Caine Date: Fri, 27 Jan 2017 12:25:14 -0500 Subject: [PATCH] Redid the source and the text to check for SCM_MAJOR_VERSION >= 2 --- Examples/test-suite/guile/argout_runme.scm | 2 +- Lib/guile/guile_scm_run.swg | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Examples/test-suite/guile/argout_runme.scm b/Examples/test-suite/guile/argout_runme.scm index 72f236dc5..16f2aeb1c 100644 --- a/Examples/test-suite/guile/argout_runme.scm +++ b/Examples/test-suite/guile/argout_runme.scm @@ -7,7 +7,7 @@ ;; if we're running guile 1.8, then bytevector->pointer won't exist and this ;; test is useless -(if (module-variable (resolve-module '(system foreign)) 'bytevector->pointer) +(if (>= (string->number (major-version)) 2) (begin (use-modules (srfi srfi-4) (system foreign)) diff --git a/Lib/guile/guile_scm_run.swg b/Lib/guile/guile_scm_run.swg index dfe875f8e..1cc08b024 100644 --- a/Lib/guile/guile_scm_run.swg +++ b/Lib/guile/guile_scm_run.swg @@ -176,11 +176,11 @@ SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags) if (SCM_NULLP(smob)) { *result = NULL; return SWIG_OK; -#if defined(SCM_POINTER_P) && defined(SCM_POINTER_VALUE) +#if SCM_MAJOR_VERSION >= 2 } else if (SCM_POINTER_P(s)) { *result = SCM_POINTER_VALUE(s); return SWIG_OK; -#endif /* if defined(SCM_POINTER_P) && defined(SCM_POINTER_VALUE) */ +#endif /* if SCM_MAJOR_VERSION >= 2 */ } else if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) { /* we do not accept smobs representing destroyed pointers */ from = (swig_type_info *) SCM_CELL_WORD_2(smob);