Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13002 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11147 invoked by uid 1010); 27 Sep 2004 01:29:47 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 11122 invoked from network); 27 Sep 2004 01:29:47 -0000 Received: from unknown (HELO bobsilva.com) (198.237.84.92) by pb1.pair.com with SMTP; 27 Sep 2004 01:29:47 -0000 Received: from [198.237.84.90] (account me HELO salty) by bobsilva.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 440016 for internals@lists.php.net; Sun, 26 Sep 2004 18:08:47 -0700 To: Date: Sun, 26 Sep 2004 18:28:16 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Thread-Index: AcSkMULw9EfseT5WTlameDHc3GhF2Q== Message-ID: Subject: Newbie help From: junkmail@bobsilva.com ("Robert Silva") Trying to register a constant value for a class and it keeps crashing. Learning C as I go, so I would appreciate some insight. I can figure out that my *property value is lost during zend_hash_add() but my knowledge stops there as to why. Tried passing property as property and &property. ZEND_METHOD(zboolean, __construct) { zval *object = getThis(); zval *property ALLOC_ZVAL(property); INIT_PZVAL(property); ZVAL_STRING(property, "true", 1); zend_hash_add(&(Z_OBJCE_P(object))->constants_table, "TrueString", sizeof("TrueString")+1, property, sizeof(zval *)); } Thanks Bob