Re: zend_do_end_class_declaration() question

From: Date: Sat, 15 Sep 2001 11:34:18 +0000
Subject: Re: zend_do_end_class_declaration() question
References: 1 2 3 4 5  Groups: php.dev 
Request: Send a blank email to php-dev+get-66004@lists.php.net to get a copy of this message
What happens in do_inherit_parent_constructor(CG(active_class_entry));? Can you try and check this with a Vanilla version of 4.0.6? Andi At 12:15 PM 9/15/2001 +0200, Stefan Arentz wrote:
On Sat, Sep 15, 2001 at 11:42:18AM +0300, Andi Gutmans wrote: It's the correct place. It sounds weird what you're mentioning. do_inherit_parent_constructor() also checks ce->parent and it seems to work. Do you have a short script (class decelerations) which shows this behavior? What are you trying to accomplish? I'm experimenting with some extra language features, like abstract class methods (pure virtual functions in C++). This is de PHP code: class BaseClass {
    function blah() {
      echo "blah\n";
    }
    abstract function foo($a, $b);
} class DerivedClass extends BaseClass {
    function bar() {
      echo "bar\n";
    }
} And this is my new: zend_do_end_class_declaration(): void zend_do_end_class_declaration(CLS_D) {
    do_inherit_parent_constructor(CG(active_class_entry));
    do_check_abstract_methods(CG(active_class_entry));
    CG(active_class_entry) = NULL;
} With do_check_abstract_methods: static void do_check_abstract_methods(zend_class_entry *ce) { if (ce->parent) {
      fprintf(stderr, "num = %d\n",
        zend_hash_num_elements(&ce->parent->abstract_methods));
} ... } This is with PHP 4.0.6. Regards, Stefan


« previous php.dev (#66004) next »