Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21557 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97877 invoked by uid 1010); 16 Jan 2006 14:19:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 97862 invoked from network); 16 Jan 2006 14:19:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jan 2006 14:19:50 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:27727] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 8B/5B-13436-48BABC34 for ; Mon, 16 Jan 2006 09:19:49 -0500 Received: (qmail 4660 invoked from network); 16 Jan 2006 14:19:43 -0000 Received: from internal.zend.office (HELO ?127.0.0.1?) (10.1.1.1) by internal.zend.office with SMTP; 16 Jan 2006 14:19:43 -0000 Message-ID: <43CBAB7D.1070805@zend.com> Date: Mon, 16 Jan 2006 17:19:41 +0300 User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: Jan Pieper CC: internals@lists.php.net References: <3D.16.13436.064DAC34@pb1.pair.com> In-Reply-To: <3D.16.13436.064DAC34@pb1.pair.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] problem with zend_register_internal_class From: antony@zend.com (Antony Dovgal) You forgot to add TSRMLS_CC macro: zend_register_internal_class(&ce TSRMLS_CC); Btw, pecl-dev@lists.php.net is more appropriate list for such questions. On 16.01.2006 02:01, Jan Pieper wrote: > If I compile my class if written, I get this error-messages: > > ~/php-5.1.1/ext/smartflow/smartflow.c: In function 'zm_startup_smartflow': > ~/php-5.1.1/ext/smartflow/smartflow.c:109: error: too few arguments to function > 'zend_register_internal_class' > make: *** [ext/smartflow/smartflow.lo] Fehler 1 > > These are the lines where I get this error-messages (smartflow.c/lines: 91-110): > > PHP_MINIT_FUNCTION(smartflow) > { > zend_class_entry smartflow_ce; > > INIT_CLASS_ENTRY( > smartflow, > "SmartFlow", > smartflow_methods > ); > > smartflow_ce_ptr = zend_register_internal_class(&smartflow_ce); // 101 > > zend_declare_property_string( > smartflow_ce_ptr, // 104 > "content", strlen("content"), "", > ZEND_ACC_PUBLIC > ); > > return SUCCESS; > } > > > I have another class with "exactly the same" lines but there I get no > error-messages. I can´t find any differences in my sources. I hope you can help > me to fix my problem. If I add TSRMLS_CC to line 101 and 104 I don´t get these > error-messages but after compiling php I get a memory-access error. > > - Jan Pieper > -- Wbr, Antony Dovgal