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_VERSIONmacro, 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_VERSIONmacro, 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_VERSIONmacro, 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
functionfor each one. Iteration can stop early iffunctionreturnsFalse.Added in version 2.24.
- Parameters:
function – a
OptionsFunccallbackuser_data – callback user data
- options_get_boolean(option: str) tuple[bool, bool]#
Get
optionas agbooleanvalue.Added in version 2.24.
- Parameters:
option – the option identifier
- Returns:
Trueifvaluehas been set orFalseif the option doesn’t exist
- options_get_double(option: str) tuple[bool, float]#
Get
optionas afloatvalue.Added in version 2.24.
- Parameters:
option – the option identifier
- Returns:
Trueifvaluehas been set orFalseif the option doesn’t exist
- options_get_int(option: str) tuple[bool, int]#
Get
optionas aintvalue.Added in version 2.24.
- Parameters:
option – the option identifier
- Returns:
Trueifvaluehas been set orFalseif the option doesn’t exist
- options_get_option_group() OptionGroup#
Create a
OptionGroupto 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 returnedOptionGroupis 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
OptionGroupfor the JSCOptions
- options_get_range_string(option: str) tuple[bool, str]#
Get
optionas a range string. The string must be in the format <emphasis>[!]wzxhzdk:0lowwzxhzdk:1[:wzxhzdk:2highwzxhzdk:3]</emphasis> where low and high areintvalues. 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:
Trueifvaluehas been set orFalseif the option doesn’t exist
- options_get_size(option: str) tuple[bool, int]#
Get
optionas agsizevalue.Added in version 2.24.
- Parameters:
option – the option identifier
- Returns:
Trueifvaluehas been set orFalseif the option doesn’t exist
- options_get_string(option: str) tuple[bool, str]#
Get
optionas a string.Added in version 2.24.
- Parameters:
option – the option identifier
- Returns:
Trueifvaluehas been set orFalseif the option doesn’t exist
- options_get_uint(option: str) tuple[bool, int]#
Get
optionas aintvalue.Added in version 2.24.
- Parameters:
option – the option identifier
- Returns:
Trueifvaluehas been set orFalseif the option doesn’t exist
- options_set_boolean(option: str, value: bool) bool#
Set
optionas agbooleanvalue.Added in version 2.24.
- Parameters:
option – the option identifier
value – the value to set
- Returns:
Trueif option was correctly set orFalseotherwise.
- options_set_double(option: str, value: float) bool#
Set
optionas afloatvalue.Added in version 2.24.
- Parameters:
option – the option identifier
value – the value to set
- Returns:
Trueif option was correctly set orFalseotherwise.
- options_set_int(option: str, value: int) bool#
Set
optionas aintvalue.Added in version 2.24.
- Parameters:
option – the option identifier
value – the value to set
- Returns:
Trueif option was correctly set orFalseotherwise.
- options_set_range_string(option: str, value: str) bool#
Set
optionas a range string. The string must be in the format <emphasis>[!]wzxhzdk:0lowwzxhzdk:1[:wzxhzdk:2highwzxhzdk:3]</emphasis> where low and high areintvalues. 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:
Trueif option was correctly set orFalseotherwise.
- options_set_size(option: str, value: int) bool#
Set
optionas agsizevalue.Added in version 2.24.
- Parameters:
option – the option identifier
value – the value to set
- Returns:
Trueif option was correctly set orFalseotherwise.