Fix overloading for non-pointers and NULL - Guile

This commit is contained in:
William S Fulton 2018-12-30 09:26:33 +00:00
commit eb151e43be
4 changed files with 63 additions and 3 deletions

View file

@ -186,7 +186,7 @@ SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
if (SCM_NULLP(smob)) {
*result = NULL;
return SWIG_OK;
return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
#if SCM_MAJOR_VERSION >= 2
} else if (SCM_POINTER_P(s)) {
*result = SCM_POINTER_VALUE(s);