teptris 0.3.8.1-aarch64-linux → 0.3.10.1-aarch64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87985639c12a309f3f288d94bea237f409110b75f37291c2f02678d9ecdd4918
4
- data.tar.gz: 48c7978aa5bf2767962760075bb0eb6027a38aa91e6ea6aeef8276607e2f1468
3
+ metadata.gz: da812c6010055607d6e99407e425e033e8da2343095e9b31900443361d28bbae
4
+ data.tar.gz: 6104b851721bd4e1d3e6b70ace59e71e92b9a84e5d82b5ed57c71fcc2b4cab5c
5
5
  SHA512:
6
- metadata.gz: bbcf9e50a77e73daa30acf38f088fa2d22c1c573cb2cb4a38c8e6ae7208fe89d838fd2b2b20081caec64825a1ebd95368ae0a5addd418da6c3b19e14d0866924
7
- data.tar.gz: aca2678b80d723e94c4f6a57f326923a1d98f6f297814510405d6601f7abd43f3dccdfa7f4d9106176bf7cc64634aec4a4aa41f01cd1ebede33e3f5fa29354c8
6
+ metadata.gz: e38fdafe4dccb587ee9e22c6c21fe80a6eab365060f6d1467e4d5da44b74fd5b16162b2243cc4b16b166986bfefe29eb0677b0e4fed309fd9a78ea3c3495944d
7
+ data.tar.gz: 70c00185370383819c979dc79ab35d03b292594bd2383f8f813ed30e1ecbfc6f031e3db23e11552f7fd715d8bab84c2dfa0f0bdb61bc254e688f02321a4038b1
@@ -1,4 +1,4 @@
1
- # libteptris 0.3.8 — vendored source
1
+ # libteptris 0.3.10 — vendored source
2
2
 
3
3
  This directory carries the COMPLETE C source of the engine this
4
4
  gem's extension was built from (the packaging doctrine: compiled
@@ -4,6 +4,6 @@
4
4
  #define TEPTRIS_VERSION_MAJOR 0
5
5
  #define TEPTRIS_VERSION_MINOR 3
6
6
  #define TEPTRIS_VERSION_PATCH 0
7
- #define TEPTRIS_VERSION_STRING "0.3.8"
7
+ #define TEPTRIS_VERSION_STRING "0.3.10"
8
8
 
9
9
  #endif /* TEPTRIS_VERSION_H */
@@ -111,16 +111,28 @@ void teptris_writer_free(teptris_writer *w)
111
111
  static void w_take_key(teptris_writer *w, const char *k, size_t klen)
112
112
  {
113
113
  free(w->key);
114
- w->key = NULL;
115
- w->key_len = 0;
116
114
  if (klen > 0) {
117
115
  w->key = malloc(klen);
118
116
  if (w->key == NULL) {
117
+ w->key = NULL;
118
+ w->key_len = 0;
119
119
  w->st = TEPTRIS_ERR_ALLOC;
120
120
  return;
121
121
  }
122
122
  memcpy(w->key, k, klen);
123
123
  w->key_len = klen;
124
+ } else {
125
+ /* an empty key stays PENDING: NULL means "no key", and the
126
+ * keyed-prefix checks treat NULL as absent. The parse side
127
+ * accepts '' = 1, so the writer must emit it ('' via emit_key) */
128
+ w->key = malloc(1);
129
+ if (w->key == NULL) {
130
+ w->key_len = 0;
131
+ w->st = TEPTRIS_ERR_ALLOC;
132
+ return;
133
+ }
134
+ w->key[0] = '\0';
135
+ w->key_len = 0;
124
136
  }
125
137
  }
126
138
 
@@ -216,7 +228,8 @@ static void w_sep_val(teptris_writer *w, wframe *f)
216
228
  }
217
229
 
218
230
  /* emit "key = " in a section/inline-table context; arrays take bare
219
- * values with separators */
231
+ * values with separators; inline-table pairs take a ", " before every
232
+ * pair but the first */
220
233
  static void w_keyed_prefix(teptris_writer *w)
221
234
  {
222
235
  wframe *f = w->top;
@@ -224,6 +237,9 @@ static void w_keyed_prefix(teptris_writer *w)
224
237
  w_sep_val(w, f);
225
238
  return;
226
239
  }
240
+ if (f != NULL && f->kind == F_ITAB) {
241
+ w_sep_val(w, f);
242
+ }
227
243
  if (w->key == NULL) {
228
244
  w->st = TEPTRIS_ERR_ARG;
229
245
  return;
@@ -388,12 +404,6 @@ teptris_status teptris_writer_feed(teptris_writer *w, const uint8_t *ops,
388
404
  emit_dt(&w->out, &dt, (teptris_kind)kb);
389
405
  w_end_line(w);
390
406
  break;
391
- if (w->st != TEPTRIS_OK) {
392
- break;
393
- }
394
- emit_dt(&w->out, &dt, (teptris_kind)kb);
395
- w_end_line(w);
396
- break;
397
407
  }
398
408
  case W_BEGIN_TABLE: {
399
409
  wframe *t = w->top;
@@ -466,6 +476,9 @@ teptris_status teptris_writer_feed(teptris_writer *w, const uint8_t *ops,
466
476
  w->st = TEPTRIS_ERR_STATE;
467
477
  break;
468
478
  }
479
+ if (t != NULL && t->kind == F_ITAB) {
480
+ w_sep_val(w, t);
481
+ }
469
482
  emit_key(&w->out, (teptris_view){w->key, w->key_len});
470
483
  eb_put(&w->out, " = [", 4);
471
484
  w_clear_key(w);
@@ -493,6 +506,9 @@ teptris_status teptris_writer_feed(teptris_writer *w, const uint8_t *ops,
493
506
  w->st = TEPTRIS_ERR_STATE;
494
507
  break;
495
508
  }
509
+ if (t != NULL && t->kind == F_ITAB) {
510
+ w_sep_val(w, t);
511
+ }
496
512
  emit_key(&w->out, (teptris_view){w->key, w->key_len});
497
513
  eb_put(&w->out, " = ", 3);
498
514
  w_clear_key(w);
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Teptris
4
- VERSION = "0.3.8.1"
4
+ VERSION = "0.3.10.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8.1
4
+ version: 0.3.10.1
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - teptris contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-24 00:00:00.000000000 Z
11
+ date: 2026-10-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A native C extension over libteptris, a C99 TOML 1.1 parser/emitter.
14
14
  API shape mirrors the tomlib gem.