]> granicus.if.org Git - php/commitdiff
update skeleton
authorHarald Radi <phanto@php.net>
Thu, 16 Jan 2003 18:46:59 +0000 (18:46 +0000)
committerHarald Radi <phanto@php.net>
Thu, 16 Jan 2003 18:46:59 +0000 (18:46 +0000)
ext/rpc/skeleton/php_skeleton.h [new file with mode: 0644]
ext/rpc/skeleton/skeleton.c
ext/rpc/skeleton/skeleton.h

diff --git a/ext/rpc/skeleton/php_skeleton.h b/ext/rpc/skeleton/php_skeleton.h
new file mode 100644 (file)
index 0000000..e591b90
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+   +----------------------------------------------------------------------+
+   | PHP Version 4                                                        |
+   +----------------------------------------------------------------------+
+   | Copyright (c) 1997-2003 The PHP Group                                |
+   +----------------------------------------------------------------------+
+   | This source file is subject to version 2.02 of the PHP license,      |
+   | that is bundled with this package in the file LICENSE, and is        |
+   | available at through the world-wide-web at                           |
+   | http://www.php.net/license/2_02.txt.                                 |
+   | 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: Harald Radi <h.radi@nme.at>                                  |
+   +----------------------------------------------------------------------+
+ */
+
+#ifndef PHP_SKELETON_H
+#define PHP_SKELETON_H
+
+extern zend_module_entry skeleton_module_entry;
+#define phpext_skeleton_ptr &skeleton_module_entry
+
+#endif /* PHP_SKELETON_H */
\ No newline at end of file
index 5f1440ab86c5103358a43e0a2f1f7a14ec9c2b1e..6caf1013843f2ee03d0e208d7680dea5d5a7402f 100644 (file)
@@ -56,41 +56,69 @@ skeleton_call,                              /* method call handler */
 skeleton_get,                          /* property get handler */
 skeleton_set,                          /* property set handler */
 skeleton_compare,                      /* compare handler, can be NULL */
-skeleton_has_property,         /* reflection functions,
-skeleton_unset_property,        *  can be NULL
-skeleton_get_properties                 */
+skeleton_has_property,         /* reflection functions */
+skeleton_unset_property,       /* can be NULL */
+skeleton_get_properties
 RPC_REGISTER_HANDLERS_END()
 
 /* register ini settings */
-RPC_INI_START(skeleton)
+PHP_INI_BEGIN()
        /* TODO: palce your ini entries here */
-RPC_INI_END()
+PHP_INI_END()
 
 /* register userspace functions */
-RPC_FUNCTION_ENTRY_START(skeleton)
+RPC_FUNCTION_ENTRY_BEGIN(skeleton)
        /* TODO: add your userspace functions here */
        ZEND_FE(skeleton_function, NULL)
 RPC_FUNCTION_ENTRY_END()
 
 /* register class methods */
-RPC_METHOD_ENTRY_START(skeleton)
+RPC_METHOD_ENTRY_BEGIN(skeleton)
        /* TODO: add your class methods here */
        ZEND_FALIAS(method, skeleton_function, NULL)
 RPC_METHOD_ENTRY_END()
 
-/* init function that is called before the class is registered
- * so you can do any tricky stuff in here
- */
-RPC_INIT_FUNCTION(skeleton)
+zend_module_entry skeleton_module_entry = {
+       ZE2_STANDARD_MODULE_HEADER,
+       "skeleton",
+       RPC_FUNCTION_ENTRY(skeleton),
+       ZEND_MINIT(skeleton),
+       ZEND_MSHUTDOWN(skeleton),
+       NULL,
+       NULL,
+       ZEND_MINFO(skeleton),
+       "0.1a",
+       STANDARD_MODULE_PROPERTIES
+};
+
+ZEND_MINIT_FUNCTION(skeleton)
 {
        /* TODO: place your init stuff here */
+
+       RPC_REGISTER_LAYER(skeleton);
+       REGISTER_INI_ENTRIES();
+
+       return SUCCESS;
 }
 
-RPC_SHUTDOWN_FUNCTION(skeleton)
+ZEND_MSHUTDOWN_FUNCTION(skeleton)
 {
        /* TODO: place your shutdown stuff here */
+
+       UNREGISTER_INI_ENTRIES();
+
+       return SUCCESS;
 }
 
+ZEND_MINFO_FUNCTION(skeleton)
+{
+       DISPLAY_INI_ENTRIES();
+}
+
+#ifdef COMPILE_DL_COM
+ZEND_GET_MODULE(skeleton);
+#endif
+
 /* rpc handler functions */
 static int skeleton_hash(rpc_string name, rpc_string *hash, void *data, int num_args, char *arg_types, int type)
 {
index 25745b3b0858ef8c4e9243e4e28fa9a3a846a7d4..001872a2f5230ce6da829d87afb09ca59dc83196 100644 (file)
 
 RPC_DECLARE_HANDLER(skeleton);
 
+ZEND_MINIT_FUNCTION(skeleton);
+ZEND_MSHUTDOWN_FUNCTION(skeleton);
+ZEND_MINFO_FUNCTION(skeleton);
+
 /* TODO: define your functions here */
 ZEND_FUNCTION(skeleton_function);
 /**/