Browse Source

Rename shared strings file, add a few entries

pull/30/head
Sami Vaarala 11 years ago
parent
commit
6fc76e9473
  1. 10
      src/duk_errmsg.c
  2. 6
      src/duk_errmsg.h
  3. 19
      src/duk_strings.c
  4. 15
      src/duk_strings.h

10
src/duk_errmsg.c

@ -1,10 +0,0 @@
/*
* 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

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

19
src/duk_strings.c

@ -0,0 +1,19 @@
/*
* Shared error message strings
*
* To minimize code footprint, try to share error messages inside Duktape
* code.
*/
#include "duk_internal.h"
const char *duk_str_invalid_count = "invalid count";
const char *duk_str_invalid_call_args = "invalid call args";
const char *duk_str_not_constructable = "not constructable";
const char *duk_str_fmt_ptr = "%p";
const char *duk_str_invalid_json = "invalid json";
const char *duk_str_invalid_number = "invalid number";
const char *duk_str_jsondec_reclimit = "json decode recursion limit";
const char *duk_str_jsonenc_reclimit = "json encode recursion limit";
const char *duk_str_cyclic_input = "cyclic input";

15
src/duk_strings.h

@ -0,0 +1,15 @@
#ifndef DUK_ERRMSG_H_INCLUDED
#define DUK_ERRMSG_H_INCLUDED
extern const char *duk_str_invalid_count;
extern const char *duk_str_invalid_call_args;
extern const char *duk_str_not_constructable;
extern const char *duk_str_fmt_ptr;
extern const char *duk_str_invalid_json;
extern const char *duk_str_invalid_number;
extern const char *duk_str_jsondec_reclimit;
extern const char *duk_str_jsonenc_reclimit;
extern const char *duk_str_cyclic_input;
#endif /* DUK_ERRMSG_H_INCLUDED */
Loading…
Cancel
Save