Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22111 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45963 invoked by uid 1010); 4 Mar 2006 22:13:19 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 45948 invoked from network); 4 Mar 2006 22:13:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Mar 2006 22:13:19 -0000 X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from ([81.169.182.136:54209] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id F7/18-35203-EF01A044 for ; Sat, 04 Mar 2006 17:13:18 -0500 Received: from [192.168.1.3] (dslb-084-063-027-114.pools.arcor-ip.net [84.63.27.114]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id EB52B35C1B6; Sat, 4 Mar 2006 23:13:14 +0100 (CET) Date: Sat, 4 Mar 2006 23:13:19 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <662299758.20060304231319@marcus-boerger.de> To: "Andrew Mather (BT Std)" Cc: internals@lists.php.net In-Reply-To: <200603042203.42738.an.dromeda@btconnect.com> References: <200603042203.42738.an.dromeda@btconnect.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Private data requiring custom object creation error From: helly@php.net (Marcus Boerger) Hello Andrew, you obviously rely on standard zend objects because you are using standard zend handlers for yyour objects. To do so your object struct should start with the standard zend object struct as nearly all overloaded ebjects in current php do. In the constructor you now need to initialize at least the ce, and properties table. marcus Saturday, March 4, 2006, 11:03:42 PM, you wrote: > I'm working through George Schlossnagle's Advanced PHP Programming, > (which I'm happy to plug. Excellent). > Having successfully used C++ to generate extensions (per Jay Smith tutorial) > I am now checking out the facility to store custom objects - packaged private > data alongside the native zend object, per George S. example. > An example based closely on the example noted in the book, compiles fine, > but generates the following error and backtrace: > Program received signal SIGSEGV, Segmentation fault. > 0x0822d12b in zend_std_get_constructor (object=0x8459a48, tsrm_ls=0x835e018) > at /src/php-5.1.1/Zend/zend_object_handlers.c:884 > 884 zend_function *constructor = zobj->ce->constructor; > If constructor was simply null, would not be an issue. Suggests either the > object or object ce are inappropriate. > Any thoughts? > Cheers, > Andrew. Best regards, Marcus