txlyre 14 цаг өмнө
parent
commit
b8111ff0e1
2 өөрчлөгдсөн 14 нэмэгдсэн , 14 устгасан
  1. 7 7
      qistd.c
  2. 7 7
      std.qi

+ 7 - 7
qistd.c

@@ -2300,7 +2300,7 @@ return table;
 }
 inline static qi_table_t *__qistd387(qi_state_t *state) {
 qi_table_t *table = qi_table_make();
-qi_table_set(table, "__type", qi_make_function(state, "<anon>", 1, __qistd388, __qistd390(state)));
+qi_table_set(table, qi_to_string(state, qi_make_string(state, "__type"))->value.string, qi_make_function(state, "<anon>", 1, __qistd388, __qistd390(state)));
 return table;
 }
 inline static qi_list_t *__qistd393(qi_state_t *state) {
@@ -2361,12 +2361,12 @@ return table;
 }
 inline static qi_table_t *__qistd379(qi_state_t *state) {
 qi_table_t *table = qi_table_make();
-qi_table_set(table, "__type", qi_make_function(state, "<anon>", 1, __qistd380, __qistd382(state)));
-qi_table_set(table, "mt", qi_get(state, "mt"));
-qi_table_set(table, "super", qi_get(state, "p"));
-qi_table_set(table, "t", qi_get(state, "t"));
-qi_table_set(table, "__str", qi_make_function(state, "<anon>", 1, __qistd383, __qistd385(state)));
-qi_table_set(table, "__call", qi_make_function(state, "<anon>", 2, __qistd386, __qistd397(state)));
+qi_table_set(table, qi_to_string(state, qi_make_string(state, "t"))->value.string, qi_get(state, "t"));
+qi_table_set(table, qi_to_string(state, qi_make_string(state, "mt"))->value.string, qi_get(state, "mt"));
+qi_table_set(table, qi_to_string(state, qi_make_string(state, "super"))->value.string, qi_get(state, "p"));
+qi_table_set(table, qi_to_string(state, qi_make_string(state, "__type"))->value.string, qi_make_function(state, "<anon>", 1, __qistd380, __qistd382(state)));
+qi_table_set(table, qi_to_string(state, qi_make_string(state, "__str"))->value.string, qi_make_function(state, "<anon>", 1, __qistd383, __qistd385(state)));
+qi_table_set(table, qi_to_string(state, qi_make_string(state, "__call"))->value.string, qi_make_function(state, "<anon>", 2, __qistd386, __qistd397(state)));
 return table;
 }
 inline static qi_list_t *__qistd378(qi_state_t *state) {

+ 7 - 7
std.qi

@@ -423,14 +423,14 @@ set_pseudomethod("string.tolower", str_tolower)
 func Object(t, p=nil): return p !is nil? set_meta_table(p, get_meta_table(p) + t): set_meta_table({}, t)
 func is_object(o): return has_meta_table(o)
 func __class_wrapper(n, p, t, mt, st): return Object(st + {
-    t: t,
-    mt: mt,
-    super: p,
-    __type: func (this) use (n): return n,
-    __str: func (this) use (n): return "<class " + n + ">",
-    __call: func (this, pargs) use (n, p) {
+    "t": t,
+    "mt": mt,
+    "super": p,
+    "__type": func (this) use (n): return n,
+    "__str": func (this) use (n): return "<class " + n + ">",
+    "__call": func (this, pargs) use (n, p) {
         var t = {}
-        var mt = { __type: func (this) use (n): n }
+        var mt = { "__type": func (this) use (n): n }
         for var other of p {
             t += other.t
             mt += other.mt