X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=blobdiff_plain;f=genbindings.sh;fp=genbindings.sh;h=4f795030f9301534010a6fec9729ec6c7df4d974;hp=94800ff6416c6921f1021619c32b9c8ba4c78044;hb=c809fde8131b3ffdb6e5c73709e85d918a87c87d;hpb=7d8ba6706e4a52744eeab9590fa1bfea1a6fc211 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"