Browse Source

Add duk_errmsg.c for gathering shared error msgs

pull/30/head
Sami Vaarala 11 years ago
parent
commit
91fafa038a
  1. 10
      src/duk_errmsg.c
  2. 6
      src/duk_errmsg.h
  3. 1
      src/duk_internal.h

10
src/duk_errmsg.c

@ -0,0 +1,10 @@
/*
* Shared error message strings
*
* To minimize code footprint, try to share error messages inside Duktape
* code.
*/
#include "duk_internal.h"
const char *duk_errmsg_invalid_count = "invalid count";

6
src/duk_errmsg.h

@ -0,0 +1,6 @@
#ifndef DUK_ERRMSG_H_INCLUDED
#define DUK_ERRMSG_H_INCLUDED
extern const char *duk_errmsg_invalid_count;
#endif /* DUK_ERRMSG_H_INCLUDED */

1
src/duk_internal.h

@ -48,6 +48,7 @@ DUK_USE_USER_DECLARE()
#include "duk_forwdecl.h"
#include "duk_builtins.h" /* autogenerated: strings and built-in object init data */
#include "duk_errmsg.h"
#include "duk_js_bytecode.h"
#include "duk_lexer.h"
#include "duk_js_compiler.h"

Loading…
Cancel
Save