]> git.bitcoin.ninja Git - ldk-c-bindings/commitdiff
Swap include <> for include "" to make downstream Swift projects happy
authorMatt Corallo <git@bluematt.me>
Wed, 28 Jul 2021 00:45:46 +0000 (00:45 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 28 Jul 2021 00:46:31 +0000 (00:46 +0000)
genbindings.sh
ldk-net/ldk_net.h
lightning-c-bindings/cbindgen.toml

index 9aec12d7c8471775860bff6cee46c5afa76e00c1..7afc274efb2a21da6099b15b44f3368bfd452a4f 100755 (executable)
@@ -198,13 +198,13 @@ if [ "$HOST_PLATFORM" = "host: x86_64-apple-darwin" ]; then
 
        # stdlib.h doesn't exist in clang's wasm sysroot, and cbindgen
        # doesn't actually use it anyway, so drop the import.
-       sed -i '' 's/#include <stdlib.h>/#include <ldk_rust_types.h>/g' include/lightning.h
+       sed -i '' 's/#include <stdlib.h>/#include "ldk_rust_types.h"/g' include/lightning.h
 else
        sed -i 's/typedef LDKnative.*Import.*LDKnative.*;//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.
-       sed -i 's/#include <stdlib.h>/#include <ldk_rust_types.h>/g' include/lightning.h
+       sed -i 's/#include <stdlib.h>/#include "ldk_rust_types.h"/g' include/lightning.h
 fi
 
 # Finally, sanity-check the generated C and C++ bindings with demo apps:
index 258b5bab2cfb308bdcc43df647885453e4989051..f8b3edb05577d540671a2214fd0afe39b1e8576a 100644 (file)
@@ -1,4 +1,4 @@
-#include <lightning.h>
+#include "lightning.h"
 #include <sys/socket.h>
 /**
  * Initializes socket handling and spawns a background thread to handle socket
index bcbe2641dc4a39e161d877b98f14d22253c1a014..ec6c74d97cb08ee5fadb86fc9f28150be38d11e3 100644 (file)
@@ -1,7 +1,7 @@
 language = "C"
 include_guard = "LDK_C_BINDINGS_H"
 autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */"
-trailer = "#include <ldk_ver.h>"
+trailer = "#include \"ldk_ver.h\""
 include_version = true
 namespace = "LDK"