give importers the private macros a pub one expands into

Only pub macros crossed, so one built on a private macro expanded in
the importer into a call of a C function nothing defines.
This commit is contained in:
2026-10-16 17:04:20 +03:00
parent 669b3cdc7b
commit eafa11a5be
4 changed files with 42 additions and 3 deletions

View File

@@ -2,3 +2,8 @@
(pub fn page-after ((p page)) page
(return #(page : (+ (. p number) 1))))
;;; number-of is private, but page-number expands into it, so importers
;;; are given both, the way a C header carries a helper macro too
(defmacro (number-of p) `(. ,p number))
(pub defmacro (page-number p) `(number-of ,p))