guile-devel
[Top][All Lists]
Advanced

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

Re: proposal: scm_string2str() and scm_symbol2str()


From: Dirk Herrmann
Subject: Re: proposal: scm_string2str() and scm_symbol2str()
Date: Sun, 25 Nov 2001 23:54:10 +0100 (MET)

On Thu, 22 Nov 2001, stefan wrote:

> > Probably there are other ways to provide this functionality in a more
> > elegant form:  Splitting guilelib on sick systems into a DLL and a static 
> > library, where the static library holds the functions scm_string2str and
> > friends.  Binding the static lib with the user code should make sure that 
> > the same versions of malloc and free are used in both.
[...]
> I suggest to omit all this stuff and implement scm_c_string2str() and the
> remaining SCM->C converters which need to allocate memory as before in the
> gh_*() interface, but always supply the extra argument (as in the gh_*()
> interface) which will receive the returned memory if it is non-NULL.
> 
> Then we need to write a hint for users on "sick" (M$-Windows) systems when
> they use libguile to supply this argument necessarily. It must not be
> NULL if you are not sure the used libguile.dll does not use a malloc()
> matching the client program's free().
> 
> I object to split the code into static/shared parts.

Well, I don't know enough about windows to claim that the static/shared
solution is a big win.  But, I assume that many guile-using applications
will write autoconf macros that configures the windows code to use some
wrapper around scm_c_string2str to do the memory allocation.  The question
is, whether we can make life easier for these folks?

Best regards
Dirk Herrmann




reply via email to

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