This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Dunno if I'm exploring an old bug that's been fixed or an intended feature. The story goes a bit like this. gh_define( "blah", SCM_EOL ) works fine because "blah" is completely constant. However, using something which may not be constant like: char buf[ 100 ]; strcpy( buf, "blah" ); gh_define( buf, SCM_EOL ); strcpy( buf, " " ); Does NOT work properly. It seems like gh_define() is not copying the string that it is given but is using the memory directly to build a symbol out of, possibly it is more complicated than this... I haven't fully traced this out yet and I'll try to post a more complete example later. SHOULD gh_define() require a totally constant string or should it make a copy of the string that it is given? - Tel