> And what if we want to change the initialization? I think it's nice the way
> it was and gives us a chance to change defaults. I don't see any good
> reason for nuking this.
A value of zero means "this field is uninitialized - do
whatever you think is the default". You can still change
initializations without worrying about each SAPI module.
In reality, this is still inferior to another approach. That
one has the following properties:
simple
less error prone
extensible
It's simple: We need a 3-lines structure and a function
instead of a +40-lines monster structure.
It's less error prone: You don't need to search for the right
slot (why should I do the counting? hello?).
It's extensible: You can change the main SAPI module struct
all the way you want. It won't make a difference.
With that approach, we can cut down the per-SAPI module
structure to this:
struct {
"apache",
"Apache",
php_apache_register_hooks
} apa_sapi_module;
And a function
void php_apache_register_hooks(TSRMLS_D)
{
sapi_register_module_startup(func_startup);
sapi_register_module_shutdown(func_shutdown);
/* etc */
}
- Sascha
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php