fixed bug in jpeg2000 decoding
[swftools.git] / lib / as3 / pool.h
index 09e7377..632fa7f 100644 (file)
@@ -80,23 +80,27 @@ CONSTANT_NAMESPACE_PROTECTED=0x18,
 CONSTANT_NAMESPACE_EXPLICIT=0x19,
 CONSTANT_NAMESPACE_STATICPROTECTED=0x1A,
 CONSTANT_NAMESPACE_PRIVATE=0x05,
+CONSTANT_UNKNOWN=0x55, /*used internally */
 } 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);
-constant_t* constant_new_string(char*s);
+constant_t* constant_new_string(const char*s);
 constant_t* constant_new_string2(const char*s, int len);
 constant_t* constant_new_namespace(namespace_t*ns);
 constant_t* constant_new_true();
@@ -120,7 +124,8 @@ typedef enum multiname_type
  RTQNAMELA=0x12,
  MULTINAMEA=0x0E,
  MULTINAMELA=0x1C,
- POSTFIXTYPE=0x1D
+ POSTFIXTYPE=0x1D,
+ ZERONAMESPACE=0
 } multiname_type_t;
 
 char* access2str(int type);