pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:2447:    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) );    pop_stack();       push_string(type_to_string(t));    free_type(t);   }    - /*! @decl type __soft_cast(type to, type from) + /*! @module Pike +  */ +  + /*! @decl type soft_cast(type to, type from)    *!    *! Return the resulting type from a soft cast of @[from] to @[to].    */   static void f___soft_cast(INT32 args)   {    struct pike_type *res;    if (args < 2) Pike_error("Bad number of arguments to __soft_cast().\n");    if (TYPEOF(Pike_sp[-args]) != PIKE_T_TYPE) {    Pike_error("Bad argument 1 to __soft_cast() expected type.\n");    }
pike.git/src/builtin_functions.c:2471:    if (!(res = soft_cast(Pike_sp[-args].u.type,    Pike_sp[1-args].u.type, 0))) {    pop_n_elems(args);    push_undefined();    } else {    pop_n_elems(args);    push_type_value(res);    }   }    - /*! @decl type __low_check_call(type fun_type, type arg_type) -  *! @decl type __low_check_call(type fun_type, type arg_type, int flags) + /*! @decl type low_check_call(type fun_type, type arg_type) +  *! @decl type low_check_call(type fun_type, type arg_type, int flags)    *!    *! Check whether a function of type @[fun_type] may be called    *! with a first argument of type @[arg_type].    *!    *! @param flags    *! The following flags are currently defined:    *! @int    *! @value 1    *! Strict types. Fail if not all possible values in @[arg_type]    *! are valid as the first argument to @[fun_type].
pike.git/src/builtin_functions.c:2523:    if (!(res = low_new_check_call(Pike_sp[-args].u.type,    Pike_sp[1-args].u.type, flags, sval))) {    pop_n_elems(args);    push_undefined();    } else {    pop_n_elems(args);    push_type_value(res);    }   }    - /*! @decl type __get_return_type(type fun_type) + /*! @decl type get_return_type(type fun_type)    *!    *! Check what a function of the type @[fun_type] will    *! return if called with no arguments.    *!    *! @returns    *! Returns the type of the returned value on success    *!    *! Returns @tt{0@} (zero) on failure.    */   static void f___get_return_type(INT32 args)
pike.git/src/builtin_functions.c:2551:    }    if (!(res = new_get_return_type(Pike_sp[-1].u.type, 0))) {    pop_n_elems(args);    push_undefined();    } else {    pop_n_elems(args);    push_type_value(res);    }   }    - /*! @decl type __get_first_arg_type(type fun_type) + /*! @decl type get_first_arg_type(type fun_type)    *!    *! Check if a function of the type @[fun_type] may be called    *! with an argument, and return the type of that argument.    *!    *! @returns    *! Returns the expected type of the first argument to the function.    *!    *! Returns @tt{0@} (zero) if a function of the type @[fun_type]    *! may not be called with any argument, or if it is not callable.    */
pike.git/src/builtin_functions.c:2581:    if (!(res = get_first_arg_type(Pike_sp[-1].u.type, CALL_NOT_LAST_ARG)) &&    !(res = get_first_arg_type(Pike_sp[-1].u.type, 0))) {    pop_n_elems(args);    push_undefined();    } else {    pop_n_elems(args);    push_type_value(res);    }   }    - /*! @decl array(string) __get_type_attributes(type t) + /*! @decl array(string) get_type_attributes(type t)    *!    *! Get the attribute markers for a type.    *!    *! @returns    *! Returns an array with the attributes for the type @[t].    *!    *! @seealso -  *! @[__get_return_type()], @[__get_first_arg_type()] +  *! @[get_return_type()], @[get_first_arg_type()]    */   static void f___get_type_attributes(INT32 args)   {    struct pike_type *t;    int count = 0;    if (args != 1) {    Pike_error("Bad number of arguments to __get_type_attributes().\n");    }    if (TYPEOF(Pike_sp[-1]) != PIKE_T_TYPE) {    Pike_error("Bad argument 1 to __get_type_attributes() expected type.\n");
pike.git/src/builtin_functions.c:2615:    if (t->type == PIKE_T_ATTRIBUTE) {    ref_push_string((struct pike_string *)t->car);    count++;    }    t = t->cdr;    }    f_aggregate(count);    stack_pop_n_elems_keep_top(args);   }    + /*! @endmodule Pike +  */ +    /*! @decl mapping (string:mixed) all_constants()    *!    *! Returns a mapping containing all global constants, indexed on the name    *! of the constant, and with the value of the constant as value.    *!    *! @seealso    *! @[add_constant()]    */   PMOD_EXPORT void f_all_constants(INT32 args)   {