Browse Source

add an initial set of (more or less random) tags to api docs

pull/1/head
Sami Vaarala 11 years ago
parent
commit
e1668bf9b7
  1. 3
      website/api/duk_alloc.txt
  2. 3
      website/api/duk_alloc_raw.txt
  3. 2
      website/api/duk_base64_decode.txt
  4. 2
      website/api/duk_base64_encode.txt
  5. 5
      website/api/duk_compact.txt
  6. 3
      website/api/duk_compile.txt
  7. 3
      website/api/duk_compile_string.txt
  8. 3
      website/api/duk_concat.txt
  9. 3
      website/api/duk_create_heap.txt
  10. 2
      website/api/duk_create_heap_default.txt
  11. 3
      website/api/duk_decode_string.txt
  12. 3
      website/api/duk_destroy_heap.txt
  13. 3
      website/api/duk_dup.txt
  14. 3
      website/api/duk_dup_top.txt
  15. 4
      website/api/duk_enum.txt
  16. 3
      website/api/duk_equals.txt
  17. 3
      website/api/duk_error.txt
  18. 3
      website/api/duk_eval.txt
  19. 3
      website/api/duk_eval_string.txt
  20. 3
      website/api/duk_fatal.txt
  21. 3
      website/api/duk_free.txt
  22. 3
      website/api/duk_free_raw.txt
  23. 3
      website/api/duk_get_boolean.txt
  24. 4
      website/api/duk_get_buffer.txt
  25. 4
      website/api/duk_get_c_function.txt
  26. 3
      website/api/duk_get_context.txt
  27. 3
      website/api/duk_get_int.txt
  28. 3
      website/api/duk_get_length.txt
  29. 3
      website/api/duk_get_lstring.txt
  30. 4
      website/api/duk_get_memory_functions.txt
  31. 3
      website/api/duk_get_pointer.txt
  32. 4
      website/api/duk_get_string.txt
  33. 3
      website/api/duk_get_top.txt
  34. 3
      website/api/duk_get_type.txt
  35. 3
      website/api/duk_get_type_mask.txt
  36. 1
      website/api/duk_has_prop.txt
  37. 1
      website/api/duk_has_prop_index.txt
  38. 1
      website/api/duk_has_prop_string.txt
  39. 2
      website/api/duk_hex_decode.txt
  40. 3
      website/api/duk_hex_encode.txt
  41. 3
      website/api/duk_insert.txt
  42. 3
      website/api/duk_is_array.txt
  43. 3
      website/api/duk_is_boolean.txt
  44. 4
      website/api/duk_is_bound_function.txt
  45. 4
      website/api/duk_is_buffer.txt
  46. 4
      website/api/duk_is_c_function.txt
  47. 3
      website/api/duk_is_callable.txt
  48. 3
      website/api/duk_is_constructor_call.txt
  49. 3
      website/api/duk_is_dynamic.txt
  50. 4
      website/api/duk_is_ecmascript_function.txt
  51. 3
      website/api/duk_is_fixed.txt
  52. 4
      website/api/duk_is_function.txt
  53. 3
      website/api/duk_is_nan.txt
  54. 3
      website/api/duk_is_null.txt
  55. 3
      website/api/duk_is_null_or_undefined.txt
  56. 3
      website/api/duk_is_number.txt
  57. 4
      website/api/duk_is_object.txt
  58. 4
      website/api/duk_is_object_coercible.txt
  59. 3
      website/api/duk_is_pointer.txt
  60. 3
      website/api/duk_is_primitive.txt
  61. 3
      website/api/duk_is_strict_call.txt
  62. 4
      website/api/duk_is_string.txt
  63. 3
      website/api/duk_is_thread.txt
  64. 3
      website/api/duk_is_undefined.txt
  65. 3
      website/api/duk_is_valid_index.txt
  66. 3
      website/api/duk_join.txt
  67. 2
      website/api/duk_json_decode.txt
  68. 2
      website/api/duk_json_encode.txt
  69. 3
      website/api/duk_map_string.txt
  70. 4
      website/api/duk_new.txt
  71. 3
      website/api/duk_next.txt
  72. 3
      website/api/duk_normalize_index.txt
  73. 3
      website/api/duk_pop.txt
  74. 3
      website/api/duk_pop_2.txt
  75. 3
      website/api/duk_pop_3.txt
  76. 3
      website/api/duk_pop_n.txt
  77. 4
      website/api/duk_push_array.txt
  78. 4
      website/api/duk_push_boolean.txt
  79. 4
      website/api/duk_push_buffer.txt
  80. 4
      website/api/duk_push_c_function.txt
  81. 4
      website/api/duk_push_current_function.txt
  82. 4
      website/api/duk_push_current_thread.txt
  83. 4
      website/api/duk_push_dynamic_buffer.txt
  84. 4
      website/api/duk_push_error_object.txt
  85. 3
      website/api/duk_push_false.txt
  86. 4
      website/api/duk_push_fixed_buffer.txt
  87. 4
      website/api/duk_push_global_object.txt
  88. 3
      website/api/duk_push_int.txt
  89. 3
      website/api/duk_push_lstring.txt
  90. 2
      website/api/duk_push_nan.txt
  91. 2
      website/api/duk_push_null.txt
  92. 3
      website/api/duk_push_number.txt
  93. 4
      website/api/duk_push_object.txt
  94. 3
      website/api/duk_push_pointer.txt
  95. 4
      website/api/duk_push_sprintf.txt
  96. 3
      website/api/duk_push_string.txt
  97. 4
      website/api/duk_push_this.txt
  98. 3
      website/api/duk_push_thread.txt
  99. 4
      website/api/duk_push_true.txt
  100. 2
      website/api/duk_push_undefined.txt

3
website/api/duk_alloc.txt

@ -24,5 +24,8 @@ if (buf) {
printf("allocation failed\n");
}
=tags
memory
=fixme
Zero allocated memory automatically?

3
website/api/duk_alloc_raw.txt

@ -21,5 +21,8 @@ if (buf) {
printf("allocation failed\n");
}
=tags
memory
=fixme
Zero allocated memory automatically?

2
website/api/duk_base64_decode.txt

@ -18,3 +18,5 @@ duk_pop(ctx);
* base-64 decoded: foo
*/
=tags
codec

2
website/api/duk_base64_encode.txt

@ -23,3 +23,5 @@ printf("base-64 encoded: %s\n", duk_base64_encode(ctx, -1));
* base-64 encoded: Zm9v
*/
=tags
codec

5
website/api/duk_compact.txt

@ -39,6 +39,11 @@ duk_push_int(ctx, 42); /* [ ... obj 42 ] */
duk_put_prop_string(ctx, -2, "meaningOfLife"); /* [ ... obj ] */
duk_compact(ctx, -1); /* [ ... obj ] */
=tags
object
property
memory
=fixme
Clarify that compaction only affects an object's "own properties".

3
website/api/duk_compile.txt

@ -132,6 +132,9 @@ duk_call(ctx, 2); /* [ func 5 6 ] -> [ result ] */
printf("function result: %lf\n", duk_get_number(ctx, -1));
duk_pop(ctx);
=tags
compile
=fixme
Remove DUK_COMPILE_FUNCTION, one can simply just eval a function expression?
Practical difference between program/eval code, because there is never a

3
website/api/duk_compile_string.txt

@ -11,3 +11,6 @@ is given as a C string.</p>
=example
duk_compile_string(ctx, 0, "print('program code');");
=tags
compile

3
website/api/duk_concat.txt

@ -20,3 +20,6 @@ duk_concat(ctx, 3);
printf("result: %s\n", duk_get_string(ctx, -1)); /* "foo123true" */
duk_pop(ctx);
=tags
string

3
website/api/duk_create_heap.txt

@ -62,3 +62,6 @@ if (ctx) {
/* error */
}
=tags
heap

2
website/api/duk_create_heap_default.txt

@ -24,3 +24,5 @@ if (ctx) {
/* error */
}
=tags
heap

3
website/api/duk_decode_string.txt

