pike.git
/
src
/
constants.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/constants.c:9:
#include "pike_macros.h" #include "program.h" #include "pike_types.h" #include "stralloc.h" #include "pike_memory.h" #include "interpret.h" #include "mapping.h" #include "pike_error.h" #include "block_alloc.h"
-
RCSID("$Id: constants.c,v 1.
25
2001/02/
19
23
:
49
:
59
grubba Exp $");
+
RCSID("$Id: constants.c,v 1.
26
2001/02/
20
22
:
03
:
47
grubba Exp $");
struct mapping *builtin_constants = 0; PMOD_EXPORT struct mapping *get_builtin_constants(void) { if(!builtin_constants) builtin_constants=allocate_mapping(20); return builtin_constants; }
pike.git/src/constants.c:67:
#undef EXIT_BLOCK #define EXIT_BLOCK(X) do { \ free_type(X->type); \ free_string(X->name); \ }while(0) BLOCK_ALLOC(callable,128) /* Eats one ref to 'type' and 'name' */ PMOD_EXPORT struct callable *low_make_callable(c_fun fun, struct pike_string *name,
-
struct pike_
string
*type,
+
struct pike_
type
*type,
INT16 flags, optimize_fun optimize, docode_fun docode) { struct callable *f=alloc_callable(); f->refs=1; f->function=fun; f->name=name; f->type=type; f->flags=flags; f->docode=docode; f->optimize=optimize; #ifdef PIKE_DEBUG {
-
struct pike_
string
*z=check_call(function_type_string,type,0);
+
struct pike_
type
*z
=
check_call(function_type_string,
type,
0);
f->may_return_void= z == void_type_string; if(!z) fatal("Gnapp!\n");
-
free_
string
(z);
+
free_
type
(z);
} #endif return f; } PMOD_EXPORT struct callable *make_callable(c_fun fun, char *name, char *type, INT16 flags, optimize_fun optimize,
pike.git/src/constants.c:135:
} PMOD_EXPORT struct callable *quick_add_efun(char *name, ptrdiff_t name_length, c_fun fun, char *type, ptrdiff_t type_length, INT16 flags, optimize_fun optimize, docode_fun docode) { struct svalue s;
-
struct pike_string *n
,
*t;
+
struct pike_string *n
;
+
struct pike_type
*t;
struct callable *ret; n=make_shared_binary_string(name,name_length); t=make_shared_binary_string(type,type_length); #ifdef DEBUG check_type_string(t); #endif s.type=T_FUNCTION; s.subtype=FUNCTION_BUILTIN; add_ref(n);