size the thread and file arrays by their constants

An array of a header type takes a symbolic size now (sex#60). The
records holding them are pub, so their constants are too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-09 18:07:07 +03:00
parent d299ba05ac
commit 9bc1167782
3 changed files with 5 additions and 11 deletions

View File

@@ -323,9 +323,7 @@
(var n int 0)
(list-files root "" paths (& n))
(qsort paths n (sizeof [paths 0]) by-name)
;; TODO sex#60: size with MAX-DEPOSIT-FILES once arrays of a header
;; type take a symbolic size.
(var files [* cJSON 64])
(var files [* cJSON MAX-DEPOSIT-FILES])
(for (var f int 0) (< f n) (++ f)
(var path [char 1024])
(snprintf path (sizeof path) "%s/%s" root [paths f])