projects
/
ldk-c-bindings
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7d8ba67
)
Support trait methods that return enums in the C++ sed script
author
Matt Corallo
<git@bluematt.me>
Thu, 27 Oct 2022 00:08:55 +0000
(
00:08
+0000)
committer
Matt Corallo
<git@bluematt.me>
Fri, 28 Oct 2022 00:25:10 +0000
(
00:25
+0000)
genbindings.sh
patch
|
blob
|
history
diff --git
a/genbindings.sh
b/genbindings.sh
index 94800ff6416c6921f1021619c32b9c8ba4c78044..4f795030f9301534010a6fec9729ec6c7df4d974 100755
(executable)
--- 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
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"
[ "$RETVAL" = "LDK::SecretKey" ] && RETVAL="LDKSecretKey"
[ "$RETVAL" = "LDK::PublicKey" ] && RETVAL="LDKPublicKey"
[ "$RETVAL" = "LDK::ThirtyTwoBytes" ] && RETVAL="LDKThirtyTwoBytes"