From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Should we add scm_to_pointer, or just use SCM_POINTER_VALUE? Date: Wed, 01 Feb 2012 01:20:30 -0500 Message-ID: <87d39zdqhd.fsf@netris.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1328077307 25180 80.91.229.3 (1 Feb 2012 06:21:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Feb 2012 06:21:47 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Feb 01 07:21:46 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RsTZg-0008Nx-1S for guile-devel@m.gmane.org; Wed, 01 Feb 2012 07:21:44 +0100 Original-Received: from localhost ([::1]:34922 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsTZf-00057h-76 for guile-devel@m.gmane.org; Wed, 01 Feb 2012 01:21:43 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:46410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsTZc-00057R-5A for guile-devel@gnu.org; Wed, 01 Feb 2012 01:21:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RsTZW-0006PY-Nv for guile-devel@gnu.org; Wed, 01 Feb 2012 01:21:40 -0500 Original-Received: from world.peace.net ([96.39.62.75]:57062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsTZW-0006PS-KB for guile-devel@gnu.org; Wed, 01 Feb 2012 01:21:34 -0500 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1RsTZR-0005wz-Cq; Wed, 01 Feb 2012 01:21:29 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 96.39.62.75 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13768 Archived-At: 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