pike.git/
src/
operators.c
Branch:
Tag:
Non-build tags
All tags
No tags
1997-01-28
1997-01-28 03:10:22 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
8a586b6d6d7b169b2e76894a34ccef6b5c6cb21a (
14
lines) (+
9
/-
5
)
[
Show
|
Annotate
]
Branch:
7.9
fixed a bug in range overloading
Rev: src/operators.c:1.6
5:
\*/ #include <math.h> #include "global.h"
-
RCSID("$Id: operators.c,v 1.
5
1997/01/
27
01
:
27
:
13
hubbe Exp $");
+
RCSID("$Id: operators.c,v 1.
6
1997/01/
28
03
:
10
:
22
hubbe Exp $");
#include "interpret.h" #include "svalue.h" #include "multiset.h"
1103:
void o_range() { INT32 from,to;
+
+
if(sp[-3].type==T_OBJECT)
+
{
+
CALL_OPERATOR(LFUN_INDEX, 2);
+
return;
+
}
+
if(sp[-2].type != T_INT) error("Bad argument 1 to [ .. ]\n");
1117:
switch(sp[-1].type) {
-
case T_OBJECT:
-
CALL_OPERATOR(LFUN_INDEX, 2);
-
break;
-
+
case T_STRING: { struct pike_string *s;