Index: codegen.py
===================================================================
RCS file: /cvs/gnome/gnome-python/pygtk/codegen/codegen.py,v
retrieving revision 1.61
diff -u -p -r1.61 codegen.py
--- codegen.py	24 Jul 2003 15:06:07 -0000	1.61
+++ codegen.py	4 Dec 2003 19:21:40 -0000
@@ -231,6 +231,9 @@ class Wrapper:
             handler = argtypes.matcher.get(function_obj.ret)
             handler.write_return(function_obj.ret,
                                  function_obj.caller_owns_return, info)
+	else:
+	    if not function_obj.caller_owns_return:
+		substdict['aftercreate'] = "    g_object_ref(self->obj);\n"
 
         if function_obj.deprecated != None:
             deprecated = self.deprecated_tmpl % {
