pike.git / src / operators.c

version» Context lines:

pike.git/src/operators.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: operators.c,v 1.225 2008/01/24 17:48:18 mast Exp $ + || $Id: operators.c,v 1.226 2008/01/26 22:34:22 mast Exp $   */      #include "global.h"   #include <math.h>   #include "interpret.h"   #include "svalue.h"   #include "multiset.h"   #include "mapping.h"   #include "array.h"   #include "stralloc.h"
pike.git/src/operators.c:1484:    }       if(size == sp[-args].u.string->len)    {    pop_n_elems(args-1);    return;    }       tmp=sp[-args].u.string->len;    r=new_realloc_shared_string(sp[-args].u.string,size,max_shift); -  sp[-args].type=T_INT; +  mark_free_svalue (sp - args);    buf=MKPCHARP_STR_OFF(r,tmp);    for(e=-args+1;e<0;e++)    {    pike_string_cpy(buf,sp[e].u.string);    INC_PCHARP(buf,sp[e].u.string->len);    }    sp[-args].u.string=low_end_shared_string(r);    sp[-args].type=T_STRING;    for(e=-args+1;e<0;e++) free_string(sp[e].u.string);    sp-=args-1;
pike.git/src/operators.c:5360:    }       pop_n_elems(args);    push_int(j);   }         static void init_string_assignment_storage(struct object *o)   {    THIS->lval[0].type = T_INT; +  THIS->lval[0].subtype = PIKE_T_FREE;    THIS->lval[1].type = T_INT; -  +  THIS->lval[1].subtype = PIKE_T_FREE;    THIS->s = NULL;   }      static void exit_string_assignment_storage(struct object *o)   {    free_svalues(THIS->lval, 2, BIT_MIXED);    if(THIS->s)    free_string(THIS->s);   }