cvs: php4 /ext/rpc/com com.c com.h

From: Date: Sun, 09 Jun 2002 14:52:49 +0000
Subject: cvs: php4 /ext/rpc/com com.c com.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12273@lists.php.net to get a copy of this message
phanto Sun Jun 9 10:52:49 2002 EDT Modified files: /php4/ext/rpc/com com.c com.h Log: reflect the new abstraction changes in the demo layer Index: php4/ext/rpc/com/com.c diff -u php4/ext/rpc/com/com.c:1.7 php4/ext/rpc/com/com.c:1.8 --- php4/ext/rpc/com/com.c:1.7 Mon Apr 22 10:25:45 2002 +++ php4/ext/rpc/com/com.c Sun Jun 9 10:52:49 2002 @@ -1,45 +1,55 @@ #include "com.h" /* protos */ -static int com_hash(char *, zend_uint, char **, zend_uint *, int, char *, int); -static int com_ctor(char *, zend_uint, void **, int , zval ***); +static int com_hash(rpc_string, rpc_string *, int, char *, int); +static int com_name(rpc_string, rpc_string *, int); +static int com_ctor(rpc_string, void **, int , zval ***); static int com_dtor(void **); -static int com_call(char *, zend_uint, void **, zval **, int, zval ***); -static int com_get(char *, zend_uint, zval *, void **); -static int com_set(char *, zend_uint, zval *, void **); +static int com_call(rpc_string, void **, zval **, int, zval ***); +static int com_get(rpc_string, zval *, void **); +static int com_set(rpc_string, zval *, void **); static int com_compare(void **, void **); -static int com_get_classname(char **, zend_uint *, void **); -static int com_has_property(char *, zend_uint, void **); -static int com_unset_property(char *, zend_uint, void **); +static int com_has_property(rpc_string, void **); +static int com_unset_property(rpc_string, void **); static int com_get_properties(HashTable **, void **); /* register rpc callback function */ RPC_REGISTER_HANDLERS_START(com) -POOL, +TRUE, /* poolable */ HASH_AS_INT_WITH_SIGNATURE, com_hash, +com_name, com_ctor, com_dtor, com_call, com_get, com_set, com_compare, -com_get_classname, com_has_property, com_unset_property, com_get_properties RPC_REGISTER_HANDLERS_END() +/* register ini settings */ +RPC_INI_START(com) +PHP_INI_ENTRY_EX("com.allow_dcom", "0", PHP_INI_SYSTEM, NULL, php_ini_boolean_displayer_cb) +PHP_INI_ENTRY_EX("com.autoregister_typelib", "0", PHP_INI_SYSTEM, NULL, php_ini_boolean_displayer_cb) +PHP_INI_ENTRY_EX("com.autoregister_verbose", "0", PHP_INI_SYSTEM, NULL, php_ini_boolean_displayer_cb) +PHP_INI_ENTRY_EX("com.autoregister_casesensitive", "1", PHP_INI_SYSTEM, NULL, php_ini_boolean_displayer_cb) +RPC_INI_END() + /* register userspace functions */ RPC_FUNCTION_ENTRY_START(com) ZEND_FALIAS(com_invoke, rpc_call, NULL) ZEND_FE(com_addref, NULL) + ZEND_FE(com_release, NULL) RPC_FUNCTION_ENTRY_END() /* register class methods */ RPC_METHOD_ENTRY_START(com) ZEND_FALIAS(addref, com_addref, NULL) + ZEND_FALIAS(release, com_release, NULL) RPC_METHOD_ENTRY_END() /* init function that is called before the class is registered @@ -51,55 +61,58 @@ /* rpc handler functions */ -static int com_hash(char *name, zend_uint name_len, char **hash, zend_uint *hash_len, int num_args, char *arg_types, int type) +static int com_hash(rpc_string name, rpc_string *hash, int num_args, char *arg_types, int type) { - *hash = strdup(name); - *hash_len = name_len; + hash->str = strdup(name.str); + hash->len = name.len; return SUCCESS; } -static int com_ctor(char *class_name, zend_uint class_name_len, void **data, int num_args, zval **args[]) +static int com_name(rpc_string hash, rpc_string *name, int type) { + name->str = strdup(hash.str); + name->len = hash.len; + return SUCCESS; } -static int com_dtor(void **data) +static int com_ctor(rpc_string class_name, void **data, int num_args, zval **args[]) { return SUCCESS; } -static int com_call(char *method_name, zend_uint method_name_len, void **data, zval **return_value, int num_args, zval **args[]) +static int com_dtor(void **data) { return SUCCESS; } -static int com_get(char *property_name, zend_uint property_name_len, zval *return_value, void **data) +static int com_call(rpc_string method_name, void **data, zval **return_value, int num_args, zval **args[]) { return SUCCESS; } -static int com_set(char *property_name, zend_uint property_name_len, zval *value, void **data) +static int com_get(rpc_string property_name, zval *return_value, void **data) { return SUCCESS; } -static int com_compare(void **data1, void **data2) +static int com_set(rpc_string property_name, zval *value, void **data) { return SUCCESS; } -static int com_get_classname(char **class_name, zend_uint *class_name_length, void **data) +static int com_compare(void **data1, void **data2) { return SUCCESS; } -static int com_has_property(char *property_name, zend_uint property_name_length, void **data) +static int com_has_property(rpc_string property_name, void **data) { return SUCCESS; } -static int com_unset_property(char *property_name, zend_uint property_name_length, void **data) +static int com_unset_property(rpc_string property_name, void **data) { return SUCCESS; } @@ -111,5 +124,9 @@ /* custom functions */ ZEND_FUNCTION(com_addref) +{ +} + +ZEND_FUNCTION(com_release) { } Index: php4/ext/rpc/com/com.h diff -u php4/ext/rpc/com/com.h:1.1 php4/ext/rpc/com/com.h:1.2 --- php4/ext/rpc/com/com.h:1.1 Sat Mar 16 11:15:33 2002 +++ php4/ext/rpc/com/com.h Sun Jun 9 10:52:49 2002 @@ -5,5 +5,6 @@ #include "../php_rpc.h" ZEND_FUNCTION(com_addref); +ZEND_FUNCTION(com_release); #endif

« previous php.cvs (#12273) next »