Heya! Andy Wingo <wi...@pobox.com> skribis:
> scm->pointer takes a Scheme value and returns a Scheme value which is a > foreign pointer to the Scheme value. It has been in Guile since 2.0 I > think. v2.0.0-105-g148c331, apparently. > scm_to_pointer takes a Scheme value which is a foreign pointer, and > unpacks that foregin pointer as a void*. > > scm_to_pointer is a new interface in master that is not in 2.0.5, Yes. ‘scm_from_pointer’ is pre-2.0.0. > and that is inconsistent with scm->pointer / scm_scm_to_pointer. Yes, but it’s consistent with the other scm_{to,from} functions. > This should be fixed. Otherwise it's impossible to document in any > sane fashion. > > Suggestion: change scm_to_pointer to SCM_POINTER_VALUE. WDYT? I’m happy with this change. Mark? (Back then, I was skeptical about the usefulness of the C pointer API. I have since used ‘SCM_POINTER_VALUE’ and ‘scm_from_pointer’ in Guile-GCC, which uses a mixed dynamic/static FFI, and for good reasons.) Thanks, Ludo’.