pike.git
/
src
/
program.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/program.c:10674:
flags, IDENTIFIER_C_FUNCTION, 0, opt_flags); } free_string(name_tmp); free_type(type_tmp); return ret; }
-
PMOD_EXPORT int quick_add_function(const
char
*
name,
-
int
name_
length
,
+
PMOD_EXPORT int
low_
quick_add_function(const
struct
pike_string
* name_
tmp
,
void (*cfun)(INT32), const char *type, int UNUSED(type_length), unsigned flags, unsigned opt_flags) { int ret;
-
struct pike_string *name_tmp;
+
struct pike_type *type_tmp; union idptr tmp; /* fprintf(stderr,"ADD_FUNC: %s\n",name); */
-
name_tmp = make_shared_binary_string(name, name_length);
+
type_tmp = make_pike_type(type); if(cfun) { tmp.c_fun=cfun; ret=define_function(name_tmp, type_tmp, flags, IDENTIFIER_C_FUNCTION, &tmp,
pike.git/src/program.c:10878:
MAKE_CONST_STRING(this_program_string,"this_program"); MAKE_CONST_STRING(this_string,"this"); MAKE_CONST_STRING(UNDEFINED_string,"UNDEFINED"); MAKE_CONST_STRING(parser_system_string, "parser"); MAKE_CONST_STRING(type_check_system_string, "type_check"); lfun_ids = allocate_mapping(NUM_LFUNS); lfun_types = allocate_mapping(NUM_LFUNS); for (i=0; i < NELEM(lfun_names); i++) {
-
lfun_strings[i] = make_shared_string(lfun_names[i]);
+
lfun_strings[i] = make_shared_
static_
string(lfun_names[i]
, strlen(lfun_names[i]
)
, eightbit)
;
SET_SVAL(id, T_INT, NUMBER_NUMBER, integer, i); SET_SVAL(key, T_STRING, 0, string, lfun_strings[i]); mapping_insert(lfun_ids, &key, &id); SET_SVAL(val, T_TYPE, 0, type, make_pike_type(raw_lfun_types[i])); mapping_insert(lfun_types, &key, &val); free_type(val.u.type); }