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
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,
0 /*idx_value*/,
1 /*idx_replacer*/,
DUK_JSON_FLAG_EXT_CUSTOM /*flags*/);
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,
0 /*idx_value*/,
1 /*idx_replacer*/,
@ -119,23 +119,23 @@ duk_ret duk_bi_duk_object_jsonx_enc(duk_context *ctx) {
return 1;
}
#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;
}
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;
}
#endif /* DUK_USE_JSONX */
#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,
0 /*idx_value*/,
1 /*idx_replacer*/,
DUK_JSON_FLAG_EXT_COMPATIBLE /*flags*/);
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,
0 /*idx_value*/,
1 /*idx_replacer*/,
@ -145,10 +145,10 @@ duk_ret duk_bi_duk_object_jsonc_enc(duk_context *ctx) {
return 1;
}
#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;
}
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;
}
#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_enc(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_jsonx_enc(duk_context *ctx);
duk_ret duk_bi_duk_object_jsonc_dec(duk_context *ctx);
duk_ret duk_bi_duk_object_jsonc_enc(duk_context *ctx);
duk_ret duk_bi_duk_object_jx_dec(duk_context *ctx);
duk_ret duk_bi_duk_object_jx_enc(duk_context *ctx);
duk_ret duk_bi_duk_object_jc_dec(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_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': 'enc', 'native': 'duk_bi_duk_object_enc', 'length': 2 },
{ 'name': 'dec', 'native': 'duk_bi_duk_object_dec', 'length': 2 },
{ 'name': 'jsonxEnc', 'native': 'duk_bi_duk_object_jsonx_enc', 'length': 3 },
{ 'name': 'jsonxDec', 'native': 'duk_bi_duk_object_jsonx_dec', 'length': 2 },
{ 'name': 'jsoncEnc', 'native': 'duk_bi_duk_object_jsonc_enc', 'length': 3 },
{ 'name': 'jsoncDec', 'native': 'duk_bi_duk_object_jsonc_dec', 'length': 2 },
{ 'name': 'jxEnc', 'native': 'duk_bi_duk_object_jx_enc', 'length': 3 },
{ 'name': 'jxDec', 'native': 'duk_bi_duk_object_jx_dec', 'length': 2 },
{ 'name': 'jcEnc', 'native': 'duk_bi_duk_object_jc_enc', 'length': 3 },
{ '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("enc", custom=True),
mkstr("dec", custom=True),
mkstr("jsonxEnc", custom=True),
mkstr("jsonxDec", custom=True),
mkstr("jsoncEnc", custom=True),
mkstr("jsoncDec", custom=True),
mkstr("jxEnc", custom=True),
mkstr("jxDec", custom=True),
mkstr("jcEnc", custom=True),
mkstr("jcDec", custom=True),
mkstr("hex", custom=True), # enc/dec alg
mkstr("base64", custom=True), # enc/dec alg

Loading…
Cancel
Save