From: Justin Y. <ju...@sk...> - 2002-10-19 20:31:02
|
On Sat, 2002-10-19 at 11:03, Jason Long wrote: > Justin here are some proposed modifications to the PHP extension. This will > give you an opportunity to work with the new PHP code. > > Modifications will be made to src/clients/php/zendmod.c > > 1. Change name of c4g_get_top_node to c4g_get_root_node. Since we are using > a tree hierarchy, I think this name would make more sense. Done > 2. Take the code that actually reads the top node from c4g_get_top_node and > put it in the `module_init' function. Create a module-level static variable > to hold the top node after initialization is complete and use it in the > `c4g_get_top_node' function instead of loading a new tree. Also done. We still need to clean up module_uninit to fix that minor memory leak. I also checked into src/clients/php/ two files, c4g.class.php and example.php. The c4g.class.php is a new PHP class wrapper around the c4g PHP extension, and the example.php is, you guessed it, an example of how to use the class to output the exact same thing your non-object-based test.php script did. It seems slow, I'm not sure whether its much slower than your script, but I'm gonna see if I can speed it up. Justin -- SkiingYAC.com Custom Solutions su...@sk... http://www.SkiingYAC.com |