pike.git / src / post_modules / GTK2 / source / gdkcolor.pre

version» Context lines:

pike.git/src/post_modules/GTK2/source/gdkcolor.pre:12:   //! If color is specified, it should be an Image.Color object, and the   //! only argument.   {    INT_TYPE r,g,b;    GdkColormap *col=gdk_colormap_get_system();    GdkColor *c;    pgtk2_verify_setup();    pgtk2_verify_not_inited();    if (args==1) {    struct object *o; -  get_all_args("GdkColor",args,"%o",&o); +  get_all_args(NULL,args,"%o",&o);    if (!get_color_from_pikecolor(o,&r,&g,&b))    Pike_error("Bad argument 1 to GDK2.Color(). Exptected color object\n");    } else { -  get_all_args("GdkColor",args,"%i%i%i",&r,&g,&b); +  get_all_args(NULL,args,"%i%i%i",&r,&g,&b);    r*=257;    g*=257;    b*=257;    }       c=g_malloc(sizeof(GdkColor));    if (c==NULL)    SIMPLE_OUT_OF_MEMORY_ERROR("",sizeof(GdkColor));    THIS->owned = 1;    THIS->obj=(void *)c;
pike.git/src/post_modules/GTK2/source/gdkcolor.pre:94:    ((GdkColor *)THIS->obj)->red,    ((GdkColor *)THIS->obj)->green,    ((GdkColor *)THIS->obj)->blue);       pgtk2_pop_n_elems(args);    pgtk2_get_image_module();    pgtk2_index_stack("Color");    pgtk2_index_stack((char *)colorname);   }    - void destroy() + void _destruct()   //! Destroys the color object. Please note that this function does   //! not free the color from the X-colormap (in case of pseudocolor)   //! right now.   {    if (THIS->obj && THIS->owned) {    g_free(THIS->obj);    THIS->obj=0;    THIS->owned=0;    }    pgtk2_pop_n_elems(args);    push_int(0);   }