pike.git/
src/
builtin_functions.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 (
27
lines) (+
14
/-
13
)
[
Show
|
Annotate
]
Branch:
8.0
Reuse the new type pike strings where possible and easy.
5020:
{ \ int id_level = \ p->inherits[SUBTYPEOF(Pike_sp[-args])].identifier_level; \
-
push_
constant_text
(TYPE_NAME);
\
+
ref_
push_
string(literal
_
##
TYPE_NAME
##_string
); \
apply_low(Pike_sp[-args-1].u.object, fun + id_level, 1); \ stack_unlink(args); \ return; \
5150:
*/
-
TYPEP(f_intp, "intp", T_INT,
"
int
"
)
-
TYPEP(f_mappingp, "mappingp", T_MAPPING,
"
mapping
"
)
-
TYPEP(f_arrayp, "arrayp", T_ARRAY,
"
array
"
)
-
TYPEP(f_multisetp, "multisetp", T_MULTISET,
"
multiset
"
)
-
TYPEP(f_stringp, "stringp", T_STRING,
"
string
"
)
-
TYPEP(f_floatp, "floatp", T_FLOAT,
"
float
"
)
+
TYPEP(f_intp, "intp", T_INT, int)
+
TYPEP(f_mappingp, "mappingp", T_MAPPING, mapping)
+
TYPEP(f_arrayp, "arrayp", T_ARRAY, array)
+
TYPEP(f_multisetp, "multisetp", T_MULTISET, multiset)
+
TYPEP(f_stringp, "stringp", T_STRING, string)
+
TYPEP(f_floatp, "floatp", T_FLOAT, float)
/*! @decl array sort(array(mixed) index, array(mixed) ... data) *!
8781:
{ pop_stack();
-
push_
constant_text
(
"
array
"
);
+
ref_
push_
string(literal
_array
_string
);
/* FIXME: Object subtype! */ safe_apply(mysp[-3].u.object,"cast",1); if (TYPEOF(Pike_sp[-1]) == T_ARRAY)
8794:
} pop_stack();
-
push_
constant_text
(
"
mapping
"
);
+
ref_
push_
string(literal
_mapping
_string
);
/* FIXME: Object subtype! */ safe_apply(mysp[-3].u.object,"cast",1); if (TYPEOF(Pike_sp[-1]) == T_MAPPING)
8807:
} pop_stack();
-
push_
constant_text
(
"
multiset
"
);
+
ref_
push_
string(literal
_multiset
_string
);
/* FIXME: Object subtype! */ safe_apply(mysp[-3].u.object,"cast",1); if (TYPEOF(Pike_sp[-1]) == T_MULTISET)
9212:
{ pop_stack();
-
push_
constant_text
(
"
array
"
);
+
ref_
push_
string(literal
_array
_string
);
/* FIXME: Object subtype! */ safe_apply(mysp[-3].u.object,"cast",1); if (TYPEOF(Pike_sp[-1]) == T_ARRAY)
9225:
} pop_stack();
-
push_
constant_text
(
"
mapping
"
);
+
ref_
push_
string(literal
_mapping
_string
);
/* FIXME: Object subtype! */ safe_apply(mysp[-3].u.object,"cast",1); if (TYPEOF(Pike_sp[-1]) == T_MAPPING)
9238:
} pop_stack();
-
push_
constant_text
(
"
multiset
"
);
+
ref_
push_
string(literal
_multiset
_string
);
/* FIXME: Object subtype! */ safe_apply(mysp[-3].u.object,"cast",1); if (TYPEOF(Pike_sp[-1]) == T_MULTISET)