pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: builtin_functions.c,v 1.630 2007/03/29 15:36:54 mast Exp $ + || $Id: builtin_functions.c,v 1.631 2007/03/29 15:59:21 grubba Exp $   */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"
pike.git/src/builtin_functions.c:2215:    if( !args || Pike_sp[-1].type != 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 __check_call(type arg_type, type fun_type) -  *! @decl type __check_call(type arg_type, type fun_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:2238:    *! Last argument. @[arg_type] is the last argument to @[fun_type].    *! @value 3    *! Both strict types and last argument as above.    *! @endint    *!    *! @returns    *! Returns a continuation type on success.    *!    *! Returns @tt{0@} (zero) on failure.    */ - static void f___check_call(INT32 args) + static void f___low_check_call(INT32 args)   {    struct pike_type *res;    INT32 flags = 0; -  if (args < 2) Pike_error("Bad number of arguments to __check_call().\n"); +  if (args < 2) Pike_error("Bad number of arguments to __low_check_call().\n");    if (Pike_sp[-args].type != PIKE_T_TYPE) { -  Pike_error("Bad argument 1 to __check_call() expected type.\n"); +  Pike_error("Bad argument 1 to __low_check_call() expected type.\n");    }    if (Pike_sp[1-args].type != PIKE_T_TYPE) { -  Pike_error("Bad argument 2 to __check_call() expected type.\n"); +  Pike_error("Bad argument 2 to __low_check_call() expected type.\n");    }    if (args > 2) {    if (Pike_sp[2-args].type != PIKE_T_INT) { -  Pike_error("Bad argument 3 to __check_call() expected int.\n"); +  Pike_error("Bad argument 3 to __low_check_call() expected int.\n");    }    flags = Pike_sp[2-args].u.integer;    }    if (!(res = low_new_check_call(Pike_sp[-args].u.type,    Pike_sp[1-args].u.type, flags))) {    pop_n_elems(args);    push_undefined();    } else {    pop_n_elems(args);    push_type_value(res);
pike.git/src/builtin_functions.c:9176:    tFunc(tStr tOr(tInt,tVoid),tStr8), OPT_TRY_OPTIMIZE);      /* function(string(8),int|void:string) */    ADD_EFUN("utf8_to_string", f_utf8_to_string,    tFunc(tStr8 tOr(tInt,tVoid),tStr), OPT_TRY_OPTIMIZE);          ADD_EFUN("__parse_pike_type", f_parse_pike_type,    tFunc(tStr8,tStr8),OPT_TRY_OPTIMIZE);    -  ADD_EFUN("__check_call", f___check_call, +  ADD_EFUN("__low_check_call", f___low_check_call,    tFunc(tType(tMix) tType(tCallable) tOr(tInt,tVoid),    tType(tCallable)),    OPT_TRY_OPTIMIZE);       /* FIXME: Could have a stricter type. */    ADD_EFUN("__get_return_type", f___get_return_type,    tFunc(tType(tCallable), tType(tMix)),    OPT_TRY_OPTIMIZE);       /* FIXME: Could have a stricter type. */