]> granicus.if.org Git - php/commitdiff
enable resource lookup by name
authorHartmut Holzgraefe <hholzgra@php.net>
Wed, 23 Apr 2003 16:20:48 +0000 (16:20 +0000)
committerHartmut Holzgraefe <hholzgra@php.net>
Wed, 23 Apr 2003 16:20:48 +0000 (16:20 +0000)
scripts/ext_skel_ng/extension_parser.php

index d6fae956b814128f08cb999323d00f49bfeb6830..b191691611cbd7488b18b5e449eaf570f3737177 100644 (file)
        function handle_resources_resource($attr) {
                $this->_check_c_name($attr['name'], "resource name");
 
-               $this->resources[] = new php_resource($attr['name'], 
-                                                                                                                                                                       @$attr['payload'], 
-                                                                                                                                                                       @$attr['alloc'], 
-                                                                                                                                                                       @$this->resource_destruct, 
-                                                                                                                                                                       @$this->resource_description);
+    $this->resources[$attr['name']] = new php_resource($attr['name'],
+                                                       @$attr['payload'],
+                                                       @$attr['alloc'],
+                                                       @$this->resource_destruct, 
+                                                       @$this->resource_description
+                                                       );
 
                unset($this->resource_description);
                unset($this->resource_destruct);