teptris 0.3.16.0-powerpc64le-linux → 0.3.18.0-powerpc64le-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: e7014fd08a1aea7e068e86c12a08fdedef5dc96a1ae79a75d38e5a04f5618394
4
- data.tar.gz: ba69a63deb56fc7d14066a4d839ae1527b80b63ca820a661141a104bc8d384be
3
+ metadata.gz: 1b6cf7a77f13ab6fe8cedca06944a00cd07e39d781ff3de0ae6b8716cb49f473
4
+ data.tar.gz: 22f84ac5a351ab0c0fee68b240415c7429842dbfbda4a5d9a2ab1865561ad8cc
5
5
  SHA512:
6
- metadata.gz: b20be14015d5cde56d6ed741a82dde8c5640b989afab19472953dc659a6a9464474af4310632d8ca77c41032d05d2520911c05e44872c560ef7c91c602234809
7
- data.tar.gz: 0eec3ab2bc49d2e3922a8c43cab6bf5fe7d86bd4254b6b02ccdb25faa73f12aebe815c57bd4c9ea8fb9a0c616344aef5eb481bcc23a14163ed00fd957fd20a45
6
+ metadata.gz: b16035959b12ba89fe1d350ff82e5216d6044e8774af70f85fbdbb89b3dec9163f1a7b00d6060d590feb91e79f35d7edeb1832cb7c5bd3804b65b409fb5bfc25
7
+ data.tar.gz: 97476c4363650da537d0a4a5b45ab0e69be8b6d0fa3208b421256d4ea120fa5b1faac161d2c205658ab418e0fdd9c1dc079e98b549966e941a2f622bda37ea32
@@ -1,4 +1,4 @@
1
- # libteptris 0.3.16 — vendored source
1
+ # libteptris 0.3.18 — 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.16"
7
+ #define TEPTRIS_VERSION_STRING "0.3.18"
8
8
 
9
9
  #endif /* TEPTRIS_VERSION_H */
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Teptris
4
- VERSION = "0.3.16.0"
4
+ VERSION = "0.3.18.0"
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.16.0
4
+ version: 0.3.18.0
5
5
  platform: powerpc64le-linux
6
6
  authors:
7
7
  - teptris contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-31 00:00:00.000000000 Z
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.