guile-devel
[Top][All Lists]
Advanced

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

Re: Internal visibility


From: Han-Wen Nienhuys
Subject: Re: Internal visibility
Date: Sun, 01 Jun 2008 17:24:23 -0300
User-agent: Thunderbird 2.0.0.14 (X11/20080501)

Ludovic Courtès escreveu:
> Hi,
> 
> address@hidden (Ludovic Courtès) writes:
> 
>> I'd like to push the patch within the next few days if nobody complains,
>> alright?
> 
> Done!
> 
> Opinions about making `scm_i_{string,symbol}_chars' internal as well?

Can someone explain to me why accessing the underlying (const char*)
of a string should be internal? If you are writing C++, doing

  const char* ptr = scm_i_string_chars(scmval);
  string x(ptr);

is the most straightforward and efficient way to create a string.
Using the API incurs an additional malloc, memcpy and free.

-- 
 Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen





reply via email to

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