Skip to content

Commit 5ed4076

Browse files
committed
Include a struct before trait return fields
EIther `struct Type` or `Type` work fine because of our type declarations, but cbindgen uses `struct Type` everywhere so its easiest if we match it, especially for downstream code.
1 parent 3e06be9 commit 5ed4076

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

genbindings.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ if is_gnu_sed; then
232232
sed -i 's/typedef LDKnative.*Import.*LDKnative.*;//g' include/lightning.h
233233

234234
# UnsafeCell is `repr(transparent)` so should be ignored here
235-
sed -i 's/LDKUnsafeCell<\(.*\)> /\1 /g' include/lightning.h
235+
sed -i 's/LDKUnsafeCell<\(.*\)> /struct \1 /g' include/lightning.h
236236

237237
# stdlib.h doesn't exist in clang's wasm sysroot, and cbindgen
238238
# doesn't actually use it anyway, so drop the import.
@@ -242,7 +242,7 @@ else
242242
sed -i '' 's/typedef LDKnative.*Import.*LDKnative.*;//g' include/lightning.h
243243

244244
# UnsafeCell is `repr(transparent)` so should be ignored by cbindgen
245-
sed -i '' 's/LDKUnsafeCell<\(.*\)> /\1 /g' include/lightning.h
245+
sed -i '' 's/LDKUnsafeCell<\(.*\)> /struct \1 /g' include/lightning.h
246246

247247
# stdlib.h doesn't exist in clang's wasm sysroot, and cbindgen
248248
# doesn't actually use it anyway, so drop the import.

0 commit comments

Comments
 (0)