Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:2105 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36272 invoked from network); 31 May 2003 08:01:59 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) by pb1.pair.com with SMTP; 31 May 2003 08:01:59 -0000 Received: from radish.cambridge.redhat.com (radish.cambridge.redhat.com [172.16.18.90]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id h4V81wK05436 for ; Sat, 31 May 2003 04:01:58 -0400 Received: from radish.cambridge.redhat.com (localhost.localdomain [127.0.0.1]) by radish.cambridge.redhat.com (8.12.8/8.12.7) with ESMTP id h4V81vBJ017078 for ; Sat, 31 May 2003 09:01:57 +0100 Received: (from jorton@localhost) by radish.cambridge.redhat.com (8.12.8/8.12.8/Submit) id h4V81vh8017077 for internals@lists.php.net; Sat, 31 May 2003 09:01:57 +0100 Date: Sat, 31 May 2003 09:01:57 +0100 To: internals@lists.php.net Message-ID: <20030531080157.GA16915@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: [PATCH] domxml fix for LP64 platforms From: jorton@redhat.com (Joe Orton) 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);