Browse Source

change back to unpacked argument: internal helper argument packing will be done separately and requires some asserts and such

pull/2/head
Sami Vaarala 11 years ago
parent
commit
1b291b4d5d
  1. 4
      src/duk_api_internal.h
  2. 4
      src/duk_api_object.c

4
src/duk_api_internal.h

@ -79,9 +79,7 @@ int duk_put_prop_stridx(duk_context *ctx, int obj_index, unsigned int stridx);
int duk_del_prop_stridx(duk_context *ctx, int obj_index, unsigned int stridx); /* [] -> [] */
int duk_has_prop_stridx(duk_context *ctx, int obj_index, unsigned int stridx); /* [] -> [] */
#define duk_get_prop_stridx_boolean(ctx,obj_index,stridx,out_has_prop) \
duk_get_prop_stridx_boolean_raw((ctx),((obj_index) << 16)|(stridx),(out_has_prop))
int duk_get_prop_stridx_boolean_raw(duk_context *ctx, int obj_index_and_stridx, int *out_has_prop); /* [] -> [] */
int duk_get_prop_stridx_boolean(duk_context *ctx, int obj_index, duk_small_int_t stridx, int *out_has_prop); /* [] -> [] */
void duk_def_prop(duk_context *ctx, int obj_index, int desc_flags); /* [key val] -> [] */
void duk_def_prop_index(duk_context *ctx, int obj_index, unsigned int arr_index, int desc_flags); /* [val] -> [] */

4
src/duk_api_object.c

@ -63,9 +63,7 @@ int duk_get_prop_stridx(duk_context *ctx, int obj_index, unsigned int stridx) {
return duk_get_prop(ctx, obj_index);
}
int duk_get_prop_stridx_boolean_raw(duk_context *ctx, int obj_index_and_stridx, int *out_has_prop) {
int obj_index = obj_index_and_stridx >> 16;
int stridx = obj_index_and_stridx & 0xffff;
int duk_get_prop_stridx_boolean(duk_context *ctx, int obj_index, duk_small_int_t stridx, int *out_has_prop) {
int rc;
DUK_ASSERT(ctx != NULL);

Loading…
Cancel
Save