Skip to content

Commit 5023828

Browse files
committed
FIX: generated RL defines were not counting with possibility of variadic arguments (like in RL_PRINT)
1 parent cd463fe commit 5023828

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

make/tools/make-reb-lib.reb

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,12 @@ memit: func [d /nol] [
4848
]
4949

5050
count: func [s c /local n] [
51+
s: trim/all copy s
5152
if find ["()" "(void)"] s [return "(void)"]
5253
out: copy "(a"
5354
n: 1
5455
while [s: find/tail s c][
55-
repend out [#"," #"a" + n]
56+
repend out [#"," either s = "...)" ["__VA_ARGS__"][#"a" + n]]
5657
n: n + 1
5758
]
5859
append out ")"

0 commit comments

Comments
 (0)