pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
1997-01-27
1997-01-27 01:02:07 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
aac015788e988ef26717037962a391c02b7b6f71 (
21
lines) (+
9
/-
12
)
[
Show
|
Annotate
]
Branch:
7.9
encode/decode_value added, f_all_constants recoded
Rev: src/builtin_functions.c:1.22
4:
||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h"
-
RCSID("$Id: builtin_functions.c,v 1.
21
1997/01/
19
09
:
07
:
59
hubbe Exp $");
+
RCSID("$Id: builtin_functions.c,v 1.
22
1997/01/
27
01
:
02:
07 hubbe Exp $");
#include "interpret.h" #include "svalue.h" #include "macros.h"
29:
#include "threads.h" #include "time_stuff.h" #include "version.h"
+
#include "encode.h"
#include <math.h> #include <ctype.h>
532:
void f_all_constants(INT32 args) {
-
INT32 stack_size;
+
pop_n_elems(args);
-
stack_size=sp - evaluator_stack;
-
push_
all
_
efuns
_
on_stack
();
-
f_aggregate_mapping(
sp
-
evaluator_stack
-
stack_size)
;
+
push_
mapping(get
_
builtin
_
constants
()
)
;
+
sp
[
-
1].u.mapping
-
>refs++
;
} void f_allocate(INT32 args)
1498:
push_text("callback_bytes"); push_int(size);
-
count_memory_in_constants(&num, &size);
-
push_text("num_constants");
-
push_int(num);
-
push_text("constant_bytes");
-
push_int(size);
-
+
count_memory_in_callables(&num, &size); push_text("num_callables"); push_int(num);
1679:
Inside #if defined(GC2)
#ifdef GC2 add_efun("gc",f_gc,"function(:int)",OPT_SIDE_EFFECT); #endif
-
add_efun("version", f_version, "function(:string)",
0
);
+
add_efun("version", f_version, "function(:string)",
OPT_TRY_OPTIMIZE
);
+
+
add_efun("encode_value", f_encode_value, "function(mixed:string)", OPT_TRY_OPTIMIZE);
+
add_efun("decode_value", f_decode_value, "function(string:mixed)", OPT_TRY_OPTIMIZE);
}