fixed staticself.as testcase
[swftools.git] / lib / as3 / mklib.c
index feafada..1204ed8 100644 (file)
@@ -122,9 +122,10 @@ char*mktype(slotinfo_t*s)
         return "classinfo_t";
     } else if(s->kind == INFOTYPE_METHOD) {
         return "methodinfo_t";
-    } else if(s->kind == INFOTYPE_SLOT) {
+    } else if(s->kind == INFOTYPE_VAR) {
         return "varinfo_t";
     }
+    return "**ERROR**";
 }
 
 void write_slotinfo(FILE*fi, slotinfo_t*s, char*id, char*prefix);
@@ -200,7 +201,7 @@ void write_constant(FILE*fi, constant_t*value, char*id, char*prefix)
 
 void write_slotinfo(FILE*fi, slotinfo_t*s, char*id, char*prefix)
 {
-    if(s->kind == INFOTYPE_SLOT) {
+    if(s->kind == INFOTYPE_VAR) {
         varinfo_t*v = (varinfo_t*)s;
         if(v->value) {
             write_constant(fi, v->value, id, prefix);
@@ -239,7 +240,7 @@ void write_slotinfo(FILE*fi, slotinfo_t*s, char*id, char*prefix)
         fprintf(fi, "0"); // params TODO
         fprintf(fi, "};\n");
     }
-    if(s->kind == INFOTYPE_SLOT) {
+    if(s->kind == INFOTYPE_VAR) {
         varinfo_t*m = (varinfo_t*)s;
         fprintf(fi, "%s, ", mkptr(m->type));
         fprintf(fi, "%s, ", mkptr(m->parent));
@@ -310,5 +311,5 @@ int main()
     fprintf(fi, "    _Infinity_constant.f = __builtin_inf();\n");
     fprintf(fi, "    return d;\n");
     fprintf(fi, "}\n");
-
+    return 0;
 }