Branch: Tag:

2008-06-28

2008-06-28 22:05:04 by Martin Stjernholm <mast@lysator.liu.se>

Some more static -> protected.

Rev: src/builtin.cmod:1.216
Rev: src/builtin_functions.c:1.677
Rev: src/iterators.cmod:1.69
Rev: src/language.yacc:1.438
Rev: src/mklibpike.pike:1.5
Rev: src/operators.c:1.235
Rev: src/threads.c:1.258

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: language.yacc,v 1.437 2008/06/26 12:47:10 grubba Exp $ + || $Id: language.yacc,v 1.438 2008/06/28 22:05:04 mast Exp $   */      %pure_parser
4586:    * 'type' and 'initializer', but not to 'name'.    * Note also that 'initializer' may be NULL.    */ - static node *add_static_variable(struct pike_string *name, + static node *add_protected_variable(struct pike_string *name,    struct pike_type *type,    int depth,    node *initializer)
4610:    struct pike_string *tmp_name;    while (i--) {    if (!p->previous) { -  my_yyerror("Too many levels of static (%d, max:%d).", +  my_yyerror("Too many levels of protected (%d, max:%d).",    depth, depth - (i+1));    parent_depth -= i+1;    break;
4621:       tmp_name = get_new_name();    id = define_parent_variable(p, tmp_name, type, -  ID_STATIC|ID_PRIVATE|ID_INLINE); +  ID_PROTECTED|ID_PRIVATE|ID_INLINE);    free_string(tmp_name);    if (id >= 0) {    if (def) {
4643:    f->min_number_of_locals = id+1;    if (initializer) {    /* FIXME! */ -  yyerror("Initializers not yet supported for static variables with function scope."); +  yyerror("Initializers not yet supported for protected variables with function scope.");    }    n = mklocalnode(id, depth);    }