Re: cvs: php4 /main SAPI.c SAPI.h /sapi/apache mod_php4.c /sapi/thttpd thttpd.c

From: Date: Fri, 29 Nov 2002 20:02:35 +0000
Subject: Re: cvs: php4 /main SAPI.c SAPI.h /sapi/apache mod_php4.c /sapi/thttpd thttpd.c
References: 1 2 3 4 5 6 7  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-16763@lists.php.net to get a copy of this message
> 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

« previous php.cvs (#16763) next »