summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2001-07-28 18:40:18 +0000
committerAndi Gutmans <andi@php.net>2001-07-28 18:40:18 +0000
commitd42f85427aa56983b7907d7f74c270a63b5b0803 (patch)
tree815c7e027a152f61f2f47cbb31d975d1d4dcf6a8
parent896eec1ec54656d53b0fbf393793ea28272bd420 (diff)
downloadphp-git-d42f85427aa56983b7907d7f74c270a63b5b0803.tar.gz
- Use object macros
-rw-r--r--ext/standard/incomplete_class.c9
-rw-r--r--ext/xml/xml.c2
2 files changed, 7 insertions, 4 deletions
diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c
index 3f8094596b..4fd4d786f7 100644
--- a/ext/standard/incomplete_class.c
+++ b/ext/standard/incomplete_class.c
@@ -109,15 +109,18 @@ char *php_lookup_class_name(zval *object, size_t *nlen, zend_bool del)
{
zval **val;
char *retval = NULL;
+ HashTable *object_properties;
- if (zend_hash_find(object->value.obj.properties, MAGIC_MEMBER, sizeof(MAGIC_MEMBER), (void **) &val) == SUCCESS) {
+ object_properties = Z_OBJPROP_P(object);
+
+ if (zend_hash_find(object_properties, MAGIC_MEMBER, sizeof(MAGIC_MEMBER), (void **) &val) == SUCCESS) {
retval = estrndup(Z_STRVAL_PP(val), Z_STRLEN_PP(val));
if (nlen)
*nlen = Z_STRLEN_PP(val);
if (del)
- zend_hash_del(object->value.obj.properties, MAGIC_MEMBER, sizeof(MAGIC_MEMBER));
+ zend_hash_del(object_properties, MAGIC_MEMBER, sizeof(MAGIC_MEMBER));
}
return (retval);
@@ -136,7 +139,7 @@ void php_store_class_name(zval *object, const char *name, size_t len)
Z_STRVAL_P(val) = estrndup(name, len);
Z_STRLEN_P(val) = len;
- zend_hash_update(object->value.obj.properties, MAGIC_MEMBER, sizeof(MAGIC_MEMBER), &val, sizeof(val), NULL);
+ zend_hash_update(Z_OBJPROP_P(object), MAGIC_MEMBER, sizeof(MAGIC_MEMBER), &val, sizeof(val), NULL);
}
/* }}} */
diff --git a/ext/xml/xml.c b/ext/xml/xml.c
index addebc2f61..f43d3be8c6 100644
--- a/ext/xml/xml.c
+++ b/ext/xml/xml.c
@@ -389,7 +389,7 @@ xml_call_handler(xml_parser *parser, zval *handler, int argc, zval **argv)
zend_hash_index_find(handler->value.ht, 1, (void **) &method) == SUCCESS &&
Z_TYPE_PP(obj) == IS_OBJECT &&
Z_TYPE_PP(method) == IS_STRING) {
- php_error(E_WARNING, "Unable to call handler %s::%s()", (*obj)->value.obj.ce->name, Z_STRVAL_PP(method));
+ php_error(E_WARNING, "Unable to call handler %s::%s()", Z_OBJCE_PP(obj)->name, Z_STRVAL_PP(method));
} else
php_error(E_WARNING, "Unable to call handler");