pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:5505: Inside #if defined(PROGRAM_BUILD_DEBUG)
   putc ('\n', stderr);    }   #endif       ret=low_define_variable(n,t,flags|ID_USED,offset,run_time_type);    free_string(n);    free_type(t);    return ret;   }    + int is_auto_variable_type( int variable ) + { +  struct identifier *id=ID_FROM_INT(Pike_compiler->new_program,variable); +  if( id && id->type->type == PIKE_T_AUTO ) +  return 1; +  return 0; + } +  + void fix_auto_variable_type( int variable, struct pike_type *type ) + { +  /* Update the type of a program variable (basically, if it's +  * marked 'auto', set it to the given type) +  */ +  struct identifier *id=ID_FROM_INT(Pike_compiler->new_program,variable); +  if( id ) +  { +  free_type(id->type); +  copy_pike_type(id->type, type); +  } +  return; + } +    /* 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))