[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Should we add scm_to_pointer, or just use SCM_POINTER_VALUE?
From: |
Mark H Weaver |
Subject: |
Should we add scm_to_pointer, or just use SCM_POINTER_VALUE? |
Date: |
Wed, 01 Feb 2012 01:20:30 -0500 |
I was chatting with rcfox on #guile, who needed to extract the C pointer
from a SCM pointer object, from C code. In this case, it was a C
callback created using 'procedure->pointer'.
I tried to discourage him from using SCM_POINTER_VALUE, because it's
undocumented and will embed internal details of our representation into
his binary, but he was undeterred :)
Should we add 'scm_to_pointer'? For most other accessors, the trend
seems to be to discourage use of C macros and move people over to C
functions instead. With that in mind, it seems inconsistent to have
people using SCM_POINTER_VALUE for lack of a C function to do this job.
What do you think?
Mark
- Should we add scm_to_pointer, or just use SCM_POINTER_VALUE?,
Mark H Weaver <=