X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fimport.c;fp=lib%2Fas3%2Fimport.c;h=c93826f91b49d16d66b3e6c3a8c5bbd1ad1b9aab;hb=a1dde8db3bde6aa26562dadae696d5d54ef752d2;hp=fb3c7de5b023a7680ea40e29aabacf95a551bf7c;hpb=3dea7306ae2c9590673c10dec1fbabcd6d7e1806;p=swftools.git diff --git a/lib/as3/import.c b/lib/as3/import.c index fb3c7de..c93826f 100644 --- a/lib/as3/import.c +++ b/lib/as3/import.c @@ -199,6 +199,16 @@ static void import_code(void*_abc, char*filename, int pass) trait->kind == TRAIT_GETTER) { s = (memberinfo_t*)varinfo_register_onclass(c, access, ns, name); s->type = resolve_class(filename, "type", trait->type_name); +#if 0 // some variables are apparently both a static const and a slot + // needs split of static/non-static first + } else if(trait->kind == TRAIT_CONST) { + varinfo_t*v = (varinfo_t*)varinfo_register_onclass(c, access, ns, name); + v->type = resolve_class(filename, "type", trait->type_name); + v->flags |= FLAG_CONST; + /* leave this alone for now- it blows up the file too much + v->value = constant_clone(trait->value);*/ + s = (memberinfo_t*)v; +#endif } else { goto cont; } @@ -252,6 +262,7 @@ static void import_code(void*_abc, char*filename, int pass) varinfo_t*v = varinfo_register_global(access, package, name); v->type = resolve_class(filename, "type", trait->type_name); v->value = constant_clone(trait->value); + v->flags |= trait->kind==TRAIT_CONST?FLAG_CONST:0; m = (memberinfo_t*)v; } m->flags |= FLAG_BUILTIN;