pike.git / src / dynamic_load.c

version» Context lines:

pike.git/src/dynamic_load.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: dynamic_load.c,v 1.79 2004/03/22 17:42:07 mast Exp $ + || $Id: dynamic_load.c,v 1.80 2004/04/14 19:05:26 grubba Exp $   */      #ifdef TESTING   #define NO_PIKE_INCLUDES   #define CREATE_MAIN   #define NO_PIKE_GUTS   #endif      #ifndef NO_PIKE_INCLUDES   # include "global.h"   # include "interpret.h"   # 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"   # include "object.h"    - RCSID("$Id: dynamic_load.c,v 1.79 2004/03/22 17:42:07 mast Exp $"); + RCSID("$Id: dynamic_load.c,v 1.80 2004/04/14 19:05:26 grubba 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:580:    }   #endif       pop_n_elems(args);    {    struct program *p = end_program();    free_string(lex.current_file);    compilation_depth = save.compilation_depth;    lex = save.lex;    if (p) { +  if (p->num_identifier_references) {    push_program(p);    add_ref(new_module->module_prog = Pike_sp[-1].u.program);    } else { -  +  /* No identifier references -- Disabled module. */ +  free_program(p); +  push_undefined(); +  } +  } else {    /* Initialization failed. */    new_module->exit();    dlclose(module);    dynamic_module_list = new_module->next;    free(new_module);    if (strlen(module_name->str) < 1024) {    Pike_error("Failed to initialize dynamic module \"%s\".\n",    module_name->str);    } else {    Pike_error("Failed to initialize dynamic module.\n");