summaryrefslogtreecommitdiff
path: root/ext/standard/php_incomplete_class.h
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2005-06-28 09:46:30 (GMT)
committerStanislav Malyshev <stas@php.net>2005-06-28 09:46:30 (GMT)
commit62d4d8b8d25c3fd2e2922032397c650fc007022b (patch)
treeaaaab617f0e2560ec48195375dfbcaacedb32ab5 /ext/standard/php_incomplete_class.h
parent9e9ef37e98f1f4596b0e049d70789b3f567e3c65 (diff)
downloadphp-62d4d8b8d25c3fd2e2922032397c650fc007022b.tar.gz
fix handling of non-PHP classes (John Coggeshall)
Diffstat (limited to 'ext/standard/php_incomplete_class.h')
-rw-r--r--ext/standard/php_incomplete_class.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/standard/php_incomplete_class.h b/ext/standard/php_incomplete_class.h
index 8c7f68a..bfcd6f6 100644
--- a/ext/standard/php_incomplete_class.h
+++ b/ext/standard/php_incomplete_class.h
@@ -26,18 +26,18 @@
#define PHP_IC_ENTRY \
BG(incomplete_class)
-#define PHP_SET_CLASS_ATTRIBUTES(struc) \
- /* OBJECTS_FIXME: Fix for new object model */ \
- if (Z_OBJCE_P(struc) == BG(incomplete_class)) { \
- class_name = php_lookup_class_name(struc, &name_len); \
- free_class_name = 1; \
+#define PHP_SET_CLASS_ATTRIBUTES(struc) \
+ /* OBJECTS_FIXME: Fix for new object model */ \
+ if (Z_OBJ_HT_P(struc)->get_class_entry && \
+ Z_OBJCE_P(struc) == BG(incomplete_class)) { \
+ class_name = php_lookup_class_name(struc, &name_len); \
+ free_class_name = 1; \
incomplete_class = 1; \
- } else { \
- class_name = Z_OBJCE_P(struc)->name; \
- name_len = Z_OBJCE_P(struc)->name_length; \
+ } else { \
+ free_class_name = !zend_get_object_classname(struc, &class_name, &name_len);\
}
-#define PHP_CLEANUP_CLASS_ATTRIBUTES() \
+#define PHP_CLEANUP_CLASS_ATTRIBUTES() \
if (free_class_name) efree(class_name)
#define PHP_CLASS_ATTRIBUTES \