Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23772 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14842 invoked by uid 1010); 29 May 2006 18:52:56 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 14826 invoked from network); 29 May 2006 18:52:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 May 2006 18:52:56 -0000 X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 72.14.214.193 hu-out-0102.google.com Linux 2.4/2.6 Received: from ([72.14.214.193:11833] helo=hu-out-0102.google.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id AD/68-04939-6034B744 for ; Mon, 29 May 2006 14:52:54 -0400 Received: by hu-out-0102.google.com with SMTP id 36so541347hui for ; Mon, 29 May 2006 11:52:52 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=nwndABgq9uWUkmL3djjj44Ekg6YrJMib3r9cFP9mM/or48B8TdmL9bQmY7hvS+jHPVHFHv/t2iWyisBHlDPuEvifM20YR0JA97Jy+magzHerlbRJf0DHGmisfxKjueeFdivjH1VO0ksc2wlQPQFs00tufsMbdZtJeEmezu8Esnk= Received: by 10.48.246.5 with SMTP id t5mr1954407nfh; Mon, 29 May 2006 11:52:51 -0700 (PDT) Received: by 10.49.1.2 with HTTP; Mon, 29 May 2006 11:52:51 -0700 (PDT) Message-ID: <7f3ed2c30605291152o2e99b579u6a2b1e38684aaad9@mail.gmail.com> Date: Mon, 29 May 2006 20:52:51 +0200 Sender: hannes.magnusson@gmail.com To: internals@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 009999be3ea3f43d Subject: [PATCH] arg_info and friends From: bjori@php.net ("Hannes Magnusson") Hi all I've created a patch[1] that welcomes new friend into the zend_arg_info family, resource, and a new flag for ZEND_ME_MAPPING and pals, ZEND_ACC_INFO_MAP_TO_FUNCTION. The idea is to make it easier to define argument info for those extensions who map methods to functions which require some kind of resource as its first argument. Since the methods don't take any resource argument one would need to define two arg_info, one for the function and one for the method, with the only difference being the first parameter. This patch lets you however define the first argument as a resource (ZEND_ARG_RESOURCE_INFO) and then when you register the method you can pass the ZEND_ACC_INFO_MAP_TO_FUNCTION flag so the first argument (*if* it's defined as resource) will be skipped. On a related note, I find it kinda silly we don't offer argument info (except from spl) so I made a patch for ext/dom[2], ext/xsl[3] and ext/reflection[4]. I'd like to take down the rest, of at least the OO once.. Any thoughts? -Hannes [1] http://php.is/bugs/arg_info/ZEND_ARG_RESOURCE.HEAD.patch.txt [2] http://php.is/bugs/arg_info/arginfo.dom.patch.txt [3] http://php.is/bugs/arg_info/arginfo.xsl.patch.txt [4] http://php.is/bugs/arg_info/arginfo.reflection.patch.txt