bug in glib/gobject/glib-genmarshal.c
- From: Johannes Stezenbach <js convergence de>
- To: gtk-devel-list gnome org
- Subject: bug in glib/gobject/glib-genmarshal.c
- Date: Mon, 12 Mar 2001 18:23:02 +0100
The marshaller code generated by glib-genmarshal
for return type OBJECT does not check for NULL return
values, which leads to warnings when unref'ing.
The attached patch seems to cure this problem.
Johannes
Index: glib-genmarshal.c
===================================================================
RCS file: /cvs/gnome/glib/gobject/glib-genmarshal.c,v
retrieving revision 1.7
diff -c -r1.7 glib-genmarshal.c
*** glib-genmarshal.c 2001/03/09 14:02:30 1.7
--- glib-genmarshal.c 2001/03/12 17:18:55
***************
*** 398,404 ****
fprintf (fout, "\n");
fprintf (fout, " %s (return_value, v_return);\n", sig->rarg->setter);
if (sig->rarg->release)
! fprintf (fout, " %s (v_return);\n", sig->rarg->release);
}
/* cfile marshal footer */
--- 398,407 ----
fprintf (fout, "\n");
fprintf (fout, " %s (return_value, v_return);\n", sig->rarg->setter);
if (sig->rarg->release)
! {
! fprintf (fout, " if (v_return)\n");
! fprintf (fout, " %s (v_return);\n", sig->rarg->release);
! }
}
/* cfile marshal footer */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]