pike.git / src / post_modules / GTK2 / source / support.c

version» Context lines:

pike.git/src/post_modules/GTK2/source/support.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: support.c,v 1.18 2008/01/23 04:27:46 per Exp $ + || $Id: support.c,v 1.19 2008/01/29 12:17:26 per Exp $   */      #include <version.h>   #include <bignum.h>   #include <stdarg.h>      #ifndef INIT_VARIABLES   extern struct program *image_color_program;   extern struct program *image_program;   #endif
pike.git/src/post_modules/GTK2/source/support.c:263:    }    if (pgtk2_is_object_program(def))    if ((o=g_object_get_data(((void *)obj),"pike_object"))) {    ref_push_object(o);    return;    }    o=low_clone(def);    call_c_initializers(o);    ((struct object_wrapper *)o->storage)->obj=obj;    pgtk2__init_object(o); -  ref_push_object(o); +  +  /* Extra ref already added in pgtk2__init_object */ +  push_object(o);    return;   }         void push_pgdk2object(void *obj, struct program *def) {    struct object *o;    if (!obj) {    push_int(0);    return;    }    o=low_clone(def);    call_c_initializers(o);    ((struct object_wrapper *)o->storage)->obj=obj; -  ref_push_object(o); +  +  /* TODO: Check all usage of this function to see that it does not +  * assume 2 refs on the object instead of 1. +  */ +  push_object(o);    return;   }      GObject *get_pg2object(struct object *from, struct program *type) {    struct object_wrapper * o;    if (!from)    return NULL;    o=(struct object_wrapper *)get_storage(from,type);    if (!o)    return 0;