Re: cvs: php4 /ext/sablot php_sablot.h
| From: | Rasmus Lerdorf | Date: | Fri, 10 Aug 2001 13:07:47 +0000 |
| Subject: | Re: cvs: php4 /ext/sablot php_sablot.h | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-6704@lists.php.net to get a copy of this message | ||
> >Keep trying. You still didn't get them all.
>
> I'd appreciate some help as I don't have an environment to build this.
It built just fine before you touched it. I don't agree with your
changes.
> They don't have to name them at all. They should just be using the macros,
> and using them everywhere. That's the whole point of the macros - making
> changes at one centralized place.
>
> Having two sets of macros is simply a bad thing - 2x places to fix and more
> opportunities to mess up. Regardless, the way you committed sablot.c was a
> hybrid of using macros and not using them, which just happened to build
> because you defined a variable of a certain name. It was still
> conceptually wrong.
?? No more wrong than your mysql extension:
STD_PHP_INI_BOOLEAN("mysql.allow_persistent", "1",
PHP_INI_SYSTEM, OnUpdateInt,
allow_persistent, zend_mysql_globals, mysql_globals)
STD_PHP_INI_ENTRY_EX("mysql.max_persistent", "-1",
PHP_INI_SYSTEM, OnUpdateInt,
max_persistent, zend_mysql_globals, mysql_globals,
display_link_numbers)
STD_PHP_INI_ENTRY_EX("mysql.max_links", "-1",
PHP_INI_SYSTEM, OnUpdateInt, max_links,
zend_mysql_globals, mysql_globals, display_link_numbers)
STD_PHP_INI_ENTRY("mysql.default_host", NULL,
PHP_INI_ALL, OnUpdateString, default_host,
zend_mysql_globals, mysql_globals)
STD_PHP_INI_ENTRY("mysql.default_user", NULL,
PHP_INI_ALL, OnUpdateString, default_user,
zend_mysql_globals, mysql_globals)
STD_PHP_INI_ENTRY("mysql.default_password", NULL,
PHP_INI_ALL, OnUpdateString, default_password,
zend_mysql_globals, mysql_globals)
STD_PHP_INI_ENTRY("mysql.default_socket", NULL,
PHP_INI_ALL, OnUpdateStringUnempty, default_socket,
zend_mysql_globals, mysql_globals)
static void php_mysql_init_globals(zend_mysql_globals *mysql_globals)
This happens to work because you happened to name them zend_mysql_globals.
I don't see how what I did in sablot.c was different from this at all.
In fact it was identical to that.
-Rasmus