pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:678:    o);    if (source_cache)    source_cache[ret] = source;   #ifdef RECUR_COMPILE_DEBUG    DEC_MSG_DEPTH();    werror ("%*s<<< compile_string %O\n", GET_MSG_DEPTH, "", filename);   #endif    return ret;   }    + function compile_cb, unload_cb; +  + void register_compile_cb(function f) { +  compile_cb = f; + } +  + void register_program_unload(function f) { +  unload_cb = f; + } +  + // called from the compiler. you should never call this. + void compile_event(program p) { +  if (compile_cb) +  compile_cb(p); + } +  + int master_append_file(string name, string data) { +  object o=Files()->Fd(); +  int w; +  +  o->open(name, "awc"); +  w = o->write(data); +  destruct(o); +  return w; + } +    //!   string master_read_file(string file)   {    string x = find_handler_for_path(file);    if(x)    {    object h = fs_map[x];    file = file[sizeof(x)+1..];       if(h = h->open(fakeroot(file),"r") )
pike.git/lib/master.pike.in:1526:    return 0;   }      //   // This function is called by the compiler when a delayed compilation   // error occurs in the given program. It should remove all references   // to the program so that it can be freed.   //   void unregister(program p)   { +  if (unload_cb) unload_cb(p);    // werror("Unregistering %O...\n", p);    if(string fname=rev_programs[p] || search(programs,p)) {    resolv_debug("unregister %s\n", fname);    if (m_delete (rev_programs, p))    m_delete (programs, fname);    else    programs[fname] = no_value;       string name = program_path_to_name (fname);    mixed n = has_value (name, ".") ?