pike.git
/
src
/
operators.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/operators.c:1:
/*\ ||| This file a part of Pike, and is copyright by Fredrik Hubinette ||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" #include <math.h>
-
RCSID("$Id: operators.c,v 1.
41
1998/10/
11
11
:
18
:
52
hubbe Exp $");
+
RCSID("$Id: operators.c,v 1.
42
1998/10/
12
22
:
55
:
10
hubbe Exp $");
#include "interpret.h" #include "svalue.h" #include "multiset.h" #include "mapping.h" #include "array.h" #include "stralloc.h" #include "opcodes.h" #include "operators.h" #include "language.h" #include "pike_memory.h"
pike.git/src/operators.c:1843:
static void f_string_assignment_index(INT32 args) { INT32 i; get_all_args("string[]",args,"%i",&i); if(i<0) i+=THIS->s->len; if(i<0) i+=THIS->s->len; if(i<0 || i>=THIS->s->len) error("Index %d is out of range 0 - %d.\n", i, THIS->s->len-1); else
-
i=
EXTRACT
_
UCHAR
(THIS->s
->str +
i);
+
i=
index
_
shared_string
(THIS->s
,
i);
pop_n_elems(args); push_int(i); } static void f_string_assignment_assign_index(INT32 args) { INT32 i,j; union anything *u; get_all_args("string[]=",args,"%i%i",&i,&j); if((u=get_pointer_if_this_type(THIS->lval, T_STRING)))