From: Mark H Weaver <mhw@netris.org>
To: guile-devel@gnu.org
Subject: Should we add scm_to_pointer, or just use SCM_POINTER_VALUE?
Date: Wed, 01 Feb 2012 01:20:30 -0500 [thread overview]
Message-ID: <87d39zdqhd.fsf@netris.org> (raw)
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
next reply other threads:[~2012-02-01 6:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 6:20 Mark H Weaver [this message]
2012-02-01 10:59 ` Should we add scm_to_pointer, or just use SCM_POINTER_VALUE? 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d39zdqhd.fsf@netris.org \
--to=mhw@netris.org \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).