From 20077fa27f216a40ffd832adbe14a864feebf3ac Mon Sep 17 00:00:00 2001 From: Cedric Gustin Date: Wed, 23 Feb 2005 08:00:22 +0000 Subject: Move the install_template call for pygobject-2.0.pc.in to the right place 2005-02-23 Cedric Gustin * setup.py: Move the install_template call for pygobject-2.0.pc.in to the right place in the script. Also define PLATFORM_WIN32 on win32. Fixes bug #150616. * codegen/codegen.py: Do not write the 'pygtk class init' function for objects whose type is explicitly ignored (like GtkPlug and GtkSocket on win32). Otherwise, it generates glib-warnings related to calls to g_object_set_qdata with a NULL 'node'. * gobject/pygtype.c: Do not use g_string_append_printf with a NULL argument, as it crashes on win32. Fixes bug #166546. * gtk/gtk.override: Add GtkSocket__proxy_do_plug_added, GtkSocket__proxy_do_plug_removed and GtkPlug__proxy_do_embedded to the ignore-win32 list. --- gobject/pygtype.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gobject') diff --git a/gobject/pygtype.c b/gobject/pygtype.c index bcc669f..26ad5e9 100644 --- a/gobject/pygtype.c +++ b/gobject/pygtype.c @@ -1087,6 +1087,7 @@ add_property_docs(GType gtype, GString *string) GParamSpec **props; guint n_props = 0, i; gboolean has_prop = FALSE; + gchar *blurb=NULL; class = g_type_class_ref(gtype); props = g_object_class_list_properties(class, &n_props); @@ -1105,8 +1106,12 @@ add_property_docs(GType gtype, GString *string) g_param_spec_get_name(props[i]), g_type_name(props[i]->value_type), g_param_spec_get_nick(props[i])); - g_string_append_printf(string, " %s\n", - g_param_spec_get_blurb(props[i])); + + /* g_string_append_printf crashes on win32 if the third + argument is NULL. */ + blurb=g_param_spec_get_blurb(props[i]); + if (blurb) + g_string_append_printf(string, " %s\n",blurb); } g_free(props); if (has_prop) -- cgit