@ -18,6 +18,9 @@ static void decode_char(void *udata, int codepoint) {
duk_push_string(ctx, "test_string");
duk_decode_string(ctx, -1, decode_char, NULL);
=tags
string
=fixme
Currently implemented. Necessary?

3
website/api/duk_destroy_heap.txt

@ -11,3 +11,6 @@ linked to the heap, and also all string and buffer pointers within the heap.</p>
=example
duk_destroy_heap(ctx);
=tags
heap

3
website/api/duk_dup.txt

@ -12,3 +12,6 @@ If <tt>from_index</tt> is invalid, throws an error.</p>
duk_push_int(ctx, 123); /* -> [ ... 123 ] */
duk_push_int(ctx, 234); /* -> [ ... 123 234 ] */
duk_dup(ctx, -2); /* -> [ ... 123 234 123 ] */
=tags
stack

3
website/api/duk_dup_top.txt

@ -15,3 +15,6 @@ If the value stack is empty, throws an error.</p>
duk_push_int(ctx, 123); /* -> [ ... 123 ] */
duk_push_int(ctx, 234); /* -> [ ... 123 234 ] */
duk_dup_top(ctx, -2); /* -> [ ... 123 234 234 ] */
=tags
stack

4
website/api/duk_enum.txt

@ -46,3 +46,7 @@ while (duk_next(ctx, -1 /*enum_index*/, 0 /*get_value*/)) {
}
duk_pop(ctx); /* pop enum object */
=tags
object
property

3
website/api/duk_equals.txt

@ -23,5 +23,8 @@ if (duk_equals(ctx, -3, -7)) {
printf("values at indices -3 and -7 are equal\n");
}
=tags
compare
=fixme
Currently buffer equality does not cause buffer contents to be compared.

3
website/api/duk_error.txt

@ -20,3 +20,6 @@ based on <tt>err_code</tt>. For instance, <tt>DUK_ERR_RANGE_ERROR</tt> causes t
=example
duk_error(ctx, DUK_ERR_RANGE_ERROR, "argument out of range: %d", argval);
=tags
error

3
website/api/duk_eval.txt

@ -32,5 +32,8 @@ duk_eval(ctx);
printf("return value is: %lf\n", duk_get_number(ctx, -1));
duk_pop(ctx);
=tags
compile
=fixme
Remove?

3
website/api/duk_eval_string.txt

@ -14,6 +14,9 @@ duk_eval_string(ctx, "'testString'.toUpperCase()");
printf("result is: '%s'\n", duk_get_string(ctx, -1));
duk_pop(ctx);
=tags
compile
=fixme
Remove? Note that this is a macro somewhere?

3
website/api/duk_fatal.txt

@ -12,5 +12,8 @@ this function when a truly fatal, unrecoverable error has occurred.</p>
=example
duk_fatal(ctx, DUK_ERR_INTERNAL_ERROR);
=tags
error
=fixme
Useful to expose? No message.

3
website/api/duk_free.txt

@ -21,3 +21,6 @@ void *buf = duk_alloc(ctx, 1024);
/* ... */
duk_free(ctx, buf); /* safe even if 'buf' is NULL */
=tags
memory

3
website/api/duk_free_raw.txt

@ -16,3 +16,6 @@ void *buf = duk_alloc_raw(ctx, 1024);
/* ... */
duk_free_raw(ctx, buf); /* safe even if 'buf' is NULL */
=tags
memory

3
website/api/duk_get_boolean.txt

@ -18,6 +18,9 @@ if (duk_get_boolean(ctx, -3)) {
printf("value is true\n");
}
=tags
stack
=fixme
An API primitive which coerces but doesn't modify value? This would be
closest to ordinary Ecmascript use. The current behavior comes from the

4
website/api/duk_get_buffer.txt

@ -26,3 +26,7 @@ size_t sz;
ptr = duk_get_buffer(ctx, &sz);
printf("buf=%p, size=%d\n", ptr, (int) sz);
=tags
stack
buffer

4
website/api/duk_get_c_function.txt

@ -16,3 +16,7 @@ value is not such a function or <tt>index</tt> is invalid, returns <tt>NULL</tt>
duk_c_function funcptr;
funcptr = duk_get_c_function(ctx, -3);
=tags
stack
function

3
website/api/duk_get_context.txt

@ -37,3 +37,6 @@ duk_push_string(new_ctx, "foo");
duk_pop(ctx);
/* Using new_ctx here may cause a crash. */
=tags
stack

3
website/api/duk_get_int.txt

@ -34,3 +34,6 @@ NaN to INT_MIN. The coercion is also different from Ecmascript
=example
printf("int value: %d\n", duk_get_int(ctx, -3));
=tags
stack

3
website/api/duk_get_length.txt

@ -23,6 +23,9 @@ if (duk_is_string(ctx, -3)) {
printf("string char len is %d\n", duk_get_length(ctx, -3));
}
=tags
stack
=fixme
Handling of object length is a bit curious as it is not clamped or
checked against the size_t range. The 32-bit unsigned range comes

3
website/api/duk_get_lstring.txt

@ -29,3 +29,6 @@ buf = duk_get_lstring(ctx, -3, &len);
if (buf) {
printf("value is a string, %d bytes\n", (int) len);
}
=tags
stack

4
website/api/duk_get_memory_functions.txt

@ -15,3 +15,7 @@ such as
duk_memory_functions funcs;
duk_get_memory_functions(ctx, &funcs);
=tags
memory
heap

3
website/api/duk_get_pointer.txt

@ -14,3 +14,6 @@ void *ptr;
ptr = duk_get_pointer(ctx, -3);
printf("my pointer is: %p\n", ptr);
=tags
stack

4
website/api/duk_get_string.txt

@ -26,3 +26,7 @@ buf = duk_get_string(ctx);
if (buf) {
printf("value is a string: %s\n", buf);
}
=tags
stack
string

3
website/api/duk_get_top.txt

@ -8,6 +8,9 @@ the value stack (of the current activation).</p>
=example
printf("stack top is %d\n", duk_get_top(ctx));
=tags
stack
=fixme
Return value is an int, unsigned int would be more accurate but probably
inconvenient for calling code (signedness), and would not match

3
website/api/duk_get_type.txt

@ -13,3 +13,6 @@ invalid.</p>
if (duk_get_type(ctx, -3) == DUK_TYPE_NUMBER) {
printf("value is a number\n");
}
=tags
stack

3
website/api/duk_get_type_mask.txt

@ -16,3 +16,6 @@ if (duk_get_type_mask(ctx, -3) & (DUK_TYPE_MASK_STRING |
DUK_TYPE_MASK_NUMBER)) {
printf("value is a string or a number\n");
}
=tags
stack

1
website/api/duk_has_prop.txt

@ -58,3 +58,4 @@ if (duk_has_prop(ctx, -3)) {
=tags
property
stack

1
website/api/duk_has_prop_index.txt

@ -24,3 +24,4 @@ if (duk_has_prop_index(ctx, -3, 123)) {
=tags
property
stack

1
website/api/duk_has_prop_string.txt

@ -18,3 +18,4 @@ if (duk_has_prop(ctx, -3, "myProperty")) {
=tags
property
stack

2
website/api/duk_hex_decode.txt

@ -18,3 +18,5 @@ duk_pop(ctx);
* hex decoded: test string
*/
=tags
codec

3
website/api/duk_hex_encode.txt

@ -22,3 +22,6 @@ printf("hex encoded: %s\n", duk_hex_encode(ctx, -1));
/* Output:
* hex encoded: 666f6f
*/
=tags
codec

3
website/api/duk_insert.txt

@ -21,3 +21,6 @@ duk_push_int(ctx, 234);
duk_push_int(ctx, 345); /* -> [ 123 234 345 ] */
duk_push_string(ctx, "foo"); /* -> [ 123 234 345 "foo" ] */
duk_insert(ctx, -3); /* -> [ 123 "foo" 234 345 ] */
=tags
stack

3
website/api/duk_is_array.txt

@ -18,3 +18,6 @@ Object.prototype.toString.call(val) === '[object Array]'
if (duk_is_array(ctx, -3)) {
/* ... */
}
=tags
stack

3
website/api/duk_is_boolean.txt

@ -12,3 +12,6 @@ returns 0. If <tt>index</tt> is invalid, also returns 0.</p>
if (duk_is_boolean(ctx, -3)) {
/* ... */
}
=tags
stack

4
website/api/duk_is_bound_function.txt

@ -19,3 +19,7 @@ bindings. See
if (duk_is_bound_function(ctx, -3)) {
/* ... */
}
=tags
stack
function

4
website/api/duk_is_buffer.txt

@ -12,3 +12,7 @@ returns 0. If <tt>index</tt> is invalid, also returns 0.</p>
if (duk_is_buffer(ctx, -3)) {
/* ... */
}
=tags
stack
buffer

4
website/api/duk_is_c_function.txt

@ -21,3 +21,7 @@ int my_func(duk_context *ctx) {
if (duk_is_c_function(ctx, -3)) {
/* ... */
}
=tags
stack
function

3
website/api/duk_is_callable.txt

@ -15,3 +15,6 @@ Also returns 0 if <tt>index</tt> is invalid.</p>
if (duk_is_callable(ctx, -3)) {
/* ... */
}
=tags
stack

3
website/api/duk_is_constructor_call.txt

@ -14,3 +14,6 @@ if (duk_is_constructor_call(ctx)) {
} else {
printf("called as a normal function\n");
}
=tags
stack

3
website/api/duk_is_dynamic.txt

@ -13,3 +13,6 @@ returns 0.</p>
if (duk_is_dynamic(ctx, -3)) {
/* ... */
}
=tags
stack

4
website/api/duk_is_ecmascript_function.txt

@ -16,3 +16,7 @@ with the Ecmascript bytecode interpreter.</p>
if (duk_is_ecmascript_function(ctx, -3)) {
/* ... */
}
=tags
stack
function

3
website/api/duk_is_fixed.txt

@ -13,3 +13,6 @@ returns 0.</p>
if (duk_is_fixed(ctx, -3)) {
/* ... */
}
=tags
stack

4
website/api/duk_is_function.txt

@ -25,3 +25,7 @@ Object.prototype.toString.call(val) === '[object Function]'
if (duk_is_function(ctx, -3)) {
/* ... */
}
=tags
stack
function

3
website/api/duk_is_nan.txt

@ -17,3 +17,6 @@ for any kind of a <tt>NaN</tt>.</p>
if (duk_is_nan(ctx, -3)) {
/* ... */
}
=tags
stack

3
website/api/duk_is_null.txt

@ -12,3 +12,6 @@ returns 0. If <tt>index</tt> is invalid, also returns 0.</p>
if (duk_is_null(ctx, -3)) {
/* ... */
}
=tags
stack

3
website/api/duk_is_null_or_undefined.txt

@ -15,3 +15,6 @@ is true for both <tt>null</tt> and <tt>undefined</tt>.</p>
if (duk_is_null_or_undefined(ctx, -3)) {
/* ... */
}
=tags
stack

3
website/api/duk_is_number.txt

@ -12,3 +12,6 @@ returns 0. If <tt>index</tt> is invalid, also returns 0.</p>
if (duk_is_number(ctx, -3)) {
/* ... */
}
=tags
stack

4
website/api/duk_is_object.txt

@ -25,3 +25,7 @@ e.g. <tt><a href="#duk_is_array">duk_is_array()</a></tt>.</p>
if (duk_is_object(ctx, -3)) {
/* ... */
}
=tags
stack
object

4
website/api/duk_is_object_coercible.txt

@ -18,5 +18,9 @@ if (duk_is_object_coercible(ctx, -3)) {
/* ... */
}
=tags
stack
object
=fixme
Make buffer and pointer object coercible, and give them a prototype object?

3
website/api/duk_is_pointer.txt

@ -12,3 +12,6 @@ returns 0. If <tt>index</tt> is invalid, also returns 0.</p>
if (duk_is_pointer(ctx, -3)) {
/* ... */
}
=tags
stack

3
website/api/duk_is_primitive.txt

@ -16,3 +16,6 @@ custom buffer and pointer types.</p>
if (duk_is_primitive(ctx, -3)) {
/* ... */
}
=tags
stack

3
website/api/duk_is_strict_call.txt

@ -19,5 +19,8 @@ if (duk_is_strict_call(ctx)) {
printf("non-strict call\n");
}
=tags
function
=fixme
Necessary?

4
website/api/duk_is_string.txt

@ -12,3 +12,7 @@ returns 0. If <tt>index</tt> is invalid, also returns 0.</p>
if (duk_is_string(ctx, -3)) {
/* ... */
}
=tags
stack
string

3
website/api/duk_is_thread.txt

@ -13,3 +13,6 @@ also returns 0.</p>
if (duk_is_thread(ctx, -3)) {
/* ... */
}
=tags
stack

3
website/api/duk_is_undefined.txt

@ -12,3 +12,6 @@ returns 0. If <tt>index</tt> is invalid, also returns 0.</p>
if (duk_is_undefined(ctx, -3)) {
/* ... */
}
=tags
stack

3
website/api/duk_is_valid_index.txt

@ -13,3 +13,6 @@ if (duk_is_valid_index(ctx, -3)) {
} else {
printf("index -3 is not valid\n");
}
=tags
stack

3
website/api/duk_join.txt

@ -22,3 +22,6 @@ duk_join(ctx, 3);
printf("result: %s\n", duk_get_string(ctx, -1)); /* "foo; 123; true" */
duk_pop(ctx);
=tags
string

2
website/api/duk_json_decode.txt

@ -19,3 +19,5 @@ duk_pop_2(ctx);
* JSON decoded meaningOfLife is: 42
*/
=tags
codec

2
website/api/duk_json_encode.txt

@ -19,3 +19,5 @@ duk_pop(ctx);
* JSON encoded: {"meaningOfLife":42}
*/
=tags
codec

3
website/api/duk_map_string.txt

@ -25,5 +25,8 @@ duk_map_string(ctx, -1, map_char, NULL);
printf("result: '%s'\n", duk_to_string(ctx, -1));
duk_pop(ctx);
=tags
string
=fixme
Currently implemented. Necessary?

4
website/api/duk_new.txt

@ -34,3 +34,7 @@ duk_push_int(ctx, 123);
duk_new(ctx, 2); /* [ ... func "foo" 123 ] -> [ ... res ] */
printf("result is object: %d\n", duk_is_object(ctx, -1));
duk_pop(ctx);
=tags
object
call

3
website/api/duk_next.txt

@ -23,3 +23,6 @@ while (duk_next(ctx, enum_idx, 1)) {
duk_pop_2(ctx);
}
=tags
object
property

3
website/api/duk_normalize_index.txt

@ -16,3 +16,6 @@ an invalid index, use
=example
int idx = duk_normalize_index(-3);
=tags
stack

3
website/api/duk_pop.txt

@ -14,3 +14,6 @@ void duk_pop(duk_context *ctx);
=example
duk_pop(ctx);
=tags
stack

3
website/api/duk_pop_2.txt

@ -10,3 +10,6 @@ throws an error.</p>
=example
duk_pop_2(ctx);
=tags
stack

3
website/api/duk_pop_3.txt

@ -10,3 +10,6 @@ throws an error.</p>
=example
duk_pop_3(ctx);
=tags
stack

3
website/api/duk_pop_n.txt

@ -11,3 +11,6 @@ call is a no-op.</p>
=example
duk_pop_n(ctx, 10);
=tags
stack

4
website/api/duk_push_array.txt

@ -23,6 +23,10 @@ duk_put_prop_index(ctx, arr_idx, 1);
duk_pop(ctx); /* pop array */
=tags
stack
object
=fixme
There is no way to give an initial size for array.
This would be useful to minimize memory allocations.

4
website/api/duk_push_boolean.txt

@ -12,3 +12,7 @@ void duk_push_boolean(duk_context *ctx, int val);
duk_push_boolean(ctx, 0); /* -> [ ... false ] */
duk_push_boolean(ctx, 1); /* -> [ ... false true ] */
duk_push_boolean(ctx, -3); /* -> [ ... false true true ] */
=tags
stack

4
website/api/duk_push_buffer.txt

@ -30,3 +30,7 @@ void *p;
p = duk_push_buffer(ctx, 1024, 0);
printf("allocated buffer, data area: %p\n", p);
=tags
stack
buffer

4
website/api/duk_push_c_function.txt

@ -50,3 +50,7 @@ int test(void) {
printf("2+3 is %d\n", duk_get_int(ctx, -1));
duk_pop(ctx);
}
=tags
stack
function

4
website/api/duk_push_current_function.txt

@ -17,3 +17,7 @@ can also act as an internal state stash.</p>
=example
duk_push_current_function(ctx);
=tags
stack
function

4
website/api/duk_push_current_thread.txt

@ -17,3 +17,7 @@ thread, <tt>undefined</tt> is pushed instead.</p>
=example
duk_push_thread(ctx);
=tags
stack
function

4
website/api/duk_push_dynamic_buffer.txt

@ -14,3 +14,7 @@ void *p;
p = duk_push_dynamic_buffer(ctx, 1024);
printf("allocated buffer, data area: %p\n", p);
=tags
stack
buffer

4
website/api/duk_push_error_object.txt

@ -19,3 +19,7 @@ int err_idx;
err_idx = duk_push_error_object(ctx, DUK_ERR_TYPE_ERROR, "invalid argument value: %d", arg_value);
=tags
stack
object
error

3
website/api/duk_push_false.txt

@ -10,3 +10,6 @@ void duk_push_false(duk_context *ctx);
=example
duk_push_false(ctx);
=tags
stack

4
website/api/duk_push_fixed_buffer.txt

@ -14,3 +14,7 @@ void *p;
p = duk_push_fixed_buffer(ctx, 1024);
printf("allocated buffer, data area: %p\n", p);
=tags
stack
buffer

4
website/api/duk_push_global_object.txt

@ -9,3 +9,7 @@ void duk_push_global_object(duk_context *ctx);
=example
duk_push_global_object(ctx);
=tags
stack
object

3
website/api/duk_push_int.txt

@ -12,3 +12,6 @@ void duk_push_int(duk_context *ctx, int val);
=example
duk_push_int(ctx, 123);
=tags
stack

3
website/api/duk_push_lstring.txt

@ -27,3 +27,6 @@ duk_push_lstring(ctx, tmp2, 0); /* push empty string */
duk_push_lstring(ctx, NULL, 0); /* push empty string */
duk_push_lstring(ctx, NULL, 10); /* push empty string */
=tags
stack
string

2
website/api/duk_push_nan.txt

@ -12,3 +12,5 @@ duk_push_nan(ctx);
printf("NaN is number: %d\n", duk_is_number(ctx, -1));
=tags
stack

2
website/api/duk_push_null.txt

@ -10,3 +10,5 @@ void duk_push_null(duk_context *ctx);
=example
duk_push_null(ctx);
=tags
stack

3
website/api/duk_push_number.txt

@ -12,3 +12,6 @@ void duk_push_number(duk_context *ctx, double val);
=example
duk_push_number(ctx, 123.0);
=tags
stack

4
website/api/duk_push_object.txt

@ -19,6 +19,10 @@ duk_put_prop_string(ctx, obj_idx, "meaningOfLife");
duk_pop(ctx); /* pop object */
=tags
stack
object
=fixme
There is no way to give an initial size for object property table.
This would be useful to minimize memory allocations.

3
website/api/duk_push_pointer.txt

@ -12,3 +12,6 @@ interpret the pointer in any manner.</p>
struct mystruct *p;
duk_push_pointer(ctx, (void *) p);
=tags
stack

4
website/api/duk_push_sprintf.txt

@ -22,3 +22,7 @@ large enough buffer is found for the temporary formatted value.</p>
=example
duk_push_sprintf(ctx, "meaning of life: %d, name: %s",
42, "Zaphod");
=tags
stack
string

3
website/api/duk_push_string.txt

@ -26,3 +26,6 @@ duk_push_string(ctx, "foo\0bar"); /* push "foo", not "foo\0bar" */
duk_push_string(ctx, ""); /* push empty string */
duk_push_string(ctx, NULL); /* push 'null' */
=tags
stack
string

4
website/api/duk_push_this.txt

@ -10,3 +10,7 @@ the stack.</p>
=example
duk_push_this(ctx);
=tags
stack
function

3
website/api/duk_push_thread.txt

@ -20,3 +20,6 @@ duk_context *new_ctx;
thr_idx = duk_push_thread(ctx);
new_ctx = duk_get_context(ctx, thr_idx);
=tags
stack

4
website/api/duk_push_true.txt

@ -10,3 +10,7 @@ void duk_push_true(duk_context *ctx);
=example
duk_push_true(ctx);
=tags
stack

2
website/api/duk_push_undefined.txt

@ -10,3 +10,5 @@ void duk_push_undefined(duk_context *ctx);
=example
duk_push_undefined(ctx);
=tags
stack

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save