mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
ongoing development ...
This commit is contained in:
parent
207f26ae91
commit
c1fe9cd279
7 changed files with 268 additions and 66 deletions
|
@ -1,11 +1,20 @@
|
|||
#ifndef RPC_H
|
||||
#define RPC_H
|
||||
|
||||
#define CONSTRUCTOR __construct
|
||||
#define CONSTRUCTOR_FN ZEND_FN(__construct)
|
||||
#define FOREACH_HANDLER for (__handler_counter=0; __handler_counter < HANDLER_COUNT; __handler_counter++)
|
||||
#define HANDLER handler_entries[__handler_counter]
|
||||
#define HANDLER_COUNT (sizeof(handler_entries) / sizeof(rpc_handler_entry))
|
||||
|
||||
#define GET_INTERNAL(intern) GET_INTERNAL_EX(intern, object)
|
||||
#define GET_INTERNAL_EX(intern, object) rpc_internal **intern; \
|
||||
zend_hash_index_find(RPC_G(instance), object->value.obj.handle, (void **) &intern);
|
||||
#define GET_INTERNAL(intern) rpc_internal **intern; \
|
||||
GET_INTERNAL_EX(intern, object)
|
||||
#define GET_INTERNAL_EX(intern, object) if (zend_hash_index_find(instance, object->value.obj.handle, (void **) &intern) == FAILURE) { \
|
||||
/* TODO: exception */ \
|
||||
}
|
||||
|
||||
#define RPC_REFCOUNT(intern) ((*intern)->refcount)
|
||||
#define RPC_ADDREF(intern) (++RPC_REFCOUNT(intern))
|
||||
#define RPC_DELREF(intern) (--RPC_REFCOUNT(intern))
|
||||
|
||||
static int __handler_counter;
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue