Browse Source

rename jsonxEnc -> jxEnc etc

pull/1/head
Sami Vaarala 11 years ago
parent
commit
ebb16cd2c1
  1. 16
      src/duk_bi_duk.c
  2. 8
      src/duk_bi_protos.h
  3. 8
      src/genbuiltins.py
  4. 8
      src/genstrings.py

16
src/duk_bi_duk.c

@ -101,14 +101,14 @@ duk_ret duk_bi_duk_object_dec(duk_context *ctx) {
} }
#ifdef DUK_USE_JSONX #ifdef DUK_USE_JSONX
duk_ret duk_bi_duk_object_jsonx_dec(duk_context *ctx) { duk_ret duk_bi_duk_object_jx_dec(duk_context *ctx) {
duk_bi_json_parse_helper(ctx, duk_bi_json_parse_helper(ctx,
0 /*idx_value*/, 0 /*idx_value*/,
1 /*idx_replacer*/, 1 /*idx_replacer*/,
DUK_JSON_FLAG_EXT_CUSTOM /*flags*/); DUK_JSON_FLAG_EXT_CUSTOM /*flags*/);
return 1; return 1;
} }
duk_ret duk_bi_duk_object_jsonx_enc(duk_context *ctx) { duk_ret duk_bi_duk_object_jx_enc(duk_context *ctx) {
duk_bi_json_stringify_helper(ctx, duk_bi_json_stringify_helper(ctx,
0 /*idx_value*/, 0 /*idx_value*/,
1 /*idx_replacer*/, 1 /*idx_replacer*/,
@ -119,23 +119,23 @@ duk_ret duk_bi_duk_object_jsonx_enc(duk_context *ctx) {
return 1; return 1;
} }
#else /* DUK_USE_JSONX */ #else /* DUK_USE_JSONX */
duk_ret duk_bi_duk_object_jsonx_dec(duk_context *ctx) { duk_ret duk_bi_duk_object_jx_dec(duk_context *ctx) {
return DUK_RET_UNSUPPORTED_ERROR; return DUK_RET_UNSUPPORTED_ERROR;
} }
duk_ret duk_bi_duk_object_jsonx_enc(duk_context *ctx) { duk_ret duk_bi_duk_object_jx_enc(duk_context *ctx) {
return DUK_RET_UNSUPPORTED_ERROR; return DUK_RET_UNSUPPORTED_ERROR;
} }
#endif /* DUK_USE_JSONX */ #endif /* DUK_USE_JSONX */
#ifdef DUK_USE_JSONC #ifdef DUK_USE_JSONC
duk_ret duk_bi_duk_object_jsonc_dec(duk_context *ctx) { duk_ret duk_bi_duk_object_jc_dec(duk_context *ctx) {
duk_bi_json_parse_helper(ctx, duk_bi_json_parse_helper(ctx,
0 /*idx_value*/, 0 /*idx_value*/,
1 /*idx_replacer*/, 1 /*idx_replacer*/,
DUK_JSON_FLAG_EXT_COMPATIBLE /*flags*/); DUK_JSON_FLAG_EXT_COMPATIBLE /*flags*/);
return 1; return 1;
} }
duk_ret duk_bi_duk_object_jsonc_enc(duk_context *ctx) { duk_ret duk_bi_duk_object_jc_enc(duk_context *ctx) {
duk_bi_json_stringify_helper(ctx, duk_bi_json_stringify_helper(ctx,
0 /*idx_value*/, 0 /*idx_value*/,
1 /*idx_replacer*/, 1 /*idx_replacer*/,
@ -145,10 +145,10 @@ duk_ret duk_bi_duk_object_jsonc_enc(duk_context *ctx) {
return 1; return 1;
} }
#else /* DUK_USE_JSONC */ #else /* DUK_USE_JSONC */
duk_ret duk_bi_duk_object_jsonc_dec(duk_context *ctx) { duk_ret duk_bi_duk_object_jc_dec(duk_context *ctx) {
return DUK_RET_UNSUPPORTED_ERROR; return DUK_RET_UNSUPPORTED_ERROR;
} }
duk_ret duk_bi_duk_object_jsonc_enc(duk_context *ctx) { duk_ret duk_bi_duk_object_jc_enc(duk_context *ctx) {
return DUK_RET_UNSUPPORTED_ERROR; return DUK_RET_UNSUPPORTED_ERROR;
} }
#endif /* DUK_USE_JSONC */ #endif /* DUK_USE_JSONC */

8
src/duk_bi_protos.h

@ -50,10 +50,10 @@ duk_ret duk_bi_duk_object_get_finalizer(duk_context *ctx);
duk_ret duk_bi_duk_object_set_finalizer(duk_context *ctx); duk_ret duk_bi_duk_object_set_finalizer(duk_context *ctx);
duk_ret duk_bi_duk_object_enc(duk_context *ctx); duk_ret duk_bi_duk_object_enc(duk_context *ctx);
duk_ret duk_bi_duk_object_dec(duk_context *ctx); duk_ret duk_bi_duk_object_dec(duk_context *ctx);
duk_ret duk_bi_duk_object_jsonx_dec(duk_context *ctx); duk_ret duk_bi_duk_object_jx_dec(duk_context *ctx);
duk_ret duk_bi_duk_object_jsonx_enc(duk_context *ctx); duk_ret duk_bi_duk_object_jx_enc(duk_context *ctx);
duk_ret duk_bi_duk_object_jsonc_dec(duk_context *ctx); duk_ret duk_bi_duk_object_jc_dec(duk_context *ctx);
duk_ret duk_bi_duk_object_jsonc_enc(duk_context *ctx); duk_ret duk_bi_duk_object_jc_enc(duk_context *ctx);
duk_ret duk_bi_error_constructor_shared(duk_context *ctx); duk_ret duk_bi_error_constructor_shared(duk_context *ctx);
duk_ret duk_bi_error_prototype_to_string(duk_context *ctx); duk_ret duk_bi_error_prototype_to_string(duk_context *ctx);

8
src/genbuiltins.py

@ -1102,10 +1102,10 @@ bi_duk = {
{ 'name': 'setFinalizer', 'native': 'duk_bi_duk_object_set_finalizer', 'length': 2 }, { 'name': 'setFinalizer', 'native': 'duk_bi_duk_object_set_finalizer', 'length': 2 },
{ 'name': 'enc', 'native': 'duk_bi_duk_object_enc', 'length': 2 }, { 'name': 'enc', 'native': 'duk_bi_duk_object_enc', 'length': 2 },
{ 'name': 'dec', 'native': 'duk_bi_duk_object_dec', 'length': 2 }, { 'name': 'dec', 'native': 'duk_bi_duk_object_dec', 'length': 2 },
{ 'name': 'jsonxEnc', 'native': 'duk_bi_duk_object_jsonx_enc', 'length': 3 }, { 'name': 'jxEnc', 'native': 'duk_bi_duk_object_jx_enc', 'length': 3 },
{ 'name': 'jsonxDec', 'native': 'duk_bi_duk_object_jsonx_dec', 'length': 2 }, { 'name': 'jxDec', 'native': 'duk_bi_duk_object_jx_dec', 'length': 2 },
{ 'name': 'jsoncEnc', 'native': 'duk_bi_duk_object_jsonc_enc', 'length': 3 }, { 'name': 'jcEnc', 'native': 'duk_bi_duk_object_jc_enc', 'length': 3 },
{ 'name': 'jsoncDec', 'native': 'duk_bi_duk_object_jsonc_dec', 'length': 2 }, { 'name': 'jcDec', 'native': 'duk_bi_duk_object_jc_dec', 'length': 2 },
], ],
} }

8
src/genstrings.py

@ -558,10 +558,10 @@ duk_string_list = [
mkstr("getFinalizer", custom=True), mkstr("getFinalizer", custom=True),
mkstr("enc", custom=True), mkstr("enc", custom=True),
mkstr("dec", custom=True), mkstr("dec", custom=True),
mkstr("jsonxEnc", custom=True), mkstr("jxEnc", custom=True),
mkstr("jsonxDec", custom=True), mkstr("jxDec", custom=True),
mkstr("jsoncEnc", custom=True), mkstr("jcEnc", custom=True),
mkstr("jsoncDec", custom=True), mkstr("jcDec", custom=True),
mkstr("hex", custom=True), # enc/dec alg mkstr("hex", custom=True), # enc/dec alg
mkstr("base64", custom=True), # enc/dec alg mkstr("base64", custom=True), # enc/dec alg

Loading…
Cancel
Save