--- ext/spl/php_spl.c.orig	Tue Jun 30 14:41:48 2009
+++ ext/spl/php_spl.c	Tue Jun 30 14:42:14 2009
@@ -708,7 +708,7 @@
 
 PHPAPI void php_spl_object_hash(zval *obj, char *result TSRMLS_DC) /* {{{*/
 {
-	intptr_t hash_handle, hash_handlers;
+	zend_intptr_t hash_handle, hash_handlers;
 	char *hex;
 
 	if (!SPL_G(hash_mask_init)) {
@@ -716,13 +716,13 @@
 			php_mt_srand(GENERATE_SEED() TSRMLS_CC);
 		}
 
-		SPL_G(hash_mask_handle)   = (intptr_t)(php_mt_rand(TSRMLS_C) >> 1);
-		SPL_G(hash_mask_handlers) = (intptr_t)(php_mt_rand(TSRMLS_C) >> 1);
+		SPL_G(hash_mask_handle)   = (zend_intptr_t)(php_mt_rand(TSRMLS_C) >> 1);
+		SPL_G(hash_mask_handlers) = (zend_intptr_t)(php_mt_rand(TSRMLS_C) >> 1);
 		SPL_G(hash_mask_init) = 1;
 	}
 
-	hash_handle   = SPL_G(hash_mask_handle)^(intptr_t)Z_OBJ_HANDLE_P(obj);
-	hash_handlers = SPL_G(hash_mask_handlers)^(intptr_t)Z_OBJ_HT_P(obj);
+	hash_handle   = SPL_G(hash_mask_handle)^(zend_intptr_t)Z_OBJ_HANDLE_P(obj);
+	hash_handlers = SPL_G(hash_mask_handlers)^(zend_intptr_t)Z_OBJ_HT_P(obj);
 
 	spprintf(&hex, 32, "%016x%016x", hash_handle, hash_handlers);
 
