Browse Source

internal macro renames, XXX -> DUK__XXX

pull/1/head
Sami Vaarala 11 years ago
parent
commit
a2a5acf81d
  1. 24
      src/duk_api.c
  2. 40
      src/duk_bi_array.c
  3. 90
      src/duk_bi_global.c

24
src/duk_api.c

@ -2441,9 +2441,9 @@ void duk_push_multiple(duk_context *ctx, const char *types, ...) {
}
#endif /* FIXME: unused */
#define PUSH_THIS_FLAG_CHECK_COERC (1 << 0)
#define PUSH_THIS_FLAG_TO_OBJECT (1 << 1)
#define PUSH_THIS_FLAG_TO_STRING (1 << 2)
#define DUK__PUSH_THIS_FLAG_CHECK_COERC (1 << 0)
#define DUK__PUSH_THIS_FLAG_TO_OBJECT (1 << 1)
#define DUK__PUSH_THIS_FLAG_TO_STRING (1 << 2)
static void push_this_helper(duk_context *ctx, int flags) {
duk_hthread *thr = (duk_hthread *) ctx;
@ -2453,7 +2453,7 @@ static void push_this_helper(duk_context *ctx, int flags) {
DUK_ASSERT(thr->callstack_top >= 0 && thr->callstack_top <= thr->callstack_size);
if (thr->callstack_top == 0) {
if (flags & PUSH_THIS_FLAG_CHECK_COERC) {
if (flags & DUK__PUSH_THIS_FLAG_CHECK_COERC) {
goto type_error;
}
duk_push_undefined(ctx);
@ -2464,7 +2464,7 @@ static void push_this_helper(duk_context *ctx, int flags) {
/* 'this' binding is just before current activation's bottom */
DUK_ASSERT(thr->valstack_bottom > thr->valstack);
tv = thr->valstack_bottom - 1;
if (flags & PUSH_THIS_FLAG_CHECK_COERC) {
if (flags & DUK__PUSH_THIS_FLAG_CHECK_COERC) {
if (DUK_TVAL_IS_UNDEFINED(tv) || DUK_TVAL_IS_NULL(tv)) {
goto type_error;
}
@ -2474,9 +2474,9 @@ static void push_this_helper(duk_context *ctx, int flags) {
duk_push_tval(ctx, &tv_tmp);
}
if (flags & PUSH_THIS_FLAG_TO_OBJECT) {
if (flags & DUK__PUSH_THIS_FLAG_TO_OBJECT) {
duk_to_object(ctx, -1);
} else if (flags & PUSH_THIS_FLAG_TO_STRING) {
} else if (flags & DUK__PUSH_THIS_FLAG_TO_STRING) {
duk_to_string(ctx, -1);
}
@ -2491,13 +2491,13 @@ void duk_push_this(duk_context *ctx) {
}
void duk_push_this_check_object_coercible(duk_context *ctx) {
push_this_helper(ctx, PUSH_THIS_FLAG_CHECK_COERC /*flags*/);
push_this_helper(ctx, DUK__PUSH_THIS_FLAG_CHECK_COERC /*flags*/);
}
duk_hobject *duk_push_this_coercible_to_object(duk_context *ctx) {
duk_hobject *h;
push_this_helper(ctx, PUSH_THIS_FLAG_CHECK_COERC |
PUSH_THIS_FLAG_TO_OBJECT /*flags*/);
push_this_helper(ctx, DUK__PUSH_THIS_FLAG_CHECK_COERC |
DUK__PUSH_THIS_FLAG_TO_OBJECT /*flags*/);
h = duk_get_hobject(ctx, -1);
DUK_ASSERT(h != NULL);
return h;
@ -2505,8 +2505,8 @@ duk_hobject *duk_push_this_coercible_to_object(duk_context *ctx) {
duk_hstring *duk_push_this_coercible_to_string(duk_context *ctx) {
duk_hstring *h;
push_this_helper(ctx, PUSH_THIS_FLAG_CHECK_COERC |
PUSH_THIS_FLAG_TO_STRING /*flags*/);
push_this_helper(ctx, DUK__PUSH_THIS_FLAG_CHECK_COERC |
DUK__PUSH_THIS_FLAG_TO_STRING /*flags*/);
h = duk_get_hstring(ctx, -1);
DUK_ASSERT(h != NULL);
return h;

40
src/duk_bi_array.c

@ -35,7 +35,7 @@
/* Perform an intermediate join when this many elements have been pushed
* on the value stack.
*/
#define DUK_ARRAY_MID_JOIN_LIMIT 4096
#define DUK__ARRAY_MID_JOIN_LIMIT 4096
/* Shared entry code for many Array built-ins. Note that length is left
* on stack (it could be popped, but that's not necessary).
@ -254,8 +254,8 @@ int duk_bi_array_prototype_join_shared(duk_context *ctx) {
DUK_DDDPRINT("sep=%!T, this=%!T, len=%d",
duk_get_tval(ctx, 0), duk_get_tval(ctx, 1), (int) len);
valstack_required = (len >= DUK_ARRAY_MID_JOIN_LIMIT ?
DUK_ARRAY_MID_JOIN_LIMIT : len);
valstack_required = (len >= DUK__ARRAY_MID_JOIN_LIMIT ?
DUK__ARRAY_MID_JOIN_LIMIT : len);
valstack_required++;
duk_require_stack(ctx, valstack_required);
@ -266,7 +266,7 @@ int duk_bi_array_prototype_join_shared(duk_context *ctx) {
count = 0;
idx = 0;
for (;;) {
if (count >= DUK_ARRAY_MID_JOIN_LIMIT || /* intermediate join to avoid valstack overflow */
if (count >= DUK__ARRAY_MID_JOIN_LIMIT || /* intermediate join to avoid valstack overflow */
idx >= len) { /* end of loop (careful with len==0) */
/* [ sep ToObject(this) len sep str0 ... str(count-1) ] */
DUK_DDDPRINT("mid/final join, count=%d, idx=%d, len=%d",
@ -1095,11 +1095,11 @@ int duk_bi_array_prototype_indexof_shared(duk_context *ctx) {
* every(), some(), forEach(), map(), filter()
*/
#define ITER_EVERY 0
#define ITER_SOME 1
#define ITER_FOREACH 2
#define ITER_MAP 3
#define ITER_FILTER 4
#define DUK__ITER_EVERY 0
#define DUK__ITER_SOME 1
#define DUK__ITER_FOREACH 2
#define DUK__ITER_MAP 3
#define DUK__ITER_FILTER 4
/* FIXME: This helper is a bit awkward because the handling for the different iteration
* callers is quite different. This now compiles to a bit less than 500 bytes, so with
@ -1123,7 +1123,7 @@ int duk_bi_array_prototype_iter_shared(duk_context *ctx) {
}
/* if thisArg not supplied, behave as if undefined was supplied */
if (iter_type == ITER_MAP || iter_type == ITER_FILTER) {
if (iter_type == DUK__ITER_MAP || iter_type == DUK__ITER_FILTER) {
duk_push_array(ctx);
} else {
duk_push_undefined(ctx);
@ -1158,29 +1158,29 @@ int duk_bi_array_prototype_iter_shared(duk_context *ctx) {
duk_call_method(ctx, 3); /* -> [ ... val retval ] */
switch (iter_type) {
case ITER_EVERY:
case DUK__ITER_EVERY:
bval = duk_to_boolean(ctx, -1);
if (!bval) {
/* stack top contains 'false' */
return 1;
}
break;
case ITER_SOME:
case DUK__ITER_SOME:
bval = duk_to_boolean(ctx, -1);
if (bval) {
/* stack top contains 'true' */
return 1;
}
break;
case ITER_FOREACH:
case DUK__ITER_FOREACH:
/* nop */
break;
case ITER_MAP:
case DUK__ITER_MAP:
duk_dup(ctx, -1);
duk_def_prop_index(ctx, 4, i, DUK_PROPDESC_FLAGS_WEC); /* retval to result[i] */
res_length = i + 1;
break;
case ITER_FILTER:
case DUK__ITER_FILTER:
bval = duk_to_boolean(ctx, -1);
if (bval) {
duk_dup(ctx, -2); /* orig value */
@ -1199,17 +1199,17 @@ int duk_bi_array_prototype_iter_shared(duk_context *ctx) {
}
switch (iter_type) {
case ITER_EVERY:
case DUK__ITER_EVERY:
duk_push_true(ctx);
break;
case ITER_SOME:
case DUK__ITER_SOME:
duk_push_false(ctx);
break;
case ITER_FOREACH:
case DUK__ITER_FOREACH:
duk_push_undefined(ctx);
break;
case ITER_MAP:
case ITER_FILTER:
case DUK__ITER_MAP:
case DUK__ITER_FILTER:
DUK_ASSERT_TOP(ctx, 5);
DUK_ASSERT(duk_is_array(ctx, -1)); /* topmost element is the result array already */
duk_push_number(ctx, (double) res_length); /* FIXME */

90
src/duk_bi_global.c

@ -11,71 +11,71 @@
/* Macros for creating and checking bitmasks for character encoding.
* Bit number is a bit counterintuitive, but minimizes code size.
*/
#define MKBITS(a,b,c,d,e,f,g,h) ((unsigned char) ( \
#define DUK__MKBITS(a,b,c,d,e,f,g,h) ((unsigned char) ( \
((a) << 0) | ((b) << 1) | ((c) << 2) | ((d) << 3) | \
((e) << 4) | ((f) << 5) | ((g) << 6) | ((h) << 7) \
))
#define CHECK_BITMASK(table,cp) ((table)[(cp) >> 3] & (1 << ((cp) & 0x07)))
#define DUK__CHECK_BITMASK(table,cp) ((table)[(cp) >> 3] & (1 << ((cp) & 0x07)))
/* E5.1 Section 15.1.3.3: uriReserved + uriUnescaped + '#' */
static unsigned char encode_uri_unescaped_table[16] = {
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
MKBITS(0, 1, 0, 1, 1, 0, 1, 1), MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x20-0x2f */
MKBITS(1, 1, 1, 1, 1, 1, 1, 1), MKBITS(1, 1, 1, 1, 0, 1, 0, 1), /* 0x30-0x3f */
MKBITS(1, 1, 1, 1, 1, 1, 1, 1), MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x40-0x4f */
MKBITS(1, 1, 1, 1, 1, 1, 1, 1), MKBITS(1, 1, 1, 0, 0, 0, 0, 1), /* 0x50-0x5f */
MKBITS(0, 1, 1, 1, 1, 1, 1, 1), MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x60-0x6f */
MKBITS(1, 1, 1, 1, 1, 1, 1, 1), MKBITS(1, 1, 1, 0, 0, 0, 1, 0), /* 0x70-0x7f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
DUK__MKBITS(0, 1, 0, 1, 1, 0, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x20-0x2f */
DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 0, 1, 0, 1), /* 0x30-0x3f */
DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x40-0x4f */
DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 0, 1), /* 0x50-0x5f */
DUK__MKBITS(0, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x60-0x6f */
DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 1, 0), /* 0x70-0x7f */
};
/* E5.1 Section 15.1.3.4: uriUnescaped */
static unsigned char encode_uri_component_unescaped_table[16] = {
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
MKBITS(0, 1, 0, 0, 0, 0, 0, 1), MKBITS(1, 1, 1, 0, 0, 1, 1, 0), /* 0x20-0x2f */
MKBITS(1, 1, 1, 1, 1, 1, 1, 1), MKBITS(1, 1, 0, 0, 0, 0, 0, 0), /* 0x30-0x3f */
MKBITS(0, 1, 1, 1, 1, 1, 1, 1), MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x40-0x4f */
MKBITS(1, 1, 1, 1, 1, 1, 1, 1), MKBITS(1, 1, 1, 0, 0, 0, 0, 1), /* 0x50-0x5f */
MKBITS(0, 1, 1, 1, 1, 1, 1, 1), MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x60-0x6f */
MKBITS(1, 1, 1, 1, 1, 1, 1, 1), MKBITS(1, 1, 1, 0, 0, 0, 1, 0), /* 0x70-0x7f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
DUK__MKBITS(0, 1, 0, 0, 0, 0, 0, 1), DUK__MKBITS(1, 1, 1, 0, 0, 1, 1, 0), /* 0x20-0x2f */
DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 0, 0, 0, 0, 0, 0), /* 0x30-0x3f */
DUK__MKBITS(0, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x40-0x4f */
DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 0, 1), /* 0x50-0x5f */
DUK__MKBITS(0, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x60-0x6f */
DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 1, 0), /* 0x70-0x7f */
};
/* E5.1 Section 15.1.3.1: uriReserved + '#' */
static unsigned char decode_uri_reserved_table[16] = {
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
MKBITS(0, 0, 0, 1, 1, 0, 1, 0), MKBITS(0, 0, 0, 1, 1, 0, 0, 1), /* 0x20-0x2f */
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 1, 1, 0, 1, 0, 1), /* 0x30-0x3f */
MKBITS(1, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x40-0x4f */
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x50-0x5f */
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x60-0x6f */
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x70-0x7f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
DUK__MKBITS(0, 0, 0, 1, 1, 0, 1, 0), DUK__MKBITS(0, 0, 0, 1, 1, 0, 0, 1), /* 0x20-0x2f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 1, 1, 0, 1, 0, 1), /* 0x30-0x3f */
DUK__MKBITS(1, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x40-0x4f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x50-0x5f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x60-0x6f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x70-0x7f */
};
/* E5.1 Section 15.1.3.2: empty */
static unsigned char decode_uri_component_reserved_table[16] = {
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x20-0x2f */
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x30-0x3f */
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x40-0x4f */
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x50-0x5f */
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x60-0x6f */
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x70-0x7f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x20-0x2f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x30-0x3f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x40-0x4f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x50-0x5f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x60-0x6f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x70-0x7f */
};
#ifdef DUK_USE_SECTION_B
/* E5.1 Section B.2.2, step 7. */
static unsigned char escape_unescaped_table[16] = {
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
MKBITS(0, 0, 0, 0, 0, 0, 0, 0), MKBITS(0, 0, 1, 1, 0, 1, 1, 1), /* 0x20-0x2f */
MKBITS(1, 1, 1, 1, 1, 1, 1, 1), MKBITS(1, 1, 0, 0, 0, 0, 0, 0), /* 0x30-0x3f */
MKBITS(1, 1, 1, 1, 1, 1, 1, 1), MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x40-0x4f */
MKBITS(1, 1, 1, 1, 1, 1, 1, 1), MKBITS(1, 1, 1, 0, 0, 0, 0, 1), /* 0x50-0x5f */
MKBITS(0, 1, 1, 1, 1, 1, 1, 1), MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x60-0x6f */
MKBITS(1, 1, 1, 1, 1, 1, 1, 1), MKBITS(1, 1, 1, 0, 0, 0, 0, 0) /* 0x70-0x7f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 1, 1, 0, 1, 1, 1), /* 0x20-0x2f */
DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 0, 0, 0, 0, 0, 0), /* 0x30-0x3f */
DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x40-0x4f */
DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 0, 1), /* 0x50-0x5f */
DUK__MKBITS(0, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x60-0x6f */
DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 0, 0) /* 0x70-0x7f */
};
#endif /* DUK_USE_SECTION_B */
@ -151,7 +151,7 @@ static void duk_transform_callback_encode_uri(duk_transform_context *tfm_ctx, vo
if (cp < 0) {
goto uri_error;
} else if ((cp < 0x80L) && CHECK_BITMASK(unescaped_table, cp)) {
} else if ((cp < 0x80L) && DUK__CHECK_BITMASK(unescaped_table, cp)) {
duk_hbuffer_append_byte(tfm_ctx->thr, tfm_ctx->h_buf, (duk_uint8_t) cp);
return;
} else if (cp >= 0xdc00L && cp <= 0xdfffL) {
@ -219,7 +219,7 @@ static void duk_transform_callback_decode_uri(duk_transform_context *tfm_ctx, vo
}
if (t < 128) {
if (CHECK_BITMASK(reserved_table, t)) {
if (DUK__CHECK_BITMASK(reserved_table, t)) {
/* decode '%xx' to '%xx' if decoded char in reserved set */
DUK_ASSERT(tfm_ctx->p - 1 >= tfm_ctx->p_start);
duk_hbuffer_append_bytes(tfm_ctx->thr, tfm_ctx->h_buf, (duk_uint8_t *) (p - 1), 3);
@ -328,7 +328,7 @@ static void duk_transform_callback_escape(duk_transform_context *tfm_ctx, void *
if (cp < 0) {
goto esc_error;
} else if ((cp < 0x80L) && CHECK_BITMASK(escape_unescaped_table, cp)) {
} else if ((cp < 0x80L) && DUK__CHECK_BITMASK(escape_unescaped_table, cp)) {
buf[0] = (duk_uint8_t) cp;
len = 1;
} else if (cp < 0x100L) {

Loading…
Cancel
Save