pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1:   // -*- Pike -*-   //   // Master Control Program for Pike.   //   // 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: master.pike.in,v 1.419 2008/05/18 15:46:05 grubba Exp $ + // $Id: master.pike.in,v 1.420 2008/05/19 22:03:11 grubba Exp $      #pike __REAL_VERSION__   //#pragma strict_types      // Some programs destroys character pairs beginning with the currency   // symbol when running in chinese locale.   #if "ยค/" != "\244/"   #error "master.pike.in is corrupted."   #endif   
pike.git/lib/master.pike.in:4350:    }    }       if (what->_encode) {    ENC_MSG (" object got _encode function - encoding recursively\n");    return UNDEFINED;    }       if (function|program prog = object_program (what)) {    ENC_MSG (" got program of object: %O\n", prog); -  if (object|program parent = function_object (prog) || function_program (prog)) { +  object|program parent; +  if (!(parent = function_object (prog) || function_program (prog))) { +  // Check if prog is in a module directory. +  if (string path = programs_reverse_lookup (prog)) { +  path = combine_path(path, ".."); +  ENC_MSG (" found parent path in programs: %O\n", path); +  parent = fc[path]; +  } +  } +  if (parent) {    ENC_MSG (" got parent of program: %O\n", parent);    // We're going to subindex the parent so we ask for the    // module object and not the program. That since we'll    // always be able to do a better job if we base the indexing    // on objects.    array parent_object = ({0});    string|array parent_name = nameof (parent, parent_object);    if (!parent_name) {    ENC_MSG (" inside the thing to encode - encoding recursively\n");    return UNDEFINED;