Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: WASM #86

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions secp256k1-zkp-sys/depend/secp256k1/src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@
#define DEBUG_CONFIG_MSG(x) "DEBUG_CONFIG: " x
#define DEBUG_CONFIG_DEF(x) DEBUG_CONFIG_MSG(#x "=" STR(x))

/* Debug helper for printing arrays of unsigned char. */
#define PRINT_BUF(buf, len) do { \
printf("%s[%lu] = ", #buf, (unsigned long)len); \
print_buf_plain(buf, len); \
} while(0)

static void print_buf_plain(const unsigned char *buf, size_t len) {
size_t i;
printf("{");
for (i = 0; i < len; i++) {
if (i % 8 == 0) {
printf("\n ");
} else {
printf(" ");
}
printf("0x%02X,", buf[i]);
}
printf("\n}\n");
}

# if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )
# if SECP256K1_GNUC_PREREQ(2,7)
# define SECP256K1_INLINE __inline__
Expand Down
31 changes: 29 additions & 2 deletions secp256k1-zkp-sys/depend/util.h.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,35 @@
diff --git a/secp256k1-zkp-sys/depend/secp256k1/src/util.h b/secp256k1-zkp-sys/depend/secp256k1/src/util.h
index 10ea516..4066d2a 100644
index 10ea516..2c53866 100644
--- a/secp256k1-zkp-sys/depend/secp256k1/src/util.h
+++ b/secp256k1-zkp-sys/depend/secp256k1/src/util.h
@@ -153,14 +153,6 @@ static const secp256k1_callback default_error_callback = {
@@ -19,26 +19,6 @@
#define DEBUG_CONFIG_MSG(x) "DEBUG_CONFIG: " x
#define DEBUG_CONFIG_DEF(x) DEBUG_CONFIG_MSG(#x "=" STR(x))

-/* Debug helper for printing arrays of unsigned char. */
-#define PRINT_BUF(buf, len) do { \
- printf("%s[%lu] = ", #buf, (unsigned long)len); \
- print_buf_plain(buf, len); \
-} while(0)
-
-static void print_buf_plain(const unsigned char *buf, size_t len) {
- size_t i;
- printf("{");
- for (i = 0; i < len; i++) {
- if (i % 8 == 0) {
- printf("\n ");
- } else {
- printf(" ");
- }
- printf("0x%02X,", buf[i]);
- }
- printf("\n}\n");
-}
-
# if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )
# if SECP256K1_GNUC_PREREQ(2,7)
# define SECP256K1_INLINE __inline__
@@ -153,14 +133,6 @@ static const secp256k1_callback default_error_callback = {
#define VERIFY_CHECK(cond)
#endif

Expand Down
Loading