pike.git / src / dynamic_load.c

version» Context lines:

pike.git/src/dynamic_load.c:10:   # include "constants.h"   # include "pike_error.h"   # include "module.h"   # include "stralloc.h"   # include "pike_macros.h"   # include "main.h"   # include "constants.h"   # include "language.h"   # include "lex.h"    - RCSID("$Id: dynamic_load.c,v 1.62 2002/05/10 21:53:14 per Exp $"); + RCSID("$Id: dynamic_load.c,v 1.63 2002/05/10 23:39:52 nilsson Exp $");      #else /* TESTING */      #include <stdio.h>      #endif /* !TESTING */      #ifdef HAVE_ERRNO_H   #include <errno.h>   #endif /* HAVE_ERRNO_H */
pike.git/src/dynamic_load.c:373:       void *module;    modfun init, exit;    struct module_list *new_module;    const char *module_name;       ONERROR err;       struct compilation_save save;    -  if(sp[-args].type != T_STRING) +  if(Pike_sp[-args].type != T_STRING)    Pike_error("Bad argument 1 to load_module()\n");    -  module_name = sp[-args].u.string->str; +  module_name = Pike_sp[-args].u.string->str;       /* Removing RTLD_GLOBAL breaks some PiGTK themes - Hubbe */    /* Using RTLD_LAZY is faster, but makes it impossible to    * detect linking problems at runtime..    */    module=dlopen(module_name,    RTLD_NOW /*|RTLD_GLOBAL*/ );       if(!module)    {    const char *err = dlerror();    if(!err) err = "Unknown reason"; -  if (sp[-args].u.string->len < 1024) { +  if (Pike_sp[-args].u.string->len < 1024) {    Pike_error("load_module(\"%s\") failed: %s\n", -  sp[-args].u.string->str, err); +  Pike_sp[-args].u.string->str, err);    } else {    Pike_error("load_module() failed: %s\n", err);    }    }       {    struct module_list *mp;    for (mp = dynamic_module_list; mp; mp = mp->next)    if (mp->module == module && mp->module_prog) {    pop_n_elems(args);
pike.git/src/dynamic_load.c:445:    save.lex = lex;    lex.current_line=1;    lex.current_file=make_shared_string("-");    save.compilation_depth=compilation_depth;    compilation_depth=-1;    start_new_program();       global_callable_flags|=CALLABLE_DYNAMIC;      #ifdef PIKE_DEBUG -  { struct svalue *save_sp=sp; +  { struct svalue *save_sp=Pike_sp;   #endif    SET_ONERROR(err, cleanup_compilation, &save);    (*(modfun)init)();    UNSET_ONERROR(err);   #ifdef PIKE_DEBUG -  if(sp != save_sp) +  if(Pike_sp != save_sp)    fatal("load_module(%s) left %ld droppings on stack!\n",    module_name, -  PTRDIFF_T_TO_LONG(sp - save_sp)); +  PTRDIFF_T_TO_LONG(Pike_sp - save_sp));    }   #endif       pop_n_elems(args);    push_program(end_program());    free_string(lex.current_file);    compilation_depth = save.compilation_depth;    lex = save.lex; -  add_ref(new_module->module_prog = sp[-1].u.program); +  add_ref(new_module->module_prog = Pike_sp[-1].u.program);   }      #endif /* USE_DYNAMIC_MODULES */         void init_dynamic_load(void)   {   #ifdef USE_DYNAMIC_MODULES    if (dlinit()) {