Created
September 22, 2015 02:03
-
-
Save jasom/b3cb5118e9e2efab3a5f to your computer and use it in GitHub Desktop.
Proposed bstring fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/bstring.h b/src/bstring.h | |
index 70a9e4e..4f77726 100644 | |
--- a/src/bstring.h | |
+++ b/src/bstring.h | |
@@ -37,5 +37,9 @@ | |
#include <bstr/bstrlib.h> | |
#include <bstr/bstraux.h> | |
+#undef blength | |
+#undef bdata | |
+static inline int blength(bstring b) { return blengthe(b,0); } | |
+static inline char *bdata(bstring b) { return bdataofs (b,0); } | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment