From 078bcec0997ad0e07b720c43cc9e6d0e046a75ab Mon Sep 17 00:00:00 2001 From: SVN Migration Date: Thu, 27 Feb 2003 17:43:39 +0000 Subject: This commit was manufactured by cvs2svn to create branch 'PHP_5'. --- scripts/ext_skel_ng/php_resource.php | 65 ------------------------------------ 1 file changed, 65 deletions(-) delete mode 100644 scripts/ext_skel_ng/php_resource.php (limited to 'scripts/ext_skel_ng/php_resource.php') diff --git a/scripts/ext_skel_ng/php_resource.php b/scripts/ext_skel_ng/php_resource.php deleted file mode 100644 index ea99405841..0000000000 --- a/scripts/ext_skel_ng/php_resource.php +++ /dev/null @@ -1,65 +0,0 @@ -name = $name; - $this->payload = $payload; - $this->destruct = $destruct; - $this->description = $description; - - if (empty($this->destruct) && strstr($this->payload, "*")) { - $this->destruct = " free(resource);\n"; - } - - if(empty($this->payload)) { - $this->payload = "int"; - } - } - - function docbook_xml($base) { - return " -
- <litera>{$this->name}</literal> - - {$this->description} - -
-"; - } - - function minit_code() { - return " -le_{$this->name} = zend_register_list_destructors_ex({$this->name}_dtor, - NULL, - \"{$this->name}\", - module_number); - -"; - } - - function c_code() { - return " -int le_{$this->name}; - -void {$this->name}_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) -{ - {$this->payload} resource = ({$this->payload})(rsrc->ptr); - - {$this->destruct} -} -"; - } - - function h_code() { - $upname = strtoupper($this->name); - - return " -#define {$upname}_FETCH(r, z) ZEND_FETCH_RESOURCE(r, {$this->payload}, z, -1, ${$this->name}, le_{$this->name }); \ - if(!r) { RETURN_FALSE; } - -#define {$upname}_REGISTER(r) ZEND_REGISTER_RESOURCE(return_value, r, le_{$this->name }); -"; - } - } - -?> \ No newline at end of file -- cgit v1.2.1