pike.git
/
src
/
builtin.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/builtin.cmod:1:
/* -*- c -*-
-
* $Id: builtin.cmod,v 1.
65
2001/09/
21
17
:
57
:
12
grubba Exp $
+
* $Id: builtin.cmod,v 1.
66
2001/09/
24
16
:
46
:
34
grubba Exp $
*/ #include "global.h" #include "interpret.h" #include "svalue.h" #include "opcodes.h" #include "pike_macros.h" #include "object.h" #include "program.h" #include "array.h"
pike.git/src/builtin.cmod:613:
*! If @[f] is a global function defined in the runtime @tt{0@} (zero) *! will be returned. *! *! @seealso *! @[function_object()] */ PIKEFUN string function_name(program|function func) efun; optflags OPT_TRY_OPTIMIZE; {
-
struct pike_string *s;
+
switch(func->type) { default: if(!func->u.object->prog) bad_arg_error("function_name", Pike_sp-args, args, 1, "function|program", Pike_sp-args, "Bad argument.\n"); return; /* NOTREACHED */ case PIKE_T_PROGRAM:
pike.git/src/builtin.cmod:1018:
} } if (end_or_none) { f_aggregate(1 + end - index); } } PIKEFUN mixed `[]=(int index, mixed value) { INT32 numargs = 0;
-
INT32 i;
+
if (THIS->args) { numargs = THIS->args->size; } numargs += 3; if ((index < -numargs) || (index >= numargs)) { index_error("pike_frame->`[]=", Pike_sp-args, args, NULL, Pike_sp-args, "Index %"PRINTPIKEINT"d is out of array range 0 - %d,\n",
pike.git/src/builtin.cmod:1248:
void f_Buffer_get_copy( INT32 args ); void f_Buffer_get( INT32 args ); void f_Buffer_add( INT32 args ); /*! @decl void create() *! *! Initializes a new buffer. *!
-
*! If no @[initial_size] is specified,
4096
is used. If you
+
*! If no @[initial_size] is specified,
256
is used. If you
*! know approximately how big the buffer will be, you can optimize *! the operation of @[add()] (slightly) by passing the size to this *! function. */ PIKEFUN void create( int|void size ) { struct Buffer_struct *str = THIS; if( args ) str->initial = MAXIMUM( size->u.integer, 512 ); else