cvs: /php4/ext/imap imap.c
| From: | Zeev Suraski | Date: | Sat, 31 Jul 1999 20:21:08 +0000 |
| Subject: | cvs: /php4/ext/imap imap.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-3023@lists.php.net to get a copy of this message | ||
zeev Sat Jul 31 16:21:08 1999 EDT
Modified files:
/php4/ext/imap imap.c
Log:
More IMAP fixes
Index: php4/ext/imap/imap.c
diff -u php4/ext/imap/imap.c:1.7 php4/ext/imap/imap.c:1.8
--- php4/ext/imap/imap.c:1.7 Sat Jul 31 06:38:33 1999
+++ php4/ext/imap/imap.c Sat Jul 31 16:21:07 1999
@@ -21,7 +21,7 @@
| PHP 4.0 updates: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: imap.c,v 1.7 1999/07/31 10:38:33 zeev Exp $ */
+/* $Id: imap.c,v 1.8 1999/07/31 20:21:07 zeev Exp $ */
#define IMAP41
@@ -182,12 +182,27 @@
inline int add_assoc_object(pval *arg, char *key, pval *tmp)
{
- return _php3_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(pval *),
NULL);
+ HashTable *symtable;
+
+ if (arg->type == IS_OBJECT) {
+ symtable = arg->value.obj.properties;
+ } else {
+ symtable = arg->value.ht;
+ }
+ return _php3_hash_update(symtable, key, strlen(key)+1, (void *) &tmp, sizeof(pval *), NULL);
}
inline int add_next_index_object(pval *arg, pval *tmp)
{
- return _php3_hash_next_index_insert( arg->value.ht, (void *) &tmp, sizeof(pval *), NULL);
+ HashTable *symtable;
+
+ if (arg->type == IS_OBJECT) {
+ symtable = arg->value.obj.properties;
+ } else {
+ symtable = arg->value.ht;
+ }
+
+ return _php3_hash_next_index_insert(symtable, (void *) &tmp, sizeof(pval *), NULL);
}