svn: /phpdoc/en/trunk/internals2/variables/ index.xml

From: Date: Wed, 10 Apr 2013 23:09:35 +0000
Subject: svn: /phpdoc/en/trunk/internals2/variables/ index.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-11190@lists.php.net to get a copy of this message
krakjoe Wed, 10 Apr 2013 23:09:35 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=330065 Log: more Changed paths: U phpdoc/en/trunk/internals2/variables/index.xml Modified: phpdoc/en/trunk/internals2/variables/index.xml =================================================================== --- phpdoc/en/trunk/internals2/variables/index.xml 2013-04-10 22:57:24 UTC (rev 330064) +++ phpdoc/en/trunk/internals2/variables/index.xml 2013-04-10 23:09:35 UTC (rev 330065) @@ -616,6 +616,8 @@ <para>The internal structure and exact operation of HashTables are out of the scope of this document, this document serves to inform you of the API's available and how best to use them. For a more detailed picture of the HashTable see <code>Zend/zend_hash.h</code>.</para> + <para>Unless otherwise stated, these functions all return <code>FAILURE</code> if the requested opeation fails for any reason, otherwise <code>SUCCESS</code> is returned.</para> + <table xml:id="internals2.variables.advrrays.api"> <title>HashTable API</title> <tgroup cols="2"> @@ -627,16 +629,48 @@ </thead> <tbody> <row> - <entry><code>void zend_hash_init(HashTable* ht, uint size, hash_func_t hash, dtor_func_t destructor, zend_bool persistent)</code></entry> + <entry><code>int zend_hash_init(HashTable* ht, uint size, hash_func_t hash, dtor_func_t destructor, zend_bool persistent)</code></entry> <entry>Initializes the hash table to hold at least <code>size</code> elements, <code>hash</code> exists for historical reasons and is always ignored, <code>zend_inline_hash_func</code> is always used as the hashing function. <code>destructor</code> may be <code>NULL</code>.</entry> </row> + <row> + <entry><code>int zend_hash_add(HashTable* ht, const char* key, uint klen, void* data, uint dlen, void** dest)</code></entry> + <entry>adds <code>data</code> to the table using the specified <code>key</code>, where the key is <code>length</code> bytes long (and will be copied from <code>key</code> to the table). If the key is set FAILURE will be returned.</entry> + </row> + + <row> + <entry><code>int zend_hash_update(HashTable* ht, const char* key, uint klen, void* data, uint dlen, void** dest)</code></entry> + <entry>adds <code>data</code> to the table using the specified <code>key</code>, where the key is <code>length</code> bytes long (and will be copied from <code>key</code> to the table). If the key has been set previously the old data has <code>dtor_func_t</code> called on it and the existing data is replaced with <code>data</code></entry> + </row> + + <row> + <entry><code>int zend_hash_find(HashTable* ht, const char* key, uint klen, void** data)</code></entry> + <entry>searches the table for <code>key</code>, setting <code>*data</code> and returning SUCCESS when it is found.</entry> + </row> + + <row> + <entry><code>zend_bool zend_hash_exists(HashTable* ht, const char* key, uint klen)</code></entry> + <entry>returns positively if <code>key</code> is found in the <code>ht</code></entry> + </row> + + <row> + <entry><code>int zend_hash_del(HashTable* ht, const char* key, uint klen)</code></entry> + <entry>removes the entry identified by <code>key</code> from the table if found</entry> + </row> + + <!-- ... zend_hash_index_* here --> + </tbody> </tgroup> </table> + <caution> + <para>zend_hash_* functions that accept <code>void* data</code> should normally cast it to <code>(void**)</code> (ie, <code>(void**) &amp;data</code>)</para> + </caution> </section> + <!-- copying/merging/cleaning here --> + <section xml:id="internals2.variables.creating"> <title>Creating variables and setting values</title> <para>

« previous php.doc.cvs (#11190) next »