Callbacks

CompareFunc (v1, v2)

CopyFunc (data)

DestroyFunc (data)

ExtModuleDataNewFunc ()

ExtModuleGetFuncsFunc ()

ExtModuleGetTagFunc (data)

ExtModuleParseFunc (data, subtag, error)

ExtModulePrecheckFunc (data, tag, error)

ExtModuleSingletonFunc ()

ExtModuleValidateFunc (data)

ExtModuleVersionFunc ()

Details

LangTag.CompareFunc(v1, v2)
Parameters:
  • v1 (object) – the object to compare with v2.

  • v2 (object) – the object to compare with v1.

Return type:

int

The type of callback function used for comparing objects.

LangTag.CopyFunc(data)
Parameters:

data (object) – the object to be copied.

Return type:

object

The type of callback function used for copying data.

LangTag.DestroyFunc(data)
Parameters:

data (object) – the object to be destroyed.

The type of callback function used for destroying data.

LangTag.ExtModuleDataNewFunc()
Returns:

a new instance of LangTag.ExtModuleData.

Return type:

LangTag.ExtModuleData

The type of the callback function used to create a new instance of LangTag.ExtModuleData. This is invoked when new Extension subtag appears and keep data.

LangTag.ExtModuleGetFuncsFunc()
Returns:

a LangTag.ExtModuleFuncs.

Return type:

LangTag.ExtModuleFuncs

The type of the module_get_funcs() that is required to implement an extension module.

LangTag.ExtModuleGetTagFunc(data)
Parameters:

data (LangTag.ExtModuleData) – a LangTag.ExtModuleData.

Returns:

a tag string.

Return type:

str

The type of the callback function used to obtain the tag.

LangTag.ExtModuleParseFunc(data, subtag, error)
Parameters:
Returns:

True if the subtag is valid for Extension. otherwise False.

Return type:

int

The type of the callback function used to parse tags.

LangTag.ExtModulePrecheckFunc(data, tag, error)
Parameters:
Returns:

True if tag is valid to process parsing subtags for the extension. otherwise False.

Return type:

int

The type of the callback function used to check tag prior to process parsing subtags for the extension.

LangTag.ExtModuleSingletonFunc()
Returns:

a singleton character.

Return type:

int

The type of the callback function used to obtain a singleton character for Extension subtag that the module would support.

LangTag.ExtModuleValidateFunc(data)
Parameters:

data (LangTag.ExtModuleData) – a LangTag.ExtModuleData.

Returns:

True if it’s valid, otherwise False.

Return type:

int

The type of the callback function used to validate the tags in data.

LangTag.ExtModuleVersionFunc()
Returns:

a version number. this is the same to LangTag.EXT_MODULE_VERSION when the module was built.

Return type:

int

The type of the module_get_version() that is required to implement an extension module.