From 09c02eebe9d96c53cfc4458948b30c7a8639f9ac Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 27 Oct 2022 00:08:55 +0000 Subject: [PATCH] Support trait methods that return enums in the C++ sed script --- genbindings.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genbindings.sh b/genbindings.sh index 94800ff..4f79503 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -272,7 +272,7 @@ while read LINE; do echo "Unable to find method declaration for $LINE" exit 1 fi - RETVAL="$(echo "$METHOD" | sed 's/[ ]*\([A-Za-z0-9 _]*\)(\*\(.*\)).*/\1/' | sed 's/^struct LDK/LDK::/g' | tr -d ' ')" + RETVAL="$(echo "$METHOD" | sed 's/[ ]*\([A-Za-z0-9 _]*\)(\*\(.*\)).*/\1/' | sed -E 's/^(struct|enum) LDK/LDK::/g' | tr -d ' ')" [ "$RETVAL" = "LDK::SecretKey" ] && RETVAL="LDKSecretKey" [ "$RETVAL" = "LDK::PublicKey" ] && RETVAL="LDKPublicKey" [ "$RETVAL" = "LDK::ThirtyTwoBytes" ] && RETVAL="LDKThirtyTwoBytes" -- 2.39.5