Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19753 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51918 invoked by uid 1010); 27 Oct 2005 06:51:36 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 51902 invoked from network); 27 Oct 2005 06:51:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Oct 2005 06:51:36 -0000 X-Host-Fingerprint: 198.237.84.92 unknown Linux 2.4/2.6 Received: from ([198.237.84.92:1287] helo=bobsilva.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id ED/9C-22886-7F870634 for ; Thu, 27 Oct 2005 02:51:35 -0400 Received: from [198.237.84.93] (HELO jake) by bobsilva.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 675194 for internals@lists.php.net; Wed, 26 Oct 2005 20:32:20 -0700 To: Date: Wed, 26 Oct 2005 23:51:18 -0700 Message-ID: <000101c5dac2$d529e390$5d54edc6@jake> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcXawTz5j5jOrUbuQp2rtDPUZzuV5gAAQGBA In-Reply-To: <200510240730.j9O7UCS0027321@ez1.php.net> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Subject: Accept null type hint in C From: me@bobsilva.com ("Bob Silva") References: <200510240730.j9O7UCS0027321@ez1.php.net> Hi, Since NULL typehints are allowed in userland, how would I go about it in C? I have ZEND_ARG_OBJ_INFO(0, obj, ZObject, 1) which has allow null set on. Then in the method: if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &objA, pow_ce_ZObject) == FAILURE) { If I pass NULL, it fails on the grounds that it isn't a ZObject. Also, Could someone explain the purpose of the zend_parse_method_parameters function as opposed to using the zend_parse_parameters? Thanks Bob Silva