Branch: Tag:

2005-08-10

2005-08-10 11:55:49 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Moved handling of the UNDEFINED symbol from find_module_identifier() to resolve_identifier().
This should make global.UNDEFINED work.

Rev: src/program.c:1.595

2:   || 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: program.c,v 1.594 2005/06/23 13:33:03 grubba Exp $ + || $Id: program.c,v 1.595 2005/08/10 11:55:49 grubba Exp $   */      #include "global.h"
1451:    return 0;   }    - /*! @decl constant UNDEFINED -  *! -  *! The undefined value; ie a zero for which @[zero_type()] returns 1. -  */ -  +    struct node_s *resolve_identifier(struct pike_string *ident);      struct node_s *find_module_identifier(struct pike_string *ident,
1497:    }    }    +  return resolve_identifier(ident); + } +  + /*! @decl constant UNDEFINED +  *! +  *! The undefined value; ie a zero for which @[zero_type()] returns 1. +  */ +  + struct node_s *resolve_identifier(struct pike_string *ident) + {    /* Handle UNDEFINED */    if (ident == UNDEFINED_string) {    struct svalue s;
1506:    return mkconstantsvaluenode(&s);    }    -  return resolve_identifier(ident); - } -  - struct node_s *resolve_identifier(struct pike_string *ident) - { +     if(resolve_cache)    {    struct svalue *tmp=low_mapping_string_lookup(resolve_cache,ident);