unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Should we add scm_to_pointer, or just use SCM_POINTER_VALUE?
@ 2012-02-01  6:20 Mark H Weaver
  2012-02-01 10:59 ` Andy Wingo
  2012-02-02 21:07 ` Ludovic Courtès
  0 siblings, 2 replies; 5+ messages in thread
From: Mark H Weaver @ 2012-02-01  6:20 UTC (permalink / raw)
  To: guile-devel

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-02-02 22:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-01  6:20 Should we add scm_to_pointer, or just use SCM_POINTER_VALUE? Mark H Weaver
2012-02-01 10:59 ` Andy Wingo
2012-02-02 21:07 ` Ludovic Courtès
2012-02-02 21:49   ` Andy Wingo
2012-02-02 22:10   ` Mark H Weaver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).