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 +4 -4
- data/ext/teptris_ext/engine/README.md +1 -1
- data/ext/teptris_ext/engine/src/include/teptris/version.h +1 -1
- data/ext/teptris_ext/engine/src/teptris/emit/writer.c +25 -9
- data/lib/teptris/3.3/teptris_ext.so +0 -0
- data/lib/teptris/3.4/teptris_ext.so +0 -0
- data/lib/teptris/4.0/teptris_ext.so +0 -0
- data/lib/teptris/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: da812c6010055607d6e99407e425e033e8da2343095e9b31900443361d28bbae
|
|
4
|
+
data.tar.gz: 6104b851721bd4e1d3e6b70ace59e71e92b9a84e5d82b5ed57c71fcc2b4cab5c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e38fdafe4dccb587ee9e22c6c21fe80a6eab365060f6d1467e4d5da44b74fd5b16162b2243cc4b16b166986bfefe29eb0677b0e4fed309fd9a78ea3c3495944d
|
|
7
|
+
data.tar.gz: 70c00185370383819c979dc79ab35d03b292594bd2383f8f813ed30e1ecbfc6f031e3db23e11552f7fd715d8bab84c2dfa0f0bdb61bc254e688f02321a4038b1
|
|
@@ -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
|
data/lib/teptris/version.rb
CHANGED
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.
|
|
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-
|
|
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.
|