guile-devel
[Top][All Lists]
Advanced

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

Re: scm_* equivalent of gh_scm2newstr


From: Martin Baulig
Subject: Re: scm_* equivalent of gh_scm2newstr
Date: 07 Sep 2001 23:13:11 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Dirk Herrmann <address@hidden> writes:

> On 2 Sep 2001, Martin Baulig wrote:
> 
> > So we probably need some scm_str2string() and scm_str2symbol() - and choose
> > a better name for them [...]
> 
> I agree.  However, what speaks against the names scm_str2string and
> scm_str2symbol?  I like these names since in the line of scm_mem2symbol
> they go along nicely with the C library names strcpy and memcpy.

Ok, so that we now agreed on their name, any chance to get them added ?

====
SCM 
scm_str2string (const char *src)
{
  if (!src) return SCM_BOOL_F;
  return scm_mem2string (src, strlen (src));
}

SCM 
scm_str2symbol (const char *src)
{
  if (!src) return SCM_BOOL_F;
  return scm_mem2symbol (src, strlen (src));
}
====

-- 
Martin Baulig
address@hidden (private)
address@hidden (work)



reply via email to

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