pike.git
/
src
/
operators.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/operators.c:5534:
if(TYPEOF(Pike_sp[-2]) == T_STRING) SET_SVAL_SUBTYPE(Pike_sp[-2], 1); assign_lvalue (Pike_sp-3, Pike_sp-1); assign_svalue (Pike_sp-3, Pike_sp-1); pop_n_elems (args-1); break; default: PIKE_ERROR("`->=", "Too many arguments.\n", Pike_sp, args); } }
-
/*! @decl int sizeof(string arg)
-
*! @decl int sizeof(array arg)
-
*! @decl int sizeof(mapping arg)
-
*! @decl int sizeof(multiset arg)
-
*! @decl int sizeof(object arg)
+
/*! @decl int
(0..)
sizeof(string arg)
+
*! @decl int
(0..)
sizeof(array arg)
+
*! @decl int
(0..)
sizeof(mapping arg)
+
*! @decl int
(0..)
sizeof(multiset arg)
+
*! @decl int
(0..)
sizeof(object arg)
*! *! Size query. *! *! @returns *! The result will be as follows: *! @mixed arg *! @type string *! The number of characters in @[arg] will be returned. *! @type array|multiset *! The number of elements in @[arg] will be returned.
pike.git/src/operators.c:6109:
ADD_EFUN2("`~",f_compl, tOr6(tFunc(tObj,tMix), tFunc(tSetvar(1, tInt), tInvertInt(tVar(1))), tFunc(tFlt,tFlt), tFunc(tStr,tStr), tFunc(tType(tSetvar(0, tMix)), tType(tNot(tVar(0)))), tFunc(tPrg(tObj), tType(tMix))), OPT_TRY_OPTIMIZE,0,generate_compl); /* function(string|multiset|array|mapping|object:int(0..)) */ ADD_EFUN2("sizeof", f_sizeof,
-
tOr
(tFunc(tOr3(tMultiset,tMapping,tObj),tIntPos),
-
tFunc(
tOr(
tLStr(tSetvar(0,tIntPos),tInt),
-
tLArr(tSetvar(0,tIntPos),tMix)
)
,
-
tVar(0))),
+
tOr3
(tFunc(tOr3(tMultiset,tMapping,tObj),tIntPos),
+
tFunc(tLStr(tSetvar(0,tIntPos),tInt),
tVar(0)),
+
tFunc(
tLArr(tSetvar(0,tIntPos),tMix), tVar(0))),
OPT_TRY_OPTIMIZE, optimize_sizeof, generate_sizeof); ADD_EFUN2("strlen", f_sizeof,
-
tFunc(
tStr
,tIntPos),
OPT_TRY_OPTIMIZE
,
optimize_sizeof
,
-
generate_sizeof);
+
tFunc(
tLStr(tSetvar(0
,
tIntPos),
tInt)
,
tVar(0))
,
+
OPT_TRY_OPTIMIZE, optimize_sizeof,
generate_sizeof);
/* function(mixed,mixed ...:mixed) */ ADD_EFUN2("`()",f_call_function,tFuncV(tMix,tMix,tMix),OPT_SIDE_EFFECT | OPT_EXTERNAL_DEPEND,0,generate_call_function); /* This one should be removed */ /* function(mixed,mixed ...:mixed) */ ADD_EFUN2("call_function",f_call_function,tAttr("deprecated",tFuncV(tMix,tMix,tMix)),OPT_SIDE_EFFECT | OPT_EXTERNAL_DEPEND,0,generate_call_function); /* From the 201x C standard */ ADD_EFUN2("_Static_assert", NULL,