2 +--------------------------------------------------------------------+
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2013, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
13 #ifndef PHP_PQ_OBJECT_H
14 #define PHP_PQ_OBJECT_H
16 #define PHP_PQ_OBJ_DECL(_intern_type) \
17 _intern_type intern; \
18 HashTable *prophandler; \
22 typedef struct php_pq_object
{
23 PHP_PQ_OBJ_DECL(void *)
26 static inline void *PHP_PQ_OBJ(zval
*zv
, zend_object
*zo
) {
30 return (void *) (((char *) zo
) - zo
->handlers
->offset
);
33 typedef void (*php_pq_object_prophandler_func_t
)(zval
*object
, void *o
, zval
*return_value
);
35 typedef struct php_pq_object_prophandler
{
36 php_pq_object_prophandler_func_t read
;
37 php_pq_object_prophandler_func_t write
;
38 php_pq_object_prophandler_func_t gc
;
39 } php_pq_object_prophandler_t
;
41 extern void *php_pq_object_create(zend_class_entry
*ce
, void *intern
, size_t obj_size
, zend_object_handlers
*oh
, HashTable
*ph
);
42 extern void php_pq_object_dtor(zend_object
*obj
);
43 extern void php_pq_object_to_zval(void *o
, zval
*zv
);
44 extern void php_pq_object_to_zval_no_addref(void *o
, zval
*zv
);
45 extern void php_pq_object_addref(void *o
);
46 extern void php_pq_object_delref(void *o
);
47 extern HashTable
*php_pq_object_debug_info(zval
*object
, int *temp
);
48 extern HashTable
*php_pq_object_properties(zval
*object
);
49 HashTable
*php_pq_object_get_gc(zval
*object
, zval
**table
, int *n
);
50 extern zend_class_entry
*ancestor(zend_class_entry
*ce
);
51 extern zval
*php_pq_object_read_prop(zval
*object
, zval
*member
, int type
, void **cache_slot
, zval
*tmp
);
52 extern void php_pq_object_write_prop(zval
*object
, zval
*member
, zval
*value
, void **cache_slot
);
53 extern void php_pq_object_prophandler_dtor(zval
*zv
);
62 * vim600: noet sw=4 ts=4 fdm=marker
63 * vim<600: noet sw=4 ts=4