Skip to content

Commit 892f359

Browse files
briancainewsfulton
authored andcommitted
Redid the source and the text to check for SCM_MAJOR_VERSION >= 2
1 parent 567f944 commit 892f359

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Examples/test-suite/guile/argout_runme.scm

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
;; if we're running guile 1.8, then bytevector->pointer won't exist and this
99
;; test is useless
10-
(if (module-variable (resolve-module '(system foreign)) 'bytevector->pointer)
10+
(if (>= (string->number (major-version)) 2)
1111
(begin
1212
(use-modules (srfi srfi-4) (system foreign))
1313

Lib/guile/guile_scm_run.swg

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
176176
if (SCM_NULLP(smob)) {
177177
*result = NULL;
178178
return SWIG_OK;
179-
#if defined(SCM_POINTER_P) && defined(SCM_POINTER_VALUE)
179+
#if SCM_MAJOR_VERSION >= 2
180180
} else if (SCM_POINTER_P(s)) {
181181
*result = SCM_POINTER_VALUE(s);
182182
return SWIG_OK;
183-
#endif /* if defined(SCM_POINTER_P) && defined(SCM_POINTER_VALUE) */
183+
#endif /* if SCM_MAJOR_VERSION >= 2 */
184184
} else if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) {
185185
/* we do not accept smobs representing destroyed pointers */
186186
from = (swig_type_info *) SCM_CELL_WORD_2(smob);

0 commit comments

Comments
 (0)