[PATCH] domxml fix for LP64 platforms

From: Date: Sat, 31 May 2003 08:01:57 +0000
Subject: [PATCH] domxml fix for LP64 platforms
Groups: php.internals 
Request: Send a blank email to internals+get-2105@lists.php.net to get a copy of this message
The domxml extension is casting pointers to int. The patch below fixes this for most 64-bit platforms, maybe there is a better way which avoids casting to an integer at all? --- php-4.3.2/ext/domxml/php_domxml.c.domxml 2003-05-13 15:42:23.000000000 +0100 +++ php-4.3.2/ext/domxml/php_domxml.c 2003-05-30 22:38:46.000000000 +0100 @@ -858,7 +858,7 @@ MAKE_STD_ZVAL(addr); Z_TYPE_P(addr) = IS_LONG; - Z_LVAL_P(addr) = (int) obj; + Z_LVAL_P(addr) = (long) obj; zend_hash_index_update(Z_OBJPROP_P(wrapper), 0, &handle, sizeof(zval *), NULL); zend_hash_index_update(Z_OBJPROP_P(wrapper), 1, &addr, sizeof(zval *), NULL); @@ -972,7 +972,7 @@ MAKE_STD_ZVAL(addr); Z_TYPE_P(addr) = IS_LONG; - Z_LVAL_P(addr) = (int) obj; + Z_LVAL_P(addr) = (long) obj; zend_hash_index_update(Z_OBJPROP_P(wrapper), 0, &handle, sizeof(zval *), NULL); zend_hash_index_update(Z_OBJPROP_P(wrapper), 1, &addr, sizeof(zval *), NULL); @@ -1027,7 +1027,7 @@ MAKE_STD_ZVAL(addr); Z_TYPE_P(addr) = IS_LONG; - Z_LVAL_P(addr) = (int) obj; + Z_LVAL_P(addr) = (long) obj; zend_hash_index_update(Z_OBJPROP_P(wrapper), 0, &handle, sizeof(zval *), NULL); zend_hash_index_update(Z_OBJPROP_P(wrapper), 1, &addr, sizeof(zval *), NULL); @@ -1144,7 +1144,7 @@ MAKE_STD_ZVAL(addr); Z_TYPE_P(addr) = IS_LONG; - Z_LVAL_P(addr) = (int) obj; + Z_LVAL_P(addr) = (long) obj; zend_hash_index_update(Z_OBJPROP_P(wrapper), 0, &handle, sizeof(zval *), NULL); zend_hash_index_update(Z_OBJPROP_P(wrapper), 1, &addr, sizeof(zval *), NULL);

« previous php.internals (#2105) next »