pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:4534:    return BASENAME(s);       return search(all_constants(), p);   }      //!   string describe_function (function f)   {    if (!f) return 0;    +  object o = function_object([function(mixed...:void|mixed)]f); +  if (o && (object_program(o) == _disable_threads)) { +  // Special case to avoid the search() below, which +  // can call `==(), which will fail hard in this case. +  return "_disable_threads()->__EVENT_HANDLER__"; +  } +     string name;       if (name = search(all_constants(), f)) return name;       if(string s = programs_reverse_lookup (f))    {    if(has_suffix(s, ".pmod"))    name = BASENAME(s[..<5]);    else    name = trim_file_name(s);    }    else    if (catch (name = function_name (f))) name = "function";    -  object o = function_object([function(mixed...:void|mixed)]f); +     if(object_program (o)) { // Check if it's an object in a way that    // (hopefully) doesn't call any functions    // in it (neither `== nor `!).    string s;    if (!catch (s = sprintf("%O",o)) && s != "object")    return s+"->"+name;    }    return name;   }