txlyre 2 dienas atpakaļ
vecāks
revīzija
40ae29c992
1 mainītis faili ar 13 papildinājumiem un 0 dzēšanām
  1. 13 0
      qirt.c

+ 13 - 0
qirt.c

@@ -4161,6 +4161,19 @@ static void qi_state_setup(qi_state_t *state) {
   state->intern_strs = qi_table_make();
   state->intern_strs_mutex = qi_mutex_create();
 
+  for (unsigned char c = 1; c < 255; c++) {
+    char buf[2];
+    buf[0] = c;
+    buf[1] = 0;
+
+    char *s = qi_strdup(buf);
+
+    qi_value_t *value = qi_make_value(QI_STRING);
+    value->value.string = s;
+
+    qi_table_set(state->intern_strs, s, value);
+  }
+
   state->pseudomethods = qi_table_make();
   state->pseudomethods_mutex = qi_mutex_create();