php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_incomplete_class.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Author: Sascha Schumann <sascha@schumann.cx> |
14 +----------------------------------------------------------------------+
15*/
16
17#ifndef PHP_INCOMPLETE_CLASS_H
18#define PHP_INCOMPLETE_CLASS_H
19
21
23
24#define PHP_IC_ENTRY php_ce_incomplete_class
25
26#define PHP_SET_CLASS_ATTRIBUTES(struc) \
27 /* OBJECTS_FIXME: Fix for new object model */ \
28 if (Z_OBJCE_P(struc) == php_ce_incomplete_class) { \
29 class_name = php_lookup_class_name(Z_OBJ_P(struc)); \
30 if (!class_name) { \
31 class_name = zend_string_init(INCOMPLETE_CLASS, sizeof(INCOMPLETE_CLASS) - 1, 0); \
32 } \
33 incomplete_class = 1; \
34 } else { \
35 class_name = zend_string_copy(Z_OBJCE_P(struc)->name); \
36 }
37
38#define PHP_CLEANUP_CLASS_ATTRIBUTES() \
39 zend_string_release_ex(class_name, 0)
40
41#define PHP_CLASS_ATTRIBUTES \
42 zend_string *class_name; \
43 bool incomplete_class ZEND_ATTRIBUTE_UNUSED = 0
44
45#define INCOMPLETE_CLASS "__PHP_Incomplete_Class"
46#define MAGIC_MEMBER "__PHP_Incomplete_Class_Name"
47
48#ifdef __cplusplus
49extern "C" {
50#endif
51
55
56#ifdef __cplusplus
57};
58#endif
59
60#endif
php_ce_incomplete_class
#define PHPAPI
Definition php.h:71
PHPAPI zend_string * php_lookup_class_name(zend_object *object)
PHPAPI void php_register_incomplete_class_handlers(void)
PHPAPI void php_store_class_name(zval *object, zend_string *name)
struct _zval_struct zval
struct _zend_string zend_string
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
zend_string * name