sniper Thu Feb 19 22:05:43 2004 EDT
Modified files:
/php-src/ext/oci8 oci8.c
Log:
Only use Z_TYPE* with zvals..
http://cvs.php.net/diff.php/php-src/ext/oci8/oci8.c?r1=1.250&r2=1.251&ty=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.250 php-src/ext/oci8/oci8.c:1.251
--- php-src/ext/oci8/oci8.c:1.250 Thu Feb 12 14:05:39 2004
+++ php-src/ext/oci8/oci8.c Thu Feb 19 22:05:42 2004
@@ -22,7 +22,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8.c,v 1.250 2004/02/12 19:05:39 ssb Exp $ */
+/* $Id: oci8.c,v 1.251 2004/02/20 03:05:42 sniper Exp $ */
/* TODO list:
*
@@ -786,7 +786,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "OCI8 Support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.250 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.251 $");
sprintf(buf, "%ld", num_persistent);
php_info_print_table_row(2, "Active Persistent Links", buf);
@@ -1061,7 +1061,7 @@
/* Note sure if we need to free the object. Have an
oracle TAR out on this one.
- OCIDescriptorFree(descr->ocidescr, Z_TYPE_P(descr)); */
+ OCIDescriptorFree(descr->ocidescr, descr->type); */
oci_debug("END _oci_coll_list_dtor: %d",coll->id);
@@ -1086,7 +1086,7 @@
CALL_OCI(
OCIDescriptorFree(
descr->ocidescr,
- Z_TYPE_P(descr)
+ descr->type
)
);
@@ -1350,23 +1350,23 @@
/* {{{ oci_new_desc()
*/
-static oci_descriptor *oci_new_desc(int type,oci_connection *connection)
+static oci_descriptor *oci_new_desc(int type, oci_connection *connection)
{
oci_descriptor *descr;
TSRMLS_FETCH();
descr = emalloc(sizeof(oci_descriptor));
- Z_TYPE_P(descr) = type;
+ descr->type = type;
- switch (Z_TYPE_P(descr)) {
+ switch (descr->type) {
case OCI_DTYPE_FILE:
case OCI_DTYPE_LOB:
case OCI_DTYPE_ROWID:
break;
default:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown
descriptor type %d.",Z_TYPE_P(descr));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown
descriptor type %d.", descr->type);
efree(descr);
return 0;
}
@@ -1375,7 +1375,7 @@
OCIDescriptorAlloc(
connection->session->pEnv,
(dvoid*)&(descr->ocidescr),
- Z_TYPE_P(descr),
+ descr->type,
(size_t) 0,
(dvoid **) 0
)
@@ -2149,7 +2149,7 @@
if (mydescr->lob_size >= 0) {
*loblen = mydescr->lob_size;
} else {
- if (Z_TYPE_P(mydescr) == OCI_DTYPE_FILE) {
+ if (mydescr->type == OCI_DTYPE_FILE) {
CALL_OCI_RETURN(connection->error,
OCILobFileOpen(
connection->pServiceContext,
@@ -2181,7 +2181,7 @@
}
mydescr->lob_size = *loblen;
- if (Z_TYPE_P(mydescr) == OCI_DTYPE_FILE) {
+ if (mydescr->type == OCI_DTYPE_FILE) {
CALL_OCI_RETURN(connection->error,
OCILobFileClose(
connection->pServiceContext,
@@ -2207,7 +2207,7 @@
/* {{{ oci_loadlob()
*/
#define LOBREADSIZE 1048576l /* 1MB */
-static int oci_loadlob(oci_connection *connection, oci_descriptor *mydescr, char
**buffer,ub4 *loblen)
+static int oci_loadlob(oci_connection *connection, oci_descriptor *mydescr, char
**buffer, ub4 *loblen)
{
ub4 siz = 0;
ub4 readlen = 0;
@@ -2216,7 +2216,7 @@
*loblen = 0;
- if (Z_TYPE_P(mydescr) == OCI_DTYPE_FILE) {
+ if (mydescr->type == OCI_DTYPE_FILE) {
CALL_OCI_RETURN(connection->error,
OCILobFileOpen(
connection->pServiceContext,
@@ -2285,7 +2285,7 @@
return -1;
}
- if (Z_TYPE_P(mydescr) == OCI_DTYPE_FILE) {
+ if (mydescr->type == OCI_DTYPE_FILE) {
CALL_OCI_RETURN(connection->error,
OCILobFileClose(
connection->pServiceContext,
@@ -2330,7 +2330,7 @@
return -1;
}
- if (Z_TYPE_P(mydescr) == OCI_DTYPE_FILE) {
+ if (mydescr->type == OCI_DTYPE_FILE) {
CALL_OCI_RETURN(connection->error,
OCILobFileOpen(
connection->pServiceContext,
@@ -2418,7 +2418,7 @@
return -1;
}
- if (Z_TYPE_P(mydescr) == OCI_DTYPE_FILE) {
+ if (mydescr->type == OCI_DTYPE_FILE) {
CALL_OCI_RETURN(connection->error,
OCILobFileClose(
connection->pServiceContext,
@@ -3130,8 +3130,9 @@
*/
static int _oci_session_cleanup(void *data TSRMLS_DC)
{
- list_entry *le = (list_entry *) data;
- if (Z_TYPE_P(le) == le_session) {
+ zend_rsrc_list_entry *le = (zend_rsrc_list_entry *) data;
+
+ if (le->type == le_session) {
oci_server *server = ((oci_session*) le->ptr)->server;
if (server->is_open == 2)
return 1;
@@ -3583,7 +3584,7 @@
define->name = (text*) estrndup(Z_STRVAL_PP(name),Z_STRLEN_PP(name));
define->name_len = Z_STRLEN_PP(name);
- Z_TYPE_P(define) = ocitype;
+ define->type = ocitype;
define->zval = *var;
zval_add_ref(var);
@@ -4876,7 +4877,7 @@
goto bail;
}
- if (Z_TYPE_P(descr) == OCI_DTYPE_FILE) {
+ if (descr->type == OCI_DTYPE_FILE) {
CALL_OCI_RETURN(connection->error,
OCILobFileOpen(
connection->pServiceContext,
@@ -4969,7 +4970,7 @@
fp = 0;
}
- if (Z_TYPE_P(descr) == OCI_DTYPE_FILE) {
+ if (descr->type == OCI_DTYPE_FILE) {
CALL_OCI_RETURN(connection->error,
OCILobFileClose(
connection->pServiceContext,
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php