Zend Hash Question

From: Date: Wed, 05 Dec 2001 06:35:26 +0000
Subject: Zend Hash Question
Groups: php.dev 
Request: Send a blank email to php-dev+get-72542@lists.php.net to get a copy of this message
something that has confused me for a second is the use of HashTables to store a user defined type. the constructor is fine, its just insertion and querying that's mildly confusing. for instance, it seems as if zend_hash_add takes sizeof(struct) as an argument as opposed to sizeof(struct *) when i assume that generally we only store pointers in the hash. suppose i have a struct of type widget_t which gets allocated on the heap. what's the general practice of inserting and retrieving widget from the hash table ?

« previous php.dev (#72542) next »