swig/Examples/test-suite/schemerunme/null_pointer.scm
William S Fulton 2cfd77b1c0 Racket - NULL pointer handling
SWIG now converts a C/C++ NULL pointer into a null value by calling
scheme_make_null(), so that scheme's null? is true for a NULL C/C++
pointer value.

Consistency with Guile and needed for a pending commit for handling
NULL and std::unique_ptr.
2022-08-31 19:40:13 +01:00

8 lines
161 B
Scheme

(define null '())
(unless (funk null)
(error "funk(null) does not return true"))
(unless (null? (getnull))
(error "NULL pointer should be null"))
(exit 0)