cvs: php4 /ext/dba dba.c php_dba.h
| From: | Sascha Schumann | Date: | Wed, 22 Nov 2000 21:47:15 +0000 |
| Subject: | cvs: php4 /ext/dba dba.c php_dba.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-2744@lists.php.net to get a copy of this message | ||
sas Wed Nov 22 13:47:15 2000 EDT
Modified files:
/php4/ext/dba dba.c php_dba.h
Log:
Run through conv_z_macros
Index: php4/ext/dba/dba.c
diff -u php4/ext/dba/dba.c:1.25 php4/ext/dba/dba.c:1.26
--- php4/ext/dba/dba.c:1.25 Thu Oct 26 10:38:01 2000
+++ php4/ext/dba/dba.c Wed Nov 22 13:47:15 2000
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba.c,v 1.25 2000/10/26 17:38:01 andrei Exp $ */
+/* $Id: dba.c,v 1.26 2000/11/22 21:47:15 sas Exp $ */
#include "php.h"
@@ -117,9 +117,9 @@
#define DBA_ID_GET \
convert_to_long_ex(id); \
- DBA_IF_NOT_CORRECT_TYPE((*id)->value.lval) { \
+ DBA_IF_NOT_CORRECT_TYPE(Z_LVAL_PP(id)) { \
php_error(E_WARNING, "Unable to find DBA identifier %d", \
- (*id)->value.lval); \
+ Z_LVAL_PP(id)); \
RETURN_FALSE; \
}
@@ -212,7 +212,7 @@
dba_handler *hptr;
php_info_print_box_start(0);
- PUTS("V1 ($Id: dba.c,v 1.25 2000/10/26 17:38:01 andrei Exp $)");
+ PUTS("V1 ($Id: dba.c,v 1.26 2000/11/22 21:47:15 sas Exp $)");
for(hptr = handler; hptr->name; hptr++) {
PUTS(" ");
PUTS(hptr->name);
@@ -267,7 +267,7 @@
/* we only take string arguments */
for(i = 0; i < ac; i++) {
convert_to_string_ex(args[i]);
- keylen += (*args[i])->value.str.len;
+ keylen += Z_STRLEN_PP(args[i]);
}
if(persistent) {
@@ -276,8 +276,8 @@
keylen = 0;
for(i = 0; i < ac; i++) {
- memcpy(key+keylen,(*args[i])->value.str.val,(*args[i])->value.str.len);
- keylen += (*args[i])->value.str.len;
+ memcpy(key+keylen,Z_STRVAL_PP(args[i]),Z_STRLEN_PP(args[i]));
+ keylen += Z_STRLEN_PP(args[i]);
}
if(zend_hash_find(&ht_keys, key, keylen, (void **) &info) == SUCCESS) {
@@ -366,7 +366,7 @@
{
DBA_ID_GET1;
- zend_list_delete((*id)->value.lval);
+ zend_list_delete(Z_LVAL_PP(id));
}
/* }}} */
Index: php4/ext/dba/php_dba.h
diff -u php4/ext/dba/php_dba.h:1.6 php4/ext/dba/php_dba.h:1.7
--- php4/ext/dba/php_dba.h:1.6 Mon Jul 10 03:09:14 2000
+++ php4/ext/dba/php_dba.h Wed Nov 22 13:47:15 2000
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_dba.h,v 1.6 2000/07/10 10:09:14 sas Exp $ */
+/* $Id: php_dba.h,v 1.7 2000/11/22 21:47:15 sas Exp $ */
#ifndef PHP_DBA_H
#define PHP_DBA_H
@@ -91,7 +91,7 @@
DBA_OPTIMIZE_FUNC(x); \
DBA_SYNC_FUNC(x)
-#define VALLEN(p) (*p)->value.str.val, (*p)->value.str.len
+#define VALLEN(p) Z_STRVAL_PP(p), Z_STRLEN_PP(p)
PHP_FUNCTION(dba_open);
PHP_FUNCTION(dba_popen);