CVS update: php31/main
| From: | zeev | Date: | Wed, 07 Oct 1998 19:58:09 +0000 |
| Subject: | CVS update: php31/main | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-1724@lists.php.net to get a copy of this message | ||
Date: Wednesday October 7, 1998 @ 15:58
Author: zeev
Update of /repository/php31/main
In directory asf:/u2/tmp/cvs-serv6914/main
Modified Files:
control_structures_inline.h
Log Message:
ctor inheritence 3.0 patch
Index: php31/main/control_structures_inline.h
diff -c php31/main/control_structures_inline.h:2.12 php31/main/control_structures_inline.h:2.13
*** php31/main/control_structures_inline.h:2.12 Tue Sep 22 15:19:46 1998
--- php31/main/control_structures_inline.h Wed Oct 7 15:58:08 1998
***************
*** 29,35 ****
*/
! /* $Id: control_structures_inline.h,v 2.12 1998/09/22 19:19:46 shane Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
--- 29,35 ----
*/
! /* $Id: control_structures_inline.h,v 2.13 1998/10/07 19:58:08 zeev Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
***************
*** 1053,1064 ****
--- 1053,1073 ----
php3_error(E_ERROR,"%s is already a function or class",classname->value.str.val);
}
if (parent) {/* inheritance */
+ pval *ctor_ptr, ctor;
+
if (_php3_hash_find(&GLOBAL(function_table), parent->value.str.val,
parent->value.str.len+1, (void **) &parent_ptr) == FAILURE) {
php3_error(E_ERROR, "Cannot extend non existant class %s",
parent->value.str.val);
return;
}
new_class = *parent_ptr;
pval_copy_constructor(&new_class);
+
+ if (_php3_hash_find(new_class.value.ht, parent->value.str.val, parent->value.str.len+1,
(void **) &ctor_ptr)==SUCCESS) {
+ ctor = *ctor_ptr;
+ pval_copy_constructor(&ctor);
+ _php3_hash_update(new_class.value.ht, classname->value.str.val,
classname->value.str.len+1, &ctor, sizeof(pval), NULL);
+ _php3_hash_del(new_class.value.ht, parent->value.str.val, parent->value.str.len+1);
+ }
} else {
new_class.type = IS_CLASS;
new_class.value.ht = (HashTable *) emalloc(sizeof(HashTable));
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net