Functions#
- get_major_version() int #
Returns the major version number of the JavaScriptCore library. (e.g. in JavaScriptCore version 1.8.3 this is 1.)
This function is in the library, so it represents the JavaScriptCore library your code is running against. Contrast with the
JSC_MAJOR_VERSION
macro, which represents the major version of the JavaScriptCore headers you have included when compiling your code.- Returns:
the major version number of the JavaScriptCore library
- get_micro_version() int #
Returns the micro version number of the JavaScriptCore library. (e.g. in JavaScriptCore version 1.8.3 this is 3.)
This function is in the library, so it represents the JavaScriptCore library your code is running against. Contrast with the
JSC_MICRO_VERSION
macro, which represents the micro version of the JavaScriptCore headers you have included when compiling your code.- Returns:
the micro version number of the JavaScriptCore library
- get_minor_version() int #
Returns the minor version number of the JavaScriptCore library. (e.g. in JavaScriptCore version 1.8.3 this is 8.)
This function is in the library, so it represents the JavaScriptCore library your code is running against. Contrast with the
JSC_MINOR_VERSION
macro, which represents the minor version of the JavaScriptCore headers you have included when compiling your code.- Returns:
the minor version number of the JavaScriptCore library
- options_foreach(function: Callable[[str, OptionType, str | None, Any], bool], user_data: Any = None) None #
Iterates all available options calling
function
for each one. Iteration can stop early iffunction
returnsFalse
.Added in version 2.24.
- Parameters:
function – a
OptionsFunc
callbackuser_data – callback user data
- options_get_boolean(option: str) Tuple[bool, bool] #
Get
option
as agboolean
value.Added in version 2.24.
- Parameters:
option – the option identifier
- Returns:
True
ifvalue
has been set orFalse
if the option doesn’t exist
- options_get_double(option: str) Tuple[bool, float] #
Get
option
as afloat
value.Added in version 2.24.
- Parameters:
option – the option identifier
- Returns:
True
ifvalue
has been set orFalse
if the option doesn’t exist
- options_get_int(option: str) Tuple[bool, int] #
Get
option
as aint
value.Added in version 2.24.
- Parameters:
option – the option identifier
- Returns:
True
ifvalue
has been set orFalse
if the option doesn’t exist
- options_get_option_group() OptionGroup #
Create a
OptionGroup
to handle JSCOptions as command line arguments. The options will be exposed as command line arguments with the form <emphasis>–jsc-wzxhzdk:0optionwzxhzdk:1=wzxhzdk:2valuewzxhzdk:3</emphasis>. Each entry in the returnedOptionGroup
is configured to apply the corresponding option during command line parsing. Applications only need to pass the returned group toadd_group()
, and the rest will be taken care for automatically.Added in version 2.24.
- Returns:
a
OptionGroup
for the JSCOptions
- options_get_range_string(option: str) Tuple[bool, str] #
Get
option
as a range string. The string must be in the format <emphasis>[!]wzxhzdk:0lowwzxhzdk:1[:wzxhzdk:2highwzxhzdk:3]</emphasis> where low and high areint
values. Values between low and high (both included) will be considered in the range, unless <emphasis>!</emphasis> is used to invert the range.Added in version 2.24.
- Parameters:
option – the option identifier
- Returns:
True
ifvalue
has been set orFalse
if the option doesn’t exist
- options_get_size(option: str) Tuple[bool, int] #
Get
option
as agsize
value.Added in version 2.24.
- Parameters:
option – the option identifier
- Returns:
True
ifvalue
has been set orFalse
if the option doesn’t exist
- options_get_string(option: str) Tuple[bool, str] #
Get
option
as a string.Added in version 2.24.
- Parameters:
option – the option identifier
- Returns:
True
ifvalue
has been set orFalse
if the option doesn’t exist
- options_get_uint(option: str) Tuple[bool, int] #
Get
option
as aint
value.Added in version 2.24.
- Parameters:
option – the option identifier
- Returns:
True
ifvalue
has been set orFalse
if the option doesn’t exist
- options_set_boolean(option: str, value: bool) bool #
Set
option
as agboolean
value.Added in version 2.24.
- Parameters:
option – the option identifier
value – the value to set
- Returns:
True
if option was correctly set orFalse
otherwise.
- options_set_double(option: str, value: float) bool #
Set
option
as afloat
value.Added in version 2.24.
- Parameters:
option – the option identifier
value – the value to set
- Returns:
True
if option was correctly set orFalse
otherwise.
- options_set_int(option: str, value: int) bool #
Set
option
as aint
value.Added in version 2.24.
- Parameters:
option – the option identifier
value – the value to set
- Returns:
True
if option was correctly set orFalse
otherwise.
- options_set_range_string(option: str, value: str) bool #
Set
option
as a range string. The string must be in the format <emphasis>[!]wzxhzdk:0lowwzxhzdk:1[:wzxhzdk:2highwzxhzdk:3]</emphasis> where low and high areint
values. Values between low and high (both included) will be considered in the range, unless <emphasis>!</emphasis> is used to invert the range.Added in version 2.24.
- Parameters:
option – the option identifier
value – the value to set
- Returns:
True
if option was correctly set orFalse
otherwise.
- options_set_size(option: str, value: int) bool #
Set
option
as agsize
value.Added in version 2.24.
- Parameters:
option – the option identifier
value – the value to set
- Returns:
True
if option was correctly set orFalse
otherwise.