Browse Source

make debug bufsize configurable

pull/1/head
Sami Vaarala 11 years ago
parent
commit
56d545f31e
  1. 2
      src/duk_debug_macros.c
  2. 9
      src/duk_features.h

2
src/duk_debug_macros.c

@ -18,7 +18,7 @@
char duk_debug_summary_buf[DUK_DEBUG_SUMMARY_BUF_SIZE];
int duk_debug_summary_idx;
#define DUK_DEBUG_BUFSIZE 65536
#define DUK_DEBUG_BUFSIZE DUK_USE_DEBUG_BUFSIZE
static char buf[DUK_DEBUG_BUFSIZE];
static const char *get_level_string(int level) {

9
src/duk_features.h

@ -1093,6 +1093,15 @@ extern double duk_computed_nan;
#define DUK_USE_ASSERTIONS
#endif
/* The static buffer for debug printing is quite large by default, so there
* is an option to shrink it manually for constrained builds.
*/
#if defined(DUK_OPT_DEBUG_BUFSIZE)
#define DUK_USE_DEBUG_BUFSIZE DUK_OPT_DEBUG_BUFSIZE
#else
#define DUK_USE_DEBUG_BUFSIZE 65536
#endif
/*
* Ecmascript features / compliance options
*/

Loading…
Cancel
Save