|
|
@ -141,7 +141,7 @@ static duk_ret_t test_slice(duk_context *ctx, void *udata) { |
|
|
|
sz = (duk_size_t) 0xdeadbeefUL; |
|
|
|
p = duk_get_buffer_data_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL); |
|
|
|
if (p) { |
|
|
|
printf("p is not NULL, sz=%ld\n", (long) sz); |
|
|
|
printf("p is not NULL, sz=%lu\n", (unsigned long) sz); |
|
|
|
for (i = 0; i < sz; i++) { |
|
|
|
printf("p[%ld] = 0x%02x\n", (long) i, (unsigned int) p[i]); |
|
|
|
} |
|
|
@ -183,7 +183,7 @@ static duk_ret_t test_uncovered_buffer(duk_context *ctx, void *udata) { |
|
|
|
sz = (duk_size_t) 0xdeadbeefUL; |
|
|
|
p = duk_get_buffer_data_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL); |
|
|
|
if (p) { |
|
|
|
printf("p is not NULL, sz=%ld\n", (long) sz); |
|
|
|
printf("p is not NULL, sz=%lu\n", (unsigned long) sz); |
|
|
|
} else { |
|
|
|
printf("p is NULL\n"); |
|
|
|
} |
|
|
@ -193,7 +193,7 @@ static duk_ret_t test_uncovered_buffer(duk_context *ctx, void *udata) { |
|
|
|
sz = (duk_size_t) 0xdeadbeefUL; |
|
|
|
p = duk_get_buffer_data_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL); |
|
|
|
if (p) { |
|
|
|
printf("p is not NULL, sz=%ld\n", (long) sz); |
|
|
|
printf("p is not NULL, sz=%lu\n", (unsigned long) sz); |
|
|
|
} else { |
|
|
|
printf("p is NULL\n"); |
|
|
|
} |
|
|
@ -203,7 +203,7 @@ static duk_ret_t test_uncovered_buffer(duk_context *ctx, void *udata) { |
|
|
|
sz = (duk_size_t) 0xdeadbeefUL; |
|
|
|
p = duk_get_buffer_data_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL); |
|
|
|
if (p) { |
|
|
|
printf("p is not NULL, sz=%ld\n", (long) sz); |
|
|
|
printf("p is not NULL, sz=%lu\n", (unsigned long) sz); |
|
|
|
} else { |
|
|
|
printf("p is NULL\n"); |
|
|
|
} |
|
|
@ -228,7 +228,7 @@ static duk_ret_t test_invalid_index(duk_context *ctx, void *udata) { |
|
|
|
sz = (duk_size_t) 0xdeadbeefUL; |
|
|
|
p = duk_get_buffer_data_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL); |
|
|
|
if (p) { |
|
|
|
printf("p is not NULL, sz=%ld\n", (long) sz); |
|
|
|
printf("p is not NULL, sz=%lu\n", (unsigned long) sz); |
|
|
|
} else { |
|
|
|
printf("p is NULL\n"); |
|
|
|
} |
|
|
|