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

version» Context lines:

pike.git/src/post_modules/GTK2/source/support.c:196:    f_aggregate(256);    /* now on stack: the array with colors. */    pgtk2_get_image_module();    pgtk2_index_stack("colortable");    /* on stack: array function */    Pike_sp[0]=Pike_sp[-1];    Pike_sp[-1]=Pike_sp[-2];    Pike_sp[-2]=Pike_sp[0];    /* on stack: function array */    PFTIME("Creating colormap obj"); -  apply_svalue(Pike_sp-2,1); +  safe_apply_svalue(Pike_sp-2, 1, 1);    /* on stack: function cmap */    get_all_args("internal",1,"%o",&pike_cmap);    pike_cmap->refs+=100; /* lets keep this one.. :-) */    push_int(8);    push_int(8);    push_int(8);    apply(pike_cmap,"rigid",3);    pop_stack();    apply(pike_cmap,"ordered",0);    pop_stack();
pike.git/src/post_modules/GTK2/source/support.c:234:    default: pad = 32; break;    }    push_int(pad); /* extra padding.. */    }    push_int(i->depth);    add_ref(pike_cmap);    push_object(pike_cmap);    /* on stack: function img bpp linepad depth cmap*/    /* 6 5 4 3 2 1 */    PFTIME("Dithering image"); -  apply_svalue(Pike_sp-6,5); +  safe_apply_svalue(Pike_sp-6, 5, 1);    if (TYPEOF(Pike_sp[-1]) != PIKE_T_STRING) {    gdk_image_destroy((void *)i);    Pike_error("Failed to convert image\n");    }    PFTIME("Converting image");    memcpy(i->mem,Pike_sp[-1].u.string->str,Pike_sp[-1].u.string->len);    pop_stack(); /* string */    pop_stack(); /* function */    }    }
pike.git/src/post_modules/GTK2/source/support.c:443:    xfree(res);    } else {    push_string(make_shared_binary_string2(f,nelems));    }   }      /*   gint pgtk2_buttonfuncwrapper(GObject *obj, struct signal_data *d, void *foo) {    int res;    push_svalue(&d->args); -  apply_svalue(&d->cb, 1); +  safe_apply_svalue(&d->cb, 1, 1);    res=Pike_sp[-1].u.integer;    pop_stack();    return res;   }   */      void push_gdk_event(GdkEvent *e) {    if (e) {    GdkEvent *f=g_malloc(sizeof(GdkEvent));    if (f==NULL) {
pike.git/src/post_modules/GTK2/source/support.c:776:    GValue *return_value) {    unsigned int i;       if (!last_used_callback)    build_push_callbacks();    push_gobject(G_OBJECT(go));    for (i=0; i<n_params; i++) {    pgtk2_push_gvalue_rt(&(param_values[i]));    }    push_svalue(&d->args); -  apply_svalue(&d->cb,2+n_params); +  safe_apply_svalue(&d->cb, 2+n_params, 1);    if (return_value && G_VALUE_TYPE(return_value) != 0 )    pgtk2_set_value(return_value,&Pike_sp[-1]);    pop_stack();   }      void pgtk2_free_signal_data(struct signal_data *s, GClosure *gcl) {    free_svalue(&s->cb);    free_svalue(&s->args);    g_free(s);   }
pike.git/src/post_modules/GTK2/source/support.c:1284:   }      int pgtk2_tree_sortable_callback(GtkTreeModel *model, GtkTreeIter *a,    GtkTreeIter *b, struct signal_data *d) {    int res;   /* push_gobjectclass(model,pgtk2_tree_model_program); */    push_gobject(model);    push_pgdk2object(a,pgtk2_tree_iter_program,0);    push_pgdk2object(b,pgtk2_tree_iter_program,0);    push_svalue(&d->args); -  apply_svalue(&d->cb,4); +  safe_apply_svalue(&d->cb, 4, 1);    res=Pike_sp[-1].u.integer;    pop_stack();    return res;   }      GObject *pgtk2_create_new_obj_with_properties(GType type, struct mapping *m) {    GParamSpec *pspec;    GObject *obj;    GObjectClass *class;    GParameter *params;
pike.git/src/post_modules/GTK2/source/support.c:1361:    callback(data1,data2,n_params-1,param_values+1,return_value);   }      int pgtk2_tree_view_row_separator_func(GtkTreeModel *model,    GtkTreeIter *iter,    struct signal_data *d) {    int res;    push_gobject(model);    push_gobjectclass(iter,pgtk2_tree_iter_program);    push_svalue(&d->args); -  apply_svalue(&d->cb,3); +  safe_apply_svalue(&d->cb, 3, 1);    res=Pike_sp[-1].u.integer;    pop_stack();    return res;   }         int pgtk2_entry_completion_match_func( GtkEntryCompletion *x,    const gchar *key,    GtkTreeIter *iter,    struct signal_data *d)   {    int res;    push_gobject(x);    pgtk2_push_gchar( key );    push_gobjectclass(iter,pgtk2_tree_iter_program); -  apply_svalue( &d->cb, 3 ); +  safe_apply_svalue( &d->cb, 3, 1 );    res = Pike_sp[-1].u.integer;    pop_stack();    return res;   }      void add_property_docs(GType type, GString *str) {    GObjectClass *class;    GParamSpec **props;    guint n=0,i;    gboolean has_prop=FALSE;