You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<div class="note">
|
|
|
|
Default pointer values given to duk_opt_xxx() and duk_get_xxx_default() are
|
|
|
|
not tracked by Duktape, e.g. duk_opt_string() does not make a copy of the
|
|
|
|
default string argument. The caller is responsible for ensuring that the
|
|
|
|
default pointer remains valid for its intended use. For example,
|
|
|
|
duk_opt_string(ctx, 3, "localhost") works fine because a string constant is
|
|
|
|
always valid, but if the argument is a libc allocated string, caller must
|
|
|
|
ensure the pointer returned from duk_opt_string() is not used beyond the
|
|
|
|
lifetime of the libc allocated string.
|
|
|
|
</div>
|