Browse Source
Merge pull request #2074 from svaarala/apidoc-call-method-fix
Fix duk_(p)call_method() API doc example
pull/2078/head
Sami Vaarala
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
4 deletions
-
website/api/duk_call_method.yaml
-
website/api/duk_pcall_method.yaml
|
|
@ -33,8 +33,8 @@ example: | |
|
|
|
* and returns 5. |
|
|
|
*/ |
|
|
|
|
|
|
|
duk_push_string(ctx, "function(x,y) { print('this:', this); " |
|
|
|
"print(x,y); return x+y; }"); |
|
|
|
duk_push_string(ctx, "(function(x,y) { print('this:', this); " |
|
|
|
"print(x,y); return x+y; })"); |
|
|
|
duk_eval(ctx); /* -> [ ... func ] */ |
|
|
|
duk_push_int(ctx, 123); |
|
|
|
duk_push_int(ctx, 2); |
|
|
|
|
|
@ -23,8 +23,8 @@ example: | |
|
|
|
|
|
|
|
duk_int_t rc; |
|
|
|
|
|
|
|
duk_push_string(ctx, "function(x,y) { print('this:', this); " |
|
|
|
"print(x,y); return x+y; }"); |
|
|
|
duk_push_string(ctx, "(function(x,y) { print('this:', this); " |
|
|
|
"print(x,y); return x+y; })"); |
|
|
|
duk_eval(ctx); /* -> [ ... func ] */ |
|
|
|
duk_push_int(ctx, 123); |
|
|
|
duk_push_int(ctx, 2); |
|
|
|