X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fpool.h;h=24a9478c98c548d6f16bdbb877c1d9d538444ccd;hb=36a1fac8ea3a7457f25b1b4209b5fc918cc6af44;hp=06fff7576fc170dff9d21e2597ff528e9b4fc6dc;hpb=3a6bca721cad44853f77a3e76f937d0ef5ff7bf5;p=swftools.git diff --git a/lib/as3/pool.h b/lib/as3/pool.h index 06fff75..24a9478 100644 --- a/lib/as3/pool.h +++ b/lib/as3/pool.h @@ -82,17 +82,20 @@ CONSTANT_NAMESPACE_STATICPROTECTED=0x1A, CONSTANT_NAMESPACE_PRIVATE=0x05, } contant_type_t; +#define NS_TYPE(x) ((x) == 0x08 || (x) == 0x16 || (x) == 0x17 || (x) == 0x18 || (x) == 0x19 || (x) == 0x1a || (x) == 0x05) + struct _constant { + int type; union { + string_t* s; + namespace_t*ns; double f; int i; unsigned int u; - string_t* s; - namespace_t*ns; }; - int type; }; +constant_t* constant_clone(); constant_t* constant_new_int(int x); constant_t* constant_new_uint(unsigned int x); constant_t* constant_new_float(double x); @@ -127,7 +130,7 @@ char* access2str(int type); struct _namespace { U8 access; - char*name; + const char*name; }; struct _namespace_set { namespace_list_t*namespaces; @@ -178,6 +181,7 @@ int pool_register_multiname2(pool_t*pool, char*name); /* creation */ namespace_t* namespace_new(U8 access, const char*name); +namespace_t* namespace_new_namespace(const char*name); namespace_t* namespace_new_package(const char*name); namespace_t* namespace_new_packageinternal(const char*name); namespace_t* namespace_new_protected(const char*name);