denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] scm_dynwind_xxx disabled


From: Jeremiah Benham
Subject: Re: [Denemo-devel] scm_dynwind_xxx disabled
Date: Tue, 3 May 2011 10:02:37 -0500

I'll try to fix these issues later today.

Thanks,
Jeremiah

On May 3, 2011, at 9:22 AM, Richard Shann <address@hidden> wrote:

a more critical example of the same thing (view.c:375):

 SCM2LSTRING(valuename, value);\
 extern gboolean what##_directive_put_##field (gchar *tagname, gchar
*valuename);\
 scm_dynwind_end();\
 return SCM_BOOL(what##_directive_put_##field (tagname, valuename));\
}

here valuename and tagname will already have been freed.

Richard


On Tue, 2011-05-03 at 14:39 +0100, Richard Shann wrote:
Jeremiah,

I have had a read of the guile docs, I cannot claim to have a good
understanding, but AFAICS the sort of problem we have is shown by this
example:

This is a bit of the code from view.c

if(name&&thepage&&post&&oth){
  scm_dynwind_end();
  return scm_from_locale_string(post_denemodotorg(name, thepage, oth,
post));
}

The scm_dynwind_end() call is made before  the call to
post_denemodotorg() which uses the values name, thepage etc as
parameters. So I guess you need

gchar *ret = post_denemodotorg(name, thepage, oth, post);
scm_dynwind_end();
return scm_take_locale_string(ret);


the scm_take_locale_string() is the one to use here, as otherwise ret
will not be freed. (Hmm, I am assuming ret *should* be freed, perhaps
not, in which case the _from_ version is needed.)
HTH

Richard



On Tue, 2011-05-03 at 09:48 +0100, Richard Shann wrote:
Jeremiah, I put some #defines at the top of view.c to disable the
dynwind stuff as the string handling seems to be very broken with it. I
get no custom buttons, and trying to set the score title for example
gives strings pointing to the wrong bits of memory.
Do you see this too? (I checked with Nils clean build which shows the
problem).
Richard



_______________________________________________
Denemo-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/denemo-devel


_______________________________________________
Denemo-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/denemo-devel


_______________________________________________
Denemo-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/denemo-devel



reply via email to

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