Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:16171 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20431 invoked by uid 1010); 8 May 2005 08:29:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 5147 invoked from network); 8 May 2005 08:13:38 -0000 Received: from unknown (HELO vk.kiev.ua) (127.0.0.1) by localhost with SMTP; 8 May 2005 08:13:38 -0000 X-Host-Fingerprint: 62.244.34.170 vk.kiev.ua NetCache 5.3-5.5 Received: from ([62.244.34.170:52670] helo=ivory.vk.kiev.ua) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id FD/F8-35155-23ACD724 for ; Sun, 08 May 2005 04:13:38 -0400 Received: from [192.168.0.8] (helo=ROCK) by ivory.vk.kiev.ua with esmtp (Exim 4.43) id 1DUgut-000GeL-8C; Sun, 08 May 2005 11:13:35 +0300 Date: Sun, 8 May 2005 11:13:46 +0300 X-Priority: 3 (Normal) Message-ID: <1311656386.20050508111346@vk.kiev.ua> To: Marcus Boerger CC: internals@lists.php.net In-Reply-To: <407415236.20050507235743@marcus-boerger.de> References: <1276225914.20050507195635@vk.kiev.ua> <407415236.20050507235743@marcus-boerger.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re[2]: [PHP-DEV] small patch to Zend From: val@vk.kiev.ua (val khokhlov) Hello Marcus, Sunday, May 8, 2005, 12:57:43 AM, you wrote: >> small patch just to make zend_do_inheritance() exportable >> (I need this Zend function in my extension) MB> may i ask what you need it for? yes, when creating a class (restoring from bytecodes) with defined parent i need to setup inheritance (as zend_compile.c does). in php4 i can do it myself with zend_hash_merge(&ce->default_properties, &parent_ce->default_properties, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0); zend_hash_merge(&ce->function_table, &parent_ce->function_table, (void (*)(void *)) function_add_ref, &tmp_zend_function, sizeof(zend_function), 0); ce->parent = parent_ce; if (!ce->handle_property_get) ce->handle_property_get = parent_ce->handle_property_get; if (!ce->handle_property_set) ce->handle_property_set = parent_ce->handle_property_set; if (!ce->handle_function_call) ce->handle_function_call = parent_ce->handle_function_call; but in php5 there're too many functions that handle inheritance, so i think it's useless to duplicate them -- Best regards, val mailto:val@vk.kiev.ua