From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.user Subject: Re: scm interface public/private functions Date: Mon, 28 Apr 2003 11:11:13 -0500 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <874r4iob4u.fsf@raven.i.defaultvalue.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1051547889 25679 80.91.224.249 (28 Apr 2003 16:38:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 28 Apr 2003 16:38:09 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Apr 28 18:38:06 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19ABdV-0006du-00 for ; Mon, 28 Apr 2003 18:37:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19ABNH-0005x4-01 for guile-user@m.gmane.org; Mon, 28 Apr 2003 12:21:03 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19ABHa-00034S-00 for guile-user@gnu.org; Mon, 28 Apr 2003 12:15:10 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19ABH4-0002mP-00 for guile-user@gnu.org; Mon, 28 Apr 2003 12:14:39 -0400 Original-Received: from dsl093-098-016.wdc1.dsl.speakeasy.net ([66.93.98.16] helo=defaultvalue.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19ABDm-0001Zb-00 for guile-user@gnu.org; Mon, 28 Apr 2003 12:11:14 -0400 Original-Received: from raven.i.defaultvalue.org (raven.i.defaultvalue.org [192.168.1.7]) by defaultvalue.org (Postfix) with ESMTP id A49D040AC; Mon, 28 Apr 2003 11:11:13 -0500 (CDT) Original-Received: by raven.i.defaultvalue.org (Postfix, from userid 1000) id 8A4042150F7; Mon, 28 Apr 2003 11:11:13 -0500 (CDT) Original-To: Thamer Al-Harbash In-Reply-To: (Thamer Al-Harbash's message of "Wed, 23 Apr 2003 14:12:00 -0400 (EDT)") User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3 (i386-pc-linux-gnu) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: General Guile related discussions List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:1852 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:1852 Thamer Al-Harbash writes: > For example, should I be using scm_str2symbol() as opposed to > calling scm_mem2symbol()? Is there any convention in the code that > would point out what's intentionally a public interface and what is > private? The convention for all new code is that anything prefixed with SCM_I_ or scm_i_ should be considered internal. Use it at your own peril (i.e. at the risk of future incompatibility). This convention is now fairly widely respected, though I'm certain there are still exceptions. With respect to scm_*2symbol, I believe those are both public functions, so you may use either. str2symbol presumes a null terminated C string, and mem2symbol does not. Not that you should have to look at the source, but if you do, you'll see: SCM scm_str2symbol (const char *str) { return scm_mem2symbol (str, strlen (str)); } -- Rob Browning rlb @defaultvalue.org, @linuxdevel.com, and @debian.org Previously @cs.utexas.edu GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4 _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user