Skip to content

Commit e434f3b

Browse files
authoredMar 20, 2024··
Merge pull request #155 from TheBlueMatt/main
Cut 0.0.121.3
2 parents e4d9e84 + 916f358 commit e434f3b

23 files changed

+27
-24
lines changed
 

‎.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ jobs:
576576
android:
577577
runs-on: ubuntu-latest
578578
# Frankly, I'm not really sure why debian and ubuntu differ in the results here, they really shouldn't
579-
container: debian:bullseye
579+
container: debian:bookworm
580580
strategy:
581581
fail-fast: false
582582
steps:

‎genbindings.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,12 @@ fi
8181

8282
COMMON_COMPILE="$CC -std=c11 -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers -Wno-unused-function -Wno-nullability-completeness -Wno-pointer-sign -Wdate-time -ffile-prefix-map=$(pwd)="
8383
COMMON_CC=""
84-
if [[ "$TARGET_STRING" != *"android" ]]; then
85-
[[ "$TARGET_STRING" != "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING -mcpu=$LDK_TARGET_CPU"
86-
[[ "$TARGET_STRING" = "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING -march=$LDK_TARGET_CPU -mtune=$LDK_TARGET_CPU"
84+
if [[ "$TARGET_STRING" != *"android" && "$TARGET_STRING" != *"androideabi" ]]; then
85+
[[ "$TARGET_STRING" != "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING"
86+
[[ "$TARGET_STRING" = "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING"
8787
fi
88+
[[ "$TARGET_STRING" != "x86"* ]] && COMMON_CC="$COMMON_CC -mcpu=$LDK_TARGET_CPU"
89+
[[ "$TARGET_STRING" = "x86"* ]] && COMMON_CC="$COMMON_CC -march=$LDK_TARGET_CPU -mtune=$LDK_TARGET_CPU"
8890
[ "$IS_MAC" = "true" -a "$MACOS_SDK" != "" ] && COMMON_COMPILE="$COMMON_COMPILE -isysroot $MACOS_SDK"
8991

9092
DEBUG_ARG="$3"

‎src/main/java/org/ldk/enums/BlindedFailure.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ public enum BlindedFailure {
1616
*/
1717
LDKBlindedFailure_FromBlindedNode,
1818
; static native void init();
19-
static { init(); }
19+
static { org.ldk.impl.bindings.run_statics(); init(); }
2020
}

‎src/main/java/org/ldk/enums/Bolt11SemanticError.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ public enum Bolt11SemanticError {
4747
*/
4848
LDKBolt11SemanticError_ImpreciseAmount,
4949
; static native void init();
50-
static { init(); }
50+
static { org.ldk.impl.bindings.run_statics(); init(); }
5151
}

‎src/main/java/org/ldk/enums/Bolt12SemanticError.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,5 @@ public enum Bolt12SemanticError {
113113
*/
114114
LDKBolt12SemanticError_MissingSignature,
115115
; static native void init();
116-
static { init(); }
116+
static { org.ldk.impl.bindings.run_statics(); init(); }
117117
}

‎src/main/java/org/ldk/enums/COption_NoneZ.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ public enum COption_NoneZ {
1313
*/
1414
LDKCOption_NoneZ_None,
1515
; static native void init();
16-
static { init(); }
16+
static { org.ldk.impl.bindings.run_statics(); init(); }
1717
}

‎src/main/java/org/ldk/enums/ChannelMonitorUpdateStatus.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,5 @@ public enum ChannelMonitorUpdateStatus {
7474
*/
7575
LDKChannelMonitorUpdateStatus_UnrecoverableError,
7676
; static native void init();
77-
static { init(); }
77+
static { org.ldk.impl.bindings.run_statics(); init(); }
7878
}

‎src/main/java/org/ldk/enums/ChannelShutdownState.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ public enum ChannelShutdownState {
3232
*/
3333
LDKChannelShutdownState_ShutdownComplete,
3434
; static native void init();
35-
static { init(); }
35+
static { org.ldk.impl.bindings.run_statics(); init(); }
3636
}

‎src/main/java/org/ldk/enums/ConfirmationTarget.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,5 @@ public enum ConfirmationTarget {
9393
*/
9494
LDKConfirmationTarget_ChannelCloseMinimum,
9595
; static native void init();
96-
static { init(); }
96+
static { org.ldk.impl.bindings.run_statics(); init(); }
9797
}

‎src/main/java/org/ldk/enums/CreationError.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ public enum CreationError {
3434
*/
3535
LDKCreationError_MinFinalCltvExpiryDeltaTooShort,
3636
; static native void init();
37-
static { init(); }
37+
static { org.ldk.impl.bindings.run_statics(); init(); }
3838
}

‎src/main/java/org/ldk/enums/Currency.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ public enum Currency {
2525
*/
2626
LDKCurrency_Signet,
2727
; static native void init();
28-
static { init(); }
28+
static { org.ldk.impl.bindings.run_statics(); init(); }
2929
}

‎src/main/java/org/ldk/enums/HTLCClaim.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ public enum HTLCClaim {
2525
*/
2626
LDKHTLCClaim_Revocation,
2727
; static native void init();
28-
static { init(); }
28+
static { org.ldk.impl.bindings.run_statics(); init(); }
2929
}

‎src/main/java/org/ldk/enums/IOError.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ public enum IOError {
2323
LDKIOError_Other,
2424
LDKIOError_UnexpectedEof,
2525
; static native void init();
26-
static { init(); }
26+
static { org.ldk.impl.bindings.run_statics(); init(); }
2727
}

‎src/main/java/org/ldk/enums/Level.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ public enum Level {
2929
*/
3030
LDKLevel_Error,
3131
; static native void init();
32-
static { init(); }
32+
static { org.ldk.impl.bindings.run_statics(); init(); }
3333
}

‎src/main/java/org/ldk/enums/Network.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ public enum Network {
2121
*/
2222
LDKNetwork_Signet,
2323
; static native void init();
24-
static { init(); }
24+
static { org.ldk.impl.bindings.run_statics(); init(); }
2525
}

‎src/main/java/org/ldk/enums/PaymentFailureReason.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ public enum PaymentFailureReason {
4040
*/
4141
LDKPaymentFailureReason_UnexpectedError,
4242
; static native void init();
43-
static { init(); }
43+
static { org.ldk.impl.bindings.run_statics(); init(); }
4444
}

‎src/main/java/org/ldk/enums/Recipient.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ public enum Recipient {
1919
*/
2020
LDKRecipient_PhantomNode,
2121
; static native void init();
22-
static { init(); }
22+
static { org.ldk.impl.bindings.run_statics(); init(); }
2323
}

‎src/main/java/org/ldk/enums/RetryableSendFailure.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ public enum RetryableSendFailure {
3030
*/
3131
LDKRetryableSendFailure_DuplicatePayment,
3232
; static native void init();
33-
static { init(); }
33+
static { org.ldk.impl.bindings.run_statics(); init(); }
3434
}

‎src/main/java/org/ldk/enums/Secp256k1Error.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ public enum Secp256k1Error {
4949
*/
5050
LDKSecp256k1Error_InvalidParityValue,
5151
; static native void init();
52-
static { init(); }
52+
static { org.ldk.impl.bindings.run_statics(); init(); }
5353
}

‎src/main/java/org/ldk/enums/SiPrefix.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ public enum SiPrefix {
2121
*/
2222
LDKSiPrefix_Pico,
2323
; static native void init();
24-
static { init(); }
24+
static { org.ldk.impl.bindings.run_statics(); init(); }
2525
}

‎src/main/java/org/ldk/enums/SocketAddressParseError.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ public enum SocketAddressParseError {
2121
*/
2222
LDKSocketAddressParseError_InvalidOnionV3,
2323
; static native void init();
24-
static { init(); }
24+
static { org.ldk.impl.bindings.run_statics(); init(); }
2525
}

‎src/main/java/org/ldk/enums/UtxoLookupError.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ public enum UtxoLookupError {
1313
*/
1414
LDKUtxoLookupError_UnknownTx,
1515
; static native void init();
16-
static { init(); }
16+
static { org.ldk.impl.bindings.run_statics(); init(); }
1717
}

‎src/main/java/org/ldk/impl/bindings.java

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public class bindings {
3838
// Fetching the LDK versions from C also checks that the header and binaries match
3939
System.err.println("Loaded LDK-Java Bindings " + version.get_ldk_java_bindings_version() + " with LDK " + get_ldk_version() + " and LDK-C-Bindings " + get_ldk_c_bindings_version());
4040
}
41+
public static void run_statics() { /* Useful to force the statics to run */ }
4142
static native void init(java.lang.Class c);
4243
static native void init_class_cache();
4344
static native String get_lib_version_string();

0 commit comments

Comments
 (0)
Please sign in to comment.