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

version» Context lines:

pike.git/src/post_modules/GTK2/source/support.c:302:    o=get_storage(from,type);    if (!o)    return 0;    return o->obj;   }      void *get_pgdk2object(struct object *from, struct program *type) {    void *f;    if (!from)    return NULL; -  if(type) +  if (type)    f=get_storage( from, type );    else    f=from->storage; /* Add a warning? */    if (!f)    return 0;    return (void *)((struct object_wrapper *)f)->obj;   }      void pgtk2_destruct(struct object *o) { -  struct object_wrapper *ow= -  get_storage(o,pg2_object_program); +  struct object_wrapper *ow=get_storage(o,pg2_object_program);    if (ow) /* This should always be true. But let's add a check anyway. */    ow->obj=NULL;    if (o->refs>1)    destruct(o);    free_object(o); /* ref added in __init_object below. */   }      void pgtk2__init_object(struct object *o) {    GObject *go=get_gobject(o);    if (!go) /* Not a real GObject. Refhandling done elsewhere */