Disabled pointer conversion when the relevant macros are unavailable (for Guile 1.8)

This commit is contained in:
Brian Caine 2017-01-27 05:08:35 -05:00 committed by William S Fulton
commit a4ec4df5c9

View file

@ -176,9 +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)
} else if (SCM_POINTER_P(s)) {
*result = SCM_POINTER_VALUE(s);
return SWIG_OK;
#endif /* if defined(SCM_POINTER_P) && defined(SCM_POINTER_VALUE) */
} 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);