pike.git/
src/
dynamic_load.c
Branch:
Tag:
Non-build tags
All tags
No tags
2001-09-11
2001-09-11 05:42:20 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
9552624d4a82da4e8a987f50304d98be960ca27d (
15
lines) (+
10
/-
5
)
[
Show
|
Annotate
]
Branch:
7.9
hear ye, hear ye; dynamicly loaded programs shall not have parents
Rev: src/dynamic_load.c:1.55
9:
# include "main.h" # include "constants.h"
-
RCSID("$Id: dynamic_load.c,v 1.
54
2001/09/
10
15
:
51
:
23
grubba
Exp $");
+
RCSID("$Id: dynamic_load.c,v 1.
55
2001/09/
11
05
:
42
:
20
hubbe
Exp $");
#else /* TESTING */
345:
*/ void f_load_module(INT32 args) {
+
extern int compilation_depth;
+
extern int global_callable_flags;
+
void *module; modfun init, exit; struct module_list *new_module; const char *module_name;
-
+
int save_depth=compilation_depth;
+
if(sp[-args].type != T_STRING) Pike_error("Bad argument 1 to load_module()\n");
401:
new_module->init=init; new_module->exit=exit;
+
compilation_depth=-1;
start_new_program();
-
{
-
extern int global_callable_flags;
+
global_callable_flags|=CALLABLE_DYNAMIC;
-
}
+
#ifdef PIKE_DEBUG { struct svalue *save_sp=sp;
422:
pop_n_elems(args); push_program(end_program());
+
compilation_depth=save_depth;
} #endif /* USE_DYNAMIC_MODULES */