All right, I finally started coding :)

First of all, I must say I read the documentation, just in case you want to bash me on 
that..

I have questions about memory allocation, and documentation. 

1) The documentation on writing extensions is not very "extensive". It tells you what 
is a zval, how to create one, how to get parameters, how to return parameters, and 
that's basically all. If you want to use the strength of the Zend engine to store 
stuff in hash so you can retrieve it later, you're doomed. Things like 
zend_list_insert, add_property_resource, zend_list_addref, are either not documented 
or just mentionned, without examples.

The Appendix E of the documentation is totally obsolete, it references old functions 
that have been deprecated since PHP 4. Also, the manual, chapter 41 (Where to go from 
there) says "take time to study the header files and some modules [...] and the MySQL 
module [..]. The mysql module is one of the most complicated module! And reading the 
header files doesn't help, there is not a single comment there.

I see macros, functions, that sound interesting, but I have no idea of what they do, 
how to call them, what memory they allocate, what are the pros and cons of using them, 
should I use them, etc..

2) By reading the excellent modules 'ming' and 'domxml', I was able to understand how 
to create an object, give it elements, assign methods to the object, and make an 
instance of that object from my php test script, call its methods, and get returned 
values (woohoo!).

However, i'm not sure about memory allocation, especially when it comes to adding 
stuff in the hash tables. This is kind of obscure, and not documented. What should I 
read to get more information about this? I'm planning to use the -DDEBUG option to 
check if everything is okay, but a document explaining those functions would be great.

PS: for those interested, the extension is a PHP equivalent of the JEnscribe object 
for Java. It allows access to Enscribe files on a Himalaya system (ex Tandem Computer, 
ex Compaq, now HP...). 

Fab.

Reply via email to