From 5ed40760d7e99198848633f5ea3dbb60871591e7 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 30 Jul 2023 03:36:56 +0000 Subject: [PATCH] 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. --- genbindings.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/genbindings.sh b/genbindings.sh index c502598..f105816 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -232,7 +232,7 @@ if is_gnu_sed; then sed -i 's/typedef LDKnative.*Import.*LDKnative.*;//g' include/lightning.h # UnsafeCell is `repr(transparent)` so should be ignored here - sed -i 's/LDKUnsafeCell<\(.*\)> /\1 /g' include/lightning.h + sed -i 's/LDKUnsafeCell<\(.*\)> /struct \1 /g' include/lightning.h # stdlib.h doesn't exist in clang's wasm sysroot, and cbindgen # doesn't actually use it anyway, so drop the import. @@ -242,7 +242,7 @@ else sed -i '' 's/typedef LDKnative.*Import.*LDKnative.*;//g' include/lightning.h # UnsafeCell is `repr(transparent)` so should be ignored by cbindgen - sed -i '' 's/LDKUnsafeCell<\(.*\)> /\1 /g' include/lightning.h + sed -i '' 's/LDKUnsafeCell<\(.*\)> /struct \1 /g' include/lightning.h # stdlib.h doesn't exist in clang's wasm sysroot, and cbindgen # doesn't actually use it anyway, so drop the import. -- 2.30.2