[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scm interface public/private functions

From: Rob Browning
Subject: Re: scm interface public/private functions
Date: Mon, 28 Apr 2003 11:11:13 -0500
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3 (i386-pc-linux-gnu)

Thamer Al-Harbash <address@hidden> 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

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_str2symbol (const char *str)
    return scm_mem2symbol (str, strlen (str));

Rob Browning
rlb,, and
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4

reply via email to

[Prev in Thread] Current Thread [Next in Thread]