Functions

get_major_version ()

get_micro_version ()

get_minor_version ()

options_foreach (function, *user_data)

options_get_boolean (option)

options_get_double (option)

options_get_int (option)

options_get_option_group ()

options_get_range_string (option)

options_get_size (option)

options_get_string (option)

options_get_uint (option)

options_set_boolean (option, value)

options_set_double (option, value)

options_set_int (option, value)

options_set_range_string (option, value)

options_set_size (option, value)

options_set_string (option, value)

options_set_uint (option, value)

Details

JavaScriptCore.get_major_version()
Returns:

the major version number of the JavaScriptCore library

Return type:

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 JavaScriptCore.MAJOR_VERSION macro, which represents the major version of the JavaScriptCore headers you have included when compiling your code.

JavaScriptCore.get_micro_version()
Returns:

the micro version number of the JavaScriptCore library

Return type:

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 JavaScriptCore.MICRO_VERSION macro, which represents the micro version of the JavaScriptCore headers you have included when compiling your code.

JavaScriptCore.get_minor_version()
Returns:

the minor version number of the JavaScriptCore library

Return type:

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 JavaScriptCore.MINOR_VERSION macro, which represents the minor version of the JavaScriptCore headers you have included when compiling your code.

JavaScriptCore.options_foreach(function, *user_data)
Parameters:

Iterates all available options calling function for each one. Iteration can stop early if function returns False.

New in version 2.24.

JavaScriptCore.options_get_boolean(option)
Parameters:

option (str) – the option identifier

Returns:

True if value has been set or False if the option doesn’t exist

value:

return location for the option value

Return type:

(bool, value: bool)

Get option as a bool value.

New in version 2.24.

JavaScriptCore.options_get_double(option)
Parameters:

option (str) – the option identifier

Returns:

True if value has been set or False if the option doesn’t exist

value:

return location for the option value

Return type:

(bool, value: float)

Get option as a float value.

New in version 2.24.

JavaScriptCore.options_get_int(option)
Parameters:

option (str) – the option identifier

Returns:

True if value has been set or False if the option doesn’t exist

value:

return location for the option value

Return type:

(bool, value: int)

Get option as a int value.

New in version 2.24.

JavaScriptCore.options_get_option_group()
Returns:

a GLib.OptionGroup for the JSCOptions

Return type:

GLib.OptionGroup

Create a GLib.OptionGroup to handle JSCOptions as command line arguments. The options will be exposed as command line arguments with the form –jsc-<option>=<value>. Each entry in the returned GLib.OptionGroup is configured to apply the corresponding option during command line parsing. Applications only need to pass the returned group to GLib.OptionContext.add_group(), and the rest will be taken care for automatically.

New in version 2.24.

JavaScriptCore.options_get_range_string(option)
Parameters:

option (str) – the option identifier

Returns:

True if value has been set or False if the option doesn’t exist

value:

return location for the option value

Return type:

(bool, value: str)

Get option as a range string. The string must be in the format [!]<low>[:<high>] where low and high are int values. Values between low and high (both included) will be considered in the range, unless ! is used to invert the range.

New in version 2.24.

JavaScriptCore.options_get_size(option)
Parameters:

option (str) – the option identifier

Returns:

True if value has been set or False if the option doesn’t exist

value:

return location for the option value

Return type:

(bool, value: int)

Get option as a #gsize value.

New in version 2.24.

JavaScriptCore.options_get_string(option)
Parameters:

option (str) – the option identifier

Returns:

True if value has been set or False if the option doesn’t exist

value:

return location for the option value

Return type:

(bool, value: str)

Get option as a string.

New in version 2.24.

JavaScriptCore.options_get_uint(option)
Parameters:

option (str) – the option identifier

Returns:

True if value has been set or False if the option doesn’t exist

value:

return location for the option value

Return type:

(bool, value: int)

Get option as a int value.

New in version 2.24.

JavaScriptCore.options_set_boolean(option, value)
Parameters:
  • option (str) – the option identifier

  • value (bool) – the value to set

Returns:

True if option was correctly set or False otherwise.

Return type:

bool

Set option as a bool value.

New in version 2.24.

JavaScriptCore.options_set_double(option, value)
Parameters:
  • option (str) – the option identifier

  • value (float) – the value to set

Returns:

True if option was correctly set or False otherwise.

Return type:

bool

Set option as a float value.

New in version 2.24.

JavaScriptCore.options_set_int(option, value)
Parameters:
  • option (str) – the option identifier

  • value (int) – the value to set

Returns:

True if option was correctly set or False otherwise.

Return type:

bool

Set option as a int value.

New in version 2.24.

JavaScriptCore.options_set_range_string(option, value)
Parameters:
  • option (str) – the option identifier

  • value (str) – the value to set

Returns:

True if option was correctly set or False otherwise.

Return type:

bool

Set option as a range string. The string must be in the format [!]<low>[:<high>] where low and high are int values. Values between low and high (both included) will be considered in the range, unless ! is used to invert the range.

New in version 2.24.

JavaScriptCore.options_set_size(option, value)
Parameters:
  • option (str) – the option identifier

  • value (int) – the value to set

Returns:

True if option was correctly set or False otherwise.

Return type:

bool

Set option as a #gsize value.

New in version 2.24.

JavaScriptCore.options_set_string(option, value)
Parameters:
  • option (str) – the option identifier

  • value (str) – the value to set

Returns:

True if option was correctly set or False otherwise.

Return type:

bool

Set option as a string.

New in version 2.24.

JavaScriptCore.options_set_uint(option, value)
Parameters:
  • option (str) – the option identifier

  • value (int) – the value to set

Returns:

True if option was correctly set or False otherwise.

Return type:

bool

Set option as a int value.

New in version 2.24.