X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fimport.c;h=b8a72365c33dc18b81817170127d5146390e5836;hb=dd5f16e46f47e5833d68c75ecde8f33e0d1997fd;hp=061efdcbf38db8f9c097552540d76dd571640332;hpb=7b50420de50a9123799cf7a4d26daf8f2f3eeaa9;p=swftools.git diff --git a/lib/as3/import.c b/lib/as3/import.c index 061efdc..b8a7236 100644 --- a/lib/as3/import.c +++ b/lib/as3/import.c @@ -22,6 +22,8 @@ #include "import.h" #include "abc.h" #include "registry.h" +#include "common.h" +#include "common.h" #include "tokenizer.h" #include "../os.h" @@ -243,8 +245,10 @@ static void import_code(void*_abc, char*filename, int pass) m = (memberinfo_t*)methodinfo_register_global(access, package, name); m->return_type = resolve_class(filename, "return type", trait->method->return_type); } else { - m = (memberinfo_t*)varinfo_register_global(access, package, name); - m->type = resolve_class(filename, "type", trait->type_name); + varinfo_t*v = varinfo_register_global(access, package, name); + v->type = resolve_class(filename, "type", trait->type_name); + v->value = constant_clone(trait->value); + m = (memberinfo_t*)v; } m->flags |= FLAG_BUILTIN; m->parent = 0;