2000-06-23 16:46:04 +00:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
2004-01-08 17:33:29 +00:00
|
|
|
| PHP Version 5 |
|
2000-06-23 16:46:04 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2014-01-03 03:08:10 +00:00
|
|
|
| Copyright (c) 1997-2014 The PHP Group |
|
2000-06-23 16:46:04 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2006-01-01 12:51:34 +00:00
|
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
2000-06-23 16:46:04 +00:00
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-06-10 20:04:29 +00:00
|
|
|
| available through the world-wide-web at the following url: |
|
2006-01-01 12:51:34 +00:00
|
|
|
| http://www.php.net/license/3_01.txt |
|
2000-06-23 16:46:04 +00:00
|
|
|
| If you did not receive a copy of the PHP license and are unable to |
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
| license@php.net so we can mail you a copy immediately. |
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
| Author: Sascha Schumann <sascha@schumann.cx> |
|
|
|
|
+----------------------------------------------------------------------+
|
2000-07-24 01:40:02 +00:00
|
|
|
*/
|
2000-06-23 16:46:04 +00:00
|
|
|
|
2000-07-24 01:40:02 +00:00
|
|
|
/* $Id$ */
|
2000-06-23 16:46:04 +00:00
|
|
|
|
|
|
|
#ifndef PHP_INCOMPLETE_CLASS_H
|
|
|
|
#define PHP_INCOMPLETE_CLASS_H
|
|
|
|
|
2000-06-23 16:58:30 +00:00
|
|
|
#include "ext/standard/basic_functions.h"
|
|
|
|
|
2000-06-23 16:46:04 +00:00
|
|
|
#define PHP_IC_ENTRY \
|
|
|
|
BG(incomplete_class)
|
|
|
|
|
2005-06-28 09:46:30 +00:00
|
|
|
#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)) { \
|
2014-02-13 13:54:23 +00:00
|
|
|
class_name = php_lookup_class_name(struc); \
|
2008-09-16 14:36:27 +00:00
|
|
|
if (!class_name) { \
|
2014-02-13 13:54:23 +00:00
|
|
|
class_name = STR_INIT(INCOMPLETE_CLASS, sizeof(INCOMPLETE_CLASS) - 1, 0); \
|
2008-09-16 14:36:27 +00:00
|
|
|
} \
|
2004-03-18 16:54:36 +00:00
|
|
|
incomplete_class = 1; \
|
2005-06-28 09:46:30 +00:00
|
|
|
} else { \
|
2014-02-13 13:54:23 +00:00
|
|
|
class_name = zend_get_object_classname(struc TSRMLS_CC); \
|
2000-06-23 16:46:04 +00:00
|
|
|
}
|
|
|
|
|
2005-06-28 09:46:30 +00:00
|
|
|
#define PHP_CLEANUP_CLASS_ATTRIBUTES() \
|
2014-02-13 13:54:23 +00:00
|
|
|
STR_RELEASE(class_name)
|
2000-06-23 16:46:04 +00:00
|
|
|
|
|
|
|
#define PHP_CLASS_ATTRIBUTES \
|
2014-02-13 13:54:23 +00:00
|
|
|
zend_string *class_name; \
|
2004-03-18 16:54:36 +00:00
|
|
|
zend_bool incomplete_class = 0
|
2000-06-23 16:46:04 +00:00
|
|
|
|
2002-07-24 09:55:11 +00:00
|
|
|
#define INCOMPLETE_CLASS "__PHP_Incomplete_Class"
|
|
|
|
#define MAGIC_MEMBER "__PHP_Incomplete_Class_Name"
|
2000-06-23 16:46:04 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2007-11-06 10:53:01 +00:00
|
|
|
PHPAPI zend_class_entry *php_create_incomplete_class(TSRMLS_D);
|
2014-02-13 13:54:23 +00:00
|
|
|
PHPAPI zend_string *php_lookup_class_name(zval *object);
|
2006-01-28 06:18:01 +00:00
|
|
|
PHPAPI void php_store_class_name(zval *object, const char *name, zend_uint len);
|
2000-06-23 16:46:04 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|