gsoc:2009:api
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
gsoc:2009:api [2009/07/30 03:09] – ext_api -> eapi vpj | gsoc:2009:api [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 15: | Line 15: | ||
==== Versioning ==== | ==== Versioning ==== | ||
- | Versions are in the format major.minor[.build[.revision]] in the string representation. These are stored in unsigned integers for ease of searching. The first 8 bits are used for the major, next 8 for the minor, next 8 for the build and the last 8 bits for the revision. It is possible to convert from the string representation to an unsigned integer using zend_ext_api_toi | + | Versions are in the format major.minor[.build[.revision]] in the string representation. These are stored in unsigned integers for ease of searching. The first 8 bits are used for the major, next 8 for the minor, next 8 for the build and the last 8 bits for the revision. It is possible to convert from the string representation to an unsigned integer using zend_eapi_toi |
+ | |||
+ | ==== Macros ==== | ||
+ | |||
+ | <code c> | ||
+ | EAPI_SET_CALLBACK(ext_name, | ||
+ | </ | ||
+ | Sets a callback - with reference to a extension and a version - should be called during MINIT. The callback will be called after all extensions have been initialized. Callback will be called with a reference to the API of the specified extension. See zend_eapi_set_callback. | ||
+ | ^ '' | ||
+ | ^ '' | ||
+ | ^ '' | ||
+ | |||
+ | <code c> | ||
+ | EAPI_SET_EMPTY_CALLBACK(callback) | ||
+ | </ | ||
+ | Sets an empty callback - should be called during MINIT. The callback will be called after all extensions have been initialized. See zend_eapi_set_empty_callback. | ||
+ | ^ '' | ||
+ | |||
+ | <code c> | ||
+ | EAPI_CALLBACK_FUNCTION(callback) | ||
+ | </ | ||
+ | Defines the callback function. The callback function will be called with the following parameters: type, module_number, | ||
+ | ^ '' | ||
+ | |||
+ | <code c> | ||
+ | EAPI_EMPTY_CALLBACK_FUNCTION(callback) | ||
+ | </ | ||
+ | Defines the empty callback function. The callback function will be called with the following parameters: typei and module_number, | ||
+ | ^ '' | ||
==== Functions ==== | ==== Functions ==== | ||
Line 42: | Line 70: | ||
^ '' | ^ '' | ||
^ '' | ^ '' | ||
+ | |||
+ | <code c> | ||
+ | int zend_eapi_find_versions(char *ext_name, uint version, uint mask, uint *result, int *size, int buf_length) | ||
+ | </ | ||
+ | Finds the set of versions available. Matches versions if '' | ||
+ | ^ '' | ||
+ | ^ '' | ||
+ | ^ '' | ||
+ | ^ '' | ||
+ | ^ '' | ||
+ | ^ '' | ||
<code c> | <code c> | ||
Line 64: | Line 103: | ||
^ '' | ^ '' | ||
^ '' | ^ '' | ||
+ | |||
+ | <code c> | ||
+ | int zend_eapi_set_empty_callback(int type, int module_number, | ||
+ | </ | ||
+ | Sets an empty callback - should be called during MINIT. The callback will be called after all extensions have been initialized. Use EAPI_SET_EMPTY_CALLBACK. | ||
+ | ^ '' | ||
+ | |||
+ | <code c> | ||
+ | int zend_eapi_set_callback(int type, int module_number, | ||
+ | </ | ||
+ | Sets a callback - with reference to a extension and a version - should be called during MINIT. The callback will be called after all extensions have been initialized. Callback will be called with a reference to the API of the specified extension. Use EAPI_SET_CALLBACK. | ||
+ | ^ '' | ||
+ | ^ '' | ||
+ | ^ '' | ||
===== Timeline ===== | ===== Timeline ===== | ||
Line 158: | Line 211: | ||
* Name | * Name | ||
* eapi is used instead of ext_api | * eapi is used instead of ext_api | ||
+ | |||
+ | == 20th July == | ||
+ | * Callbacks with no extension specified | ||
+ | * Used dependency interface on mbstring/ | ||
+ | |||
+ | == 31st July == | ||
+ | * Setting callbacks accept module_number / type (through macros) | ||
+ | * Callbacks are called with module_number / type. e.g. usage - INIs could be registered from the callback | ||
+ | * Functions to search versions of an extension | ||
+ | * Example usage of the dependency interface : [[http:// | ||
+ | * How dependency interface is implemented on mbstring / exif : [[http:// | ||
+ | |||
+ | == 16th August == | ||
+ | * Received some suggestions from the community (mailing list) | ||
+ | * Fixed a problem with win32 build - included zend_eapi.c in config.w32 | ||
+ | * TSRMLS parameters are passed to callbacks to improve performance | ||
+ | * Added support for extensions loaded through dl() | ||
+ | * When a extension (say ext_dl) is loaded through dl() the callbacks of other extensions (already loaded) are called, if they require the ext_dl and the versions match | ||
+ | * Callbacks of ext_dl are called if the required extensions are available | ||
+ | * Did some testing with dl() |
gsoc/2009/api.1248923385.txt.gz · Last modified: 2017/09/22 13:28 (external edit)