pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:5461:    free_type(t);    return ret;   }      /* argument must be a shared string */   int define_variable(struct pike_string *name,    struct pike_type *type,    INT32 flags)   {    int n, run_time_type; +  int no_this = 0;      #ifdef PIKE_DEBUG    if(name!=debug_findstring(name))    Pike_fatal("define_variable on nonshared string.\n");   #endif      #ifdef PROGRAM_BUILD_DEBUG    {    struct compilation *c = THIS_COMPILATION;    struct pike_string *d = describe_type (type);
pike.git/src/program.c:5590:    }    }       if (flags & ID_EXTERN) {    run_time_type = PIKE_T_FREE;    } else {    run_time_type=compile_type_to_runtime_type(type);       switch(run_time_type)    { -  case T_INT: +     case T_OBJECT:    /* Make place for the object subtype. */    case T_FUNCTION: -  +  no_this = 1; +  case T_INT:    case T_PROGRAM:    run_time_type = T_MIXED;    }    }       n=low_define_variable(name,type,flags,    low_add_storage(sizeof_variable(run_time_type),    alignof_variable(run_time_type),0),    run_time_type);    -  +  if( no_this )    ID_FROM_INT(Pike_compiler->new_program, n)->identifier_flags |= IDENTIFIER_NO_THIS_REF;       return n;   }      PMOD_EXPORT int simple_add_variable(const char *name,    const char *type,    INT32 flags)   {    INT32 ret;