pike.git/
src/
encode.c
Branch:
Tag:
Non-build tags
All tags
No tags
2009-08-19
2009-08-19 18:31:34 by Henrik Grubbström (Grubba) <grubba@grubba.org>
49a344b4484fdffff622fb9382a51b58a085ab98 (
19
lines) (+
17
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
encode_value() now knows more about overloading of variables.
Rev: src/encode.c:1.292
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: encode.c,v 1.
291
2009/08/
18
13
:
57
:
16
grubba Exp $
+
|| $Id: encode.c,v 1.
292
2009/08/
19
18:
31
:
34
grubba Exp $
*/ #include "global.h"
1332:
int inherit_num = 1; struct svalue str_sval; char *id_dumped = (char *) alloca(p->num_identifiers);
+
int d_min = 0;
MEMSET(id_dumped,0,p->num_identifiers); str_sval.type = T_STRING; str_sval.subtype = 0;
1615:
/* Not supported. */ Pike_error("Cannot encode functions implemented in C " "(identifier=\"%S\").\n",
-
p
->
identifiers[d].
name);
+
id
->name);
break; case IDENTIFIER_VARIABLE:
-
+
if (d < d_min) {
EDB(3,
-
+
fprintf(stderr, "%*sencode: Skipping overloaded variable \"%s\"\n",
+
data->depth, "",
+
id->name->str));
+
/* We still want to dump it later... */
+
id_dumped[ref->identifier_offset] = 0;
+
goto next_identifier_ref;
+
}
+
EDB(3,
fprintf(stderr, "%*sencode: encoding variable\n", data->depth, "")); encode_entry_variable:
1679:
struct reference *ref = p->identifier_references + d; int i;
+
/* The references from this inherit stop at this point. */
+
d_min = inh->identifier_level +
+
inh->prog->num_identifier_references;
+
EDB(3, fprintf(stderr, "%*sencode: encoding inherit\n", data->depth, ""));