pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:3005:    push_string(type_to_string(t));    free_type(t);   }      /*! @module Pike    */      /*! @decl type|zero soft_cast(type to, type from)    *!    *! Return the resulting type from a soft cast of @[from] to @[to]. +  *! +  *! @reeturns +  *! Returns @expr{UNDEFINED@} if the cast is invalid. +  *! +  *! @note +  *! The return value for the invalid case may in the future +  *! change to @expr{__unknown__@}.    */   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");    }    if (TYPEOF(Pike_sp[1-args]) != PIKE_T_TYPE) {    Pike_error("Bad argument 2 to __soft_cast() expected type.\n");