pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:18:   #include "error.h"   #include "operators.h"   #include "builtin_functions.h"   #include "module_support.h"   #include "fsort.h"   #include "threads.h"   #include "stuff.h"   #include "version.h"   #include "bignum.h"    - RCSID("$Id: encode.c,v 1.51 1999/12/11 01:14:56 grubba Exp $"); + RCSID("$Id: encode.c,v 1.52 1999/12/19 15:52:32 grubba Exp $");      /* #define ENCODE_DEBUG */      #ifdef ENCODE_DEBUG   #define EDB(X) X   #else   #define EDB(X)   #endif      #ifdef _AIX
pike.git/src/encode.c:884:    switch(sp[-1].type)    {    case T_INT:    push_type_int(0);    break;       case T_PROGRAM:    push_type_int(sp[-1].u.program->id);    break;    +  case T_FUNCTION: +  { +  struct program *prog; +  if (sp[-1].subtype == FUNCTION_BUILTIN) { +  error("Failed to decode object type.\n"); +  } +  prog = program_from_svalue(sp-1); +  if (!prog) { +  error("Failed to decode object type.\n"); +  } +  push_type_int(prog->id); +  } +  break; +     default:    error("Failed to decode type "    "(object(%s), expected object(zero|program)).\n",    get_name_of_type(sp[-1].type));    }    pop_stack();    type_stack_reverse();    }    }