pike.git/
src/
builtin.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2011-03-15
2011-03-15 01:08:00 by Martin Stjernholm <mast@lysator.liu.se>
ace6c94c46f2f9a59337de70c24c88b6caa420bd (
18
lines) (+
17
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
Safer way to test for another null value in Null.`==.
3746:
push_int(0); return; }
+
+
/* Look for the is_val_null constant directly in the program of
+
* other, without going through its `[]. When this is called in a
+
* codec, other can be a completely arbitrary object which may not
+
* have a `[] that works in that context. */
+
push_int (0);
+
ref_push_program (other->u.object->prog);
push_constant_text("is_val_null");
-
o
_index();
+
if (program
_index
_no_free
(
Pike_sp - 3, Pike_sp - 2, Pike_sp - 1
)
&&
+
Pike_sp[-3].type == T_INT && Pike_sp[-3].u.integer) {
+
pop_n_elems (4)
;
+
push_int (1);
}
-
+
else {
+
pop_n_elems (4);
+
push_int (0);
+
}
+
}
/*! @decl string encode_json() *!