guile-devel
[Top][All Lists]
Advanced

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

Re: [BDW-GC] "Inlined" storage; `scm_take_' functions


From: Mike Gran
Subject: Re: [BDW-GC] "Inlined" storage; `scm_take_' functions
Date: Mon, 31 Aug 2009 17:48:42 -0700

On Tue, 2009-09-01 at 02:14 +0200, Ludovic Courtès wrote:
> Hello!
> 
> Stringbufs and bytevectors are now always "inlined" in the BDW-GC
> branch [0, 1], which means that there's no cell->buffer indirection,
> which greatly simplifies code (it also takes less room and may slightly
> improve performance).

Neat!

> 
> The `scm_take_' functions for strings/symbols/bytevectors are now
> essentially aliases to the corresponding `scm_from_' because we cannot
> advantageously reuse the provided storage.
> 
> Should these functions be deprecated or discouraged?
> 

codesearch.google.com says that scm_take_ isn't often used by other
projects, but, it is used by lilypond.  I think that's reason enough to
leave it in.  I'd vote for keeping them and adjusting the docs to say
something like

     Like `scm_from_locale_string' and `scm_from_locale_stringn',
     respectively, but also immediately frees STR after creating
     the Guile string.

Or something like that.

-Mike







reply via email to

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