summaryrefslogtreecommitdiff
path: root/ext/standard/incomplete_class.c
diff options
context:
space:
mode:
authorJani Taskinen <jani@php.net>2007-11-06 10:53:01 +0000
committerJani Taskinen <jani@php.net>2007-11-06 10:53:01 +0000
commit661b7c13e6c8f2717c5ff6ebe940eda646d92f5c (patch)
treec9baf0c9486f69319ff102cfb247564ff3713746 /ext/standard/incomplete_class.c
parent5cfa9c631261d968b6574a0707c5d80d8c419e0b (diff)
downloadphp-git-661b7c13e6c8f2717c5ff6ebe940eda646d92f5c.tar.gz
MFH
Diffstat (limited to 'ext/standard/incomplete_class.c')
-rw-r--r--ext/standard/incomplete_class.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c
index 4eb33d4df1..84f7c2731e 100644
--- a/ext/standard/incomplete_class.c
+++ b/ext/standard/incomplete_class.c
@@ -14,8 +14,7 @@
+----------------------------------------------------------------------+
| Author: Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
- */
-
+*/
/* $Id$ */
@@ -31,7 +30,6 @@
"unserialize() gets called or provide a __autoload() function " \
"to load the class definition "
-
static zend_object_handlers php_incomplete_object_handlers;
/* {{{ incomplete_class_message
@@ -56,46 +54,55 @@ static void incomplete_class_message(zval *object, int error_type TSRMLS_DC)
}
/* }}} */
-static zval *incomplete_class_get_property(zval *object, zval *member, int type TSRMLS_DC)
+static zval *incomplete_class_get_property(zval *object, zval *member, int type TSRMLS_DC) /* {{{ */
{
incomplete_class_message(object, E_NOTICE TSRMLS_CC);
- if(type == BP_VAR_W || type == BP_VAR_RW) {
+
+ if (type == BP_VAR_W || type == BP_VAR_RW) {
return EG(error_zval_ptr);
} else {
return EG(uninitialized_zval_ptr);
}
}
+/* }}} */
-static void incomplete_class_write_property(zval *object, zval *member, zval *value TSRMLS_DC)
+static void incomplete_class_write_property(zval *object, zval *member, zval *value TSRMLS_DC) /* {{{ */
{
incomplete_class_message(object, E_NOTICE TSRMLS_CC);
}
+/* }}} */
-static zval **incomplete_class_get_property_ptr_ptr(zval *object, zval *member TSRMLS_DC)
+static zval **incomplete_class_get_property_ptr_ptr(zval *object, zval *member TSRMLS_DC) /* {{{ */
{
incomplete_class_message(object, E_NOTICE TSRMLS_CC);
return &EG(error_zval_ptr);
}
+/* }}} */
-static void incomplete_class_unset_property(zval *object, zval *member TSRMLS_DC)
+static void incomplete_class_unset_property(zval *object, zval *member TSRMLS_DC) /* {{{ */
{
incomplete_class_message(object, E_NOTICE TSRMLS_CC);
}
+/* }}} */
-static int incomplete_class_has_property(zval *object, zval *member, int check_empty TSRMLS_DC)
+static int incomplete_class_has_property(zval *object, zval *member, int check_empty TSRMLS_DC) /* {{{ */
{
incomplete_class_message(object, E_NOTICE TSRMLS_CC);
return 0;
}
+/* }}} */
-static union _zend_function *incomplete_class_get_method(zval **object, char *method, int method_len TSRMLS_DC) {
+static union _zend_function *incomplete_class_get_method(zval **object, char *method, int method_len TSRMLS_DC) /* {{{ */
+{
incomplete_class_message(*object, E_ERROR TSRMLS_CC);
return NULL;
}
+/* }}} */
/* {{{ php_create_incomplete_class
*/
-static zend_object_value php_create_incomplete_object(zend_class_entry *class_type TSRMLS_DC) {
+static zend_object_value php_create_incomplete_object(zend_class_entry *class_type TSRMLS_DC)
+{
zend_object *object;
zend_object_value value;
@@ -107,7 +114,7 @@ static zend_object_value php_create_incomplete_object(zend_class_entry *class_ty
return value;
}
-zend_class_entry *php_create_incomplete_class(TSRMLS_D)
+PHPAPI zend_class_entry *php_create_incomplete_class(TSRMLS_D)
{
zend_class_entry incomplete_class;
@@ -140,11 +147,12 @@ PHPAPI char *php_lookup_class_name(zval *object, zend_uint *nlen)
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)
+ if (nlen) {
*nlen = Z_STRLEN_PP(val);
+ }
}
- return (retval);
+ return retval;
}
/* }}} */