Re: cvs: php4 /ext/mysql mysql.mak php_mysql.c

From: Date: Sat, 13 Jul 2002 13:36:56 +0000
Subject: Re: cvs: php4 /ext/mysql mysql.mak php_mysql.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12820@lists.php.net to get a copy of this message
Hello, On Fri, 12 Jul 2002, Anantha Kesari H Y wrote: [...] > @@ -1114,11 +1117,16 @@ > ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", > le_link, le_plink); > > convert_to_string_ex(db); > +#ifndef NETWARE > if (mysql_create_db(&mysql->conn, Z_STRVAL_PP(db))==0) { > RETURN_TRUE; > } else { > RETURN_FALSE; > } > +#else > + php_error(E_WARNING, "mysql_create_db is not supported on NetWare"); > + RETURN_FALSE; > +#endif > } > /* }}} */ > > @@ -1153,11 +1161,16 @@ > ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", > le_link, le_plink); > > convert_to_string_ex(db); > +#ifndef NETWARE > if (mysql_drop_db(&mysql->conn, Z_STRVAL_PP(db))==0) { > RETURN_TRUE; > } else { > RETURN_FALSE; > } > +#else > + php_error(E_WARNING, "mysql_drop_db is not supported on NetWare"); > + RETURN_FALSE; > +#endif > } > /* }}} */ > #endif We follow the policy not to have a function defined if it's not available, so the correct way to disable those two functions would be my putting #ifdef's around the whole function, and adding #ifdef's to the function_entry struct in php_mysql.c regards, Derick --------------------------------------------------------------------------- Did I help you? http://www.derickrethans.nl/link.php?url=giftlist Frequent ranting: http://www.derickrethans.nl/ --------------------------------------------------------------------------- PHP: Scripting the Web - derick@php.net All your branches are belong to me! SRM: Script Running Machine - www.vl-srm.net ---------------------------------------------------------------------------

« previous php.cvs (#12820) next »