dev-serveez
[Top][All Lists]
Advanced

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

Re: [dev-serveez] How about a release?


From: Andreas Rottmann
Subject: Re: [dev-serveez] How about a release?
Date: Tue, 18 Mar 2003 14:57:20 +0100
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2

stefan <address@hidden> writes:

> On Mon, 17 Mar 2003, Andreas Rottmann wrote:
>
>> There is a small bug, which is fixed by the following one-line patch:
>>
>> Index: src/guile-api.h
>> ===================================================================
>> RCS file: /cvsroot/serveez/serveez/src/guile-api.h,v
>> retrieving revision 1.12
>> diff -u -p -r1.12 guile-api.h
>> --- src/guile-api.h  5 Feb 2003 17:04:25 -0000       1.12
>> +++ src/guile-api.h  17 Mar 2003 14:23:11 -0000
>> @@ -145,7 +145,8 @@ typedef scm_catch_handler_t scm_t_catch_
>>  #define guile_lookup(var, name) do {                                        
>> \
>>      (var) = scm_sym2var (scm_str2symbol (name),                             
>> \
>>                       scm_current_module_lookup_closure (), SCM_BOOL_F); \
>> -    if (SCM_FALSEP (var)) (var) = SCM_UNDEFINED; } while (0)
>> +    if (SCM_FALSEP (var)) (var) = SCM_UNDEFINED;                            
>> \
>> +    else (var) = scm_variable_ref(var); } while (0)
>>  #endif
>>  #ifndef SCM_VERSION_15X
>>  #define scm_gc_protect_object(obj) scm_protect_object (obj)
>
> Well, this is taken right from the implementation of scm_module_lookup()
> right?  
>
It might have been originally, but I have a bunch of C++ code messing
with guile lying around here and took it from there (part of my Yehia
project - http://ucxx.sourceforge.net).

> I applied it locally. Did the guile servers failed while looking
> up symbolically referenced procedures ("No such procedure: xxx")?
>
Exactly.

>> Having this fixed, the guile servers seem to work with guile 1.6 and
>> 1.7, altough there are deprecation warning with 1.7:
>>
>> scm_must_free is deprecated.  Use scm_gc_malloc and scm_gc_free instead.
>
> Hm.  I waited to appliy these changes until the guile developers finished
> their gc rewrite and found a API which does not change to often anymore...
> Do you know about the state of development?
>
> Basically we must differentiate 2 cases where the scm_must_*() functions
> are used in Serveez:
>
>  1. free'ing pointers returned by e.g. gh_scm2newstr() -> the macro
>     scm_c_free()
>  2. allocating/freeing the smob data structures and pointers inside these
>     structures
>
> Is there a document telling what we need to use (the correct way) in the
> new guile? I've seen loads of these malloc()/free() functions... quite
> confusing for a non-guile developer (at least at the first glimpse).
>
There is some information about it in the guile 1.7 reference manual
(info files). Just search for `scm_gc_malloc'.

Regards, Andy
-- 
Andreas Rottmann         | address@hidden      | address@hidden | address@hidden
http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Packages should build-depend on what they should build-depend.




reply via email to

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