[[EMAIL PROTECTED] (Stig Sæther Bakken)]
> [Jani Taskinen <[EMAIL PROTECTED]>]
> > On Sun, 16 Sep 2001, Sterling Hughes wrote:
> >
> > > +1, perhaps from an api perspective we could have something like:
> > >
> > > $vn = php_get_version(GD);
> > >
> > > or if the argument is empty, return the main php version:
> > >
> > > $phpVer = php_get_version();
> > >
> > > -Sterling
> >
> >
> > We could just add an optional argument to phpversion() ?
> >
> > This will work as per discussion with Stig (on IRC) and
> > using the (yet to be written) function version_compare() to
> > do the checking.
> >
> > There should be an entry in _zend_module_entry struct for
> > the version string (of the extension) ?
>
> We can do better than that. When the Zend module API changes, the
> change may or may not affect specific extensions. I propose changing
> zend_module_entry thusly:
>
> struct _zend_module_entry {
> unsigned int zend_api;
> unsigned char zend_debug;
> unsigned char zts;
Whoops, I forgot:
char *module_version;
(This would be a string like "1.0b4", according to the versioning
scheme we decide on.)
> char *name;
> zend_function_entry *functions;
> int (*module_startup_func)(INIT_FUNC_ARGS);
> int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS);
> int (*request_startup_func)(INIT_FUNC_ARGS);
> int (*request_shutdown_func)(SHUTDOWN_FUNC_ARGS);
> void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
> int (*global_startup_func)(void);
> int (*global_shutdown_func)(void);
> int globals_id;
> int module_started;
> unsigned char type;
> void *handle;
> int module_number;
> };
>
> The most critical members (zend_api, zend_debug and zts) are moved to
> the beginning of the struct, so all future code can rely at what
> position in the struct they can be found.
>
> I've been playing with the idea of having a
> (int)(*zend_api_mismatch_handler)(int) function pointer immediately
> after "zts" to allow extensions to say "yeah I know about that API
> change, but it's not affecting this extension", but I'm not yet 100%
> sure it would help. I'll think some more about it after some
> breakfast and two cups of coffee. ;-)
>
> - Stig
>
> --
> Stig Sæther Bakken <[EMAIL PROTECTED]>
> Fast Search & Transfer ASA, Trondheim, Norway
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
Stig Sæther Bakken <[EMAIL PROTECTED]>
Fast Search & Transfer ASA, Trondheim, Norway
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]