pike.git/
src/
operators.c
Branch:
Tag:
Non-build tags
All tags
No tags
2014-08-18
2014-08-18 17:17:14 by Martin Nilsson <nilsson@opera.com>
6a932b9300234b195c9f2804c7af5e240e3ffa92 (
14
lines) (+
5
/-
9
)
[
Show
|
Annotate
]
Branch:
8.0
Reuse the new type pike strings where possible and easy.
229:
else { { struct object *o = sp[-1].u.object;
-
struct pike_string *s;
+
struct program *p = o->prog->inherits[SUBTYPEOF(sp[-1])].prog; int f = FIND_LFUN(p, LFUN_CAST); if(f == -1) Pike_error("No cast method in object.\n");
-
REF
_
MAKE
_
CONST_STRING
(
s, "
int
");
-
push
_string
(s
);
+
ref
_
push
_
string(literal
_int_string);
apply_low(o, f, 1); stack_pop_keep_top(); }
249:
LFUN__IS_TYPE); if( f != -1) {
-
struct pike
_
string *s;
-
REF
_
MAKE_CONST_STRING
(
s, "
int
");
-
push
_string
(s
);
+
ref
_
push_
string
(literal
_int_string);
apply_low(o, f, 1); f=!UNSAFE_IS_ZERO(sp-1); pop_stack();
337:
int f = FIND_LFUN(o->prog->inherits[SUBTYPEOF(sp[-1])].prog, LFUN_CAST); if(f == -1) Pike_error("No cast method in object.\n");
-
push_
constant_text
(
"
string
"
);
+
ref_
push_
string(literal
_string
_string
);
apply_low(o, f, 1); stack_pop_keep_top(); }
353:
LFUN__IS_TYPE); if( f != -1) {
-
REF
_
MAKE
_
CONST_STRING
(
s, "
string
");
-
push
_string
(s
);
+
ref
_
push
_
string(literal
_string_string);
apply_low(o, f, 1); f=!UNSAFE_IS_ZERO(sp-1); pop_stack();