teptris 0.3.16.0-x86_64-linux → 0.3.18.0-x86_64-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/edit/edit.c +40 -0
- 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: 00b208f7ca756aada62c394067ed822aaf314679de0dc0a9c9fe8a21395c4e29
|
|
4
|
+
data.tar.gz: bf38be783094a28c2d20ad8563787613344da0608210ecd7384990beadfe4084
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c8a4c20d4aaeb2b04f3e57ecda2dfc073dbd13d0bb9c78737d7e126c9b274083f15097fa091e12a88096ddc31256bd8d6afe68373a5d67e3a8f66d564f1b73d5
|
|
7
|
+
data.tar.gz: e0398b8b4fd3c2690d09f6885847f476c407e1f6d9e9932ab16a606345acc377beb2a7ce77681cbd15822f9c2491ff800df3b66719f077585e47222cf668a0a7
|
|
@@ -325,6 +325,34 @@ static int edit_section_matches(const char *prefix, size_t prefix_len,
|
|
|
325
325
|
return memcmp(sec, ps, prefix_len) == 0;
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
+
/* Raw-textual check: does the target keypath, after its trimmed
|
|
329
|
+
* section prefix, CONTINUE the open section? [items] + target
|
|
330
|
+
* "items.a.b" -> the line may write "a.b" or "b"; this yields "a.b".
|
|
331
|
+
* Canonical-textual only (quoting variants do not match), consistent
|
|
332
|
+
* with edit_section_matches. */
|
|
333
|
+
static int edit_strip_section_prefix(const char *keypath, size_t klen,
|
|
334
|
+
const char *sec, size_t sec_len,
|
|
335
|
+
const char **rest, size_t *rest_len)
|
|
336
|
+
{
|
|
337
|
+
while (klen > 0 && edit_is_ws(keypath[0])) {
|
|
338
|
+
keypath++;
|
|
339
|
+
klen--;
|
|
340
|
+
}
|
|
341
|
+
while (klen > 0 && edit_is_ws(keypath[klen - 1])) {
|
|
342
|
+
klen--;
|
|
343
|
+
}
|
|
344
|
+
if (sec_len == 0 || klen <= sec_len) {
|
|
345
|
+
return 0;
|
|
346
|
+
}
|
|
347
|
+
if (keypath[sec_len] != '.' ||
|
|
348
|
+
memcmp(keypath, sec, sec_len) != 0) {
|
|
349
|
+
return 0;
|
|
350
|
+
}
|
|
351
|
+
*rest = keypath + sec_len + 1;
|
|
352
|
+
*rest_len = klen - sec_len - 1;
|
|
353
|
+
return *rest_len > 0;
|
|
354
|
+
}
|
|
355
|
+
|
|
328
356
|
teptris_status teptris_edit_scalar(const char *src, size_t len,
|
|
329
357
|
const char *keypath,
|
|
330
358
|
const char *replacement,
|
|
@@ -396,6 +424,18 @@ teptris_status teptris_edit_scalar(const char *src, size_t len,
|
|
|
396
424
|
edit_section_matches(pfx, pfx_len, sec, sec_len)) {
|
|
397
425
|
after = edit_match_path(t, le, lastc, last_len);
|
|
398
426
|
}
|
|
427
|
+
if (after == NULL && sec_len > 0) {
|
|
428
|
+
/* the line writes a dotted path that CONTINUES
|
|
429
|
+
* the open section: "a.b = 1" under [items]
|
|
430
|
+
* with target "items.a.b" */
|
|
431
|
+
const char *rest;
|
|
432
|
+
size_t rest_len;
|
|
433
|
+
if (edit_strip_section_prefix(keypath, klen, sec,
|
|
434
|
+
sec_len, &rest,
|
|
435
|
+
&rest_len)) {
|
|
436
|
+
after = edit_match_path(t, le, rest, rest_len);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
399
439
|
}
|
|
400
440
|
if (after != NULL) {
|
|
401
441
|
const char *eq = edit_skip_ws(after, le);
|
|
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.18.0
|
|
5
5
|
platform: x86_64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- teptris contributors
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-01 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.
|