pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:2926:    }       if (!(extended & 1) && expect_low_surrogate) {    ret = 0;    }       pop_n_elems(args);    push_int(ret);   }    + /*! @decl int(..1) deprecated_typep(type t) +  *! +  *! Checks if the supplied type has the "deprecated" attribute. This would +  *! generally only be true in static types of identifiers that have been +  *! marked as __deprecated__. +  *! +  *! @returns +  *! @expr{1@} if the type has the "deprecated" attribute, +  *! @expr{0@} otherwise. +  */ + PMOD_EXPORT void f_deprecated_typep(INT32 args) + { +  int ret; +  +  if (!args || TYPEOF(Pike_sp[-1]) != PIKE_T_TYPE) +  SIMPLE_ARG_TYPE_ERROR("deprecated_typep", 1, "type"); +  +  ret = deprecated_typep(Pike_sp[-1].u.type); +  pop_n_elems(args); +  push_int(ret); + } +    /*! @decl string(0..255) __parse_pike_type(string(0..255) t)    */   static void f_parse_pike_type( INT32 args )   {    struct pike_type *t;       if( !args || TYPEOF(Pike_sp[-1]) != T_STRING ||    Pike_sp[-1].u.string->size_shift )    Pike_error( "__parse_pike_type requires a 8bit string as its first argument\n" );    t = parse_type( (char *)STR0(Pike_sp[-1].u.string) );
pike.git/src/builtin_functions.c:10267:    tFunc(tUtf8Str tOr(tInt,tVoid),tStr), OPT_TRY_OPTIMIZE);       /* function(string(8bit),int|void:int(0..1)) */    ADD_EFUN("validate_utf8", f_validate_utf8,    tFunc(tStr8 tOr(tInt,tVoid),tInt01), OPT_TRY_OPTIMIZE);          ADD_EFUN("__parse_pike_type", f_parse_pike_type,    tFunc(tStr8,tStr8),OPT_TRY_OPTIMIZE);    +  ADD_EFUN("deprecated_typep", f_deprecated_typep, +  tFunc(tType(tMix),tInt), OPT_TRY_OPTIMIZE); +     ADD_EFUN("__soft_cast", f___soft_cast,    tFunc(tSetvar(0, tType(tMix)) tSetvar(1, tType(tMix)),    tAnd(tVar(0), tVar(1))),    OPT_TRY_OPTIMIZE);       ADD_EFUN("__low_check_call", f___low_check_call,    tFunc(tType(tCallable) tType(tMix) tOr(tInt,tVoid) tOr(tMix,tVoid),    tType(tCallable)),    OPT_TRY_OPTIMIZE);