File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 3838 * config.h (which must be provided by the amalgamation user)
3939 * is included.
4040 */
41+ #define BUILD_AMALGAMATION 1
4142#include "src/internal.h"
4243
4344/* The amalgamation user can provide their own defines and skip
@@ -121,3 +122,10 @@ void wally_silence_unused_warnings(void)
121122 assert_bip38_assumptions ();
122123 assert_tx_assumptions ();
123124}
125+
126+ /* Undefine our internal macros */
127+ #undef BYTES_VALID
128+ #undef BYTES_INVALID
129+ #undef BYTES_INVALID_N
130+ #undef OUTPUT_CHECK
131+ #undef OUTPUT_ALLOC
Original file line number Diff line number Diff line change @@ -73,13 +73,15 @@ bool mem_is_zero(const void *mem, size_t len);
7373/* Fetch our internal operations function pointers */
7474const struct wally_operations * wally_ops (void );
7575
76+ #ifndef BUILD_AMALGAMATION
7677#define malloc (size ) __use_wally_malloc_internally__
7778#define calloc (size ) __use_wally_calloc_internally__
7879#define free (ptr ) __use_wally_free_internally__
7980#ifdef strdup
8081#undef strdup
8182#endif
8283#define strdup (ptr ) __use_wally_strdup_internally__
84+ #endif
8385
8486#define NUM_ELEMS (a ) (sizeof(a) / sizeof(a[0]))
8587
You can’t perform that action at this time.
0 commit comments