Re: cvs: php-src /ext/pgsql pgsql.c
| From: | Andi Gutmans | Date: | Tue, 10 May 2005 22:34:10 +0000 |
| Subject: | Re: cvs: php-src /ext/pgsql pgsql.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-31837@lists.php.net to get a copy of this message | ||
So why not just do:
+ if (result_type & PGSQL_NUM) {
+ if (result_type& PGSQL_ASSOC) {
Why do you need to reference PGSQL_BOTH? I might be missing something (didn't look at the .c file) but it seems strange.
Andi
At 08:13 PM 5/10/2005 +0000, Antony Dovgal wrote:
tony2001 Tue May 10 16:13:26 2005 EDTModified files:/php-src/ext/pgsql pgsql.cLog: fix #32904 (pg_get_notify() ignores result_type parameter) http://cvs.php.net/diff.php/php-src/ext/pgsql/pgsql.c?r1=1.325&r2=1.326&ty=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.325 php-src/ext/pgsql/pgsql.c:1.326--- php-src/ext/pgsql/pgsql.c:1.325 Tue May 3 18:50:00 2005+++ php-src/ext/pgsql/pgsql.c Tue May 10 16:13:24 2005 @@ -20,7 +20,7 @@+----------------------------------------------------------------------+*/ -/* $Id: pgsql.c,v 1.325 2005/05/03 22:50:00 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.326 2005/05/10 20:13:24 tony2001 Exp $ */ #include <stdlib.h> @@ -4144,11 +4144,11 @@RETURN_FALSE; } array_init(return_value); - if (result_type & (PGSQL_NUM|PGSQL_BOTH)) { + if (result_type == PGSQL_NUM || result_type == PGSQL_BOTH) { add_index_string(return_value, 0, pgsql_notify->relname, 1); add_index_long(return_value, 1, pgsql_notify->be_pid); } - if (result_type & (PGSQL_ASSOC|PGSQL_BOTH)) { + if (result_type == PGSQL_ASSOC || result_type == PGSQL_BOTH) { add_assoc_string(return_value, "message", pgsql_notify->relname, 1); add_assoc_long(return_value, "pid", pgsql_notify->be_pid); }-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php