pike.git / src / modules / Image / encodings / xcf.c

version» Context lines:

pike.git/src/modules/Image/encodings/xcf.c:192:    ss->s = s;    s->refs++;    ss->offset = offset;    ss->len = len;    push_object( o );   }      static void free_substring(struct object *UNUSED(o))   {    if( SS(fp->current_object)->s ) -  { +     free_string( SS(fp->current_object)->s ); -  SS(fp->current_object)->s = 0; +    } - } +          typedef enum   {    PROP_END = 0,    PROP_COLORMAP = 1,    PROP_ACTIVE_LAYER = 2,    PROP_ACTIVE_CHANNEL = 3,    PROP_SELECTION = 4,    PROP_FLOATING_SELECTION = 5,
pike.git/src/modules/Image/encodings/xcf.c:1496:    start_new_program();    ADD_STORAGE( struct substring );    ADD_FUNCTION("cast", f_substring_cast, tFunc(tStr,tStr), ID_PRIVATE);    ADD_FUNCTION("`[]", f_substring_index, tFunc(tInt,tInt), 0);    ADD_FUNCTION("get_short", f_substring_get_short, tFunc(tInt,tInt), 0 );    ADD_FUNCTION("get_ushort", f_substring_get_ushort, tFunc(tInt,tInt), 0 );    ADD_FUNCTION("get_int", f_substring_get_int, tFunc(tInt,tInt), 0 );    ADD_FUNCTION("get_uint", f_substring_get_uint, tFunc(tInt,tInt), 0 );    ADD_FUNCTION("_sprintf",f_substring__sprintf, tFunc(tInt tMapping,tMix), 0);    - /* set_init_callback(init_substring); */ +     set_exit_callback(free_substring);    substring_program = end_program();   }         void exit_image_xcf(void)   {   #define STRING(X) free_string(s_##X)   #include "xcf_constant_strings.h"   #undef STRING    free_program( substring_program );   }