pike.git/
src/
interpret.c
Branch:
Tag:
Non-build tags
All tags
No tags
1997-01-27
1997-01-27 01:15:37 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
74b69919c722054a57166f6b77d1f64f6c48f6ce (
20
lines) (+
18
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
overloading for `() implemented, optimized plus on strings
Rev: src/interpret.c:1.21
4:
||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h"
-
RCSID("$Id: interpret.c,v 1.
20
1997/01/
17
21
:
06
:
40
hubbe Exp $");
+
RCSID("$Id: interpret.c,v 1.
21
1997/01/
27
01
:
15
:
37
hubbe Exp $");
#include "interpret.h" #include "object.h" #include "program.h"
676:
* and then the low array/multiset/mapping manipulation routines can be * destructive if they like */
-
if( (1 << sp[-1].type) & ( BIT_ARRAY | BIT_MULTISET | BIT_MAPPING ))
+
if( (1 << sp[-1].type) & ( BIT_ARRAY | BIT_MULTISET | BIT_MAPPING
| BIT_STRING
))
{ struct svalue s; s.type=T_INT;
1493:
} break;
+
case T_OBJECT:
+
{
+
if(!s->u.object->prog)
+
error("Calling a destructed object.\n");
+
+
if(s->u.object->prog->lfuns[LFUN_CALL] == -1)
+
error("Calling object without `() operator\n");
+
+
apply_lfun(s->u.object, LFUN_CALL, args);
+
free_svalue(sp-2);
+
sp[-2]=sp[-1];
+
sp--;
+
break;
+
}
+
default: error("Call to non-function value.\n"); }