Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80033 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71323 invoked from network); 31 Dec 2014 22:21:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Dec 2014 22:21:43 -0000 Authentication-Results: pb1.pair.com header.from=anatol.php@belski.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=anatol.php@belski.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain belski.net from 85.214.73.107 cause and error) X-PHP-List-Original-Sender: anatol.php@belski.net X-Host-Fingerprint: 85.214.73.107 klapt.com Received: from [85.214.73.107] ([85.214.73.107:33828] helo=h1123647.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 26/C1-60454-4F674A45 for ; Wed, 31 Dec 2014 17:21:41 -0500 Received: by h1123647.serverkompetenz.net (Postfix, from userid 33) id F2C3823D6002; Wed, 31 Dec 2014 23:21:36 +0100 (CET) Received: from 217.254.134.120 (SquirrelMail authenticated user anatol@belski.net) by webmail.klapt.com with HTTP; Wed, 31 Dec 2014 23:21:36 +0100 Message-ID: <5073d81218a31808f01f7fa405eebc55.squirrel@webmail.klapt.com> Date: Wed, 31 Dec 2014 23:21:36 +0100 To: internals@lists.php.net Cc: "Pierre Joye" User-Agent: SquirrelMail/1.5.2 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: resource consistency From: anatol.php@belski.net ("Anatol Belski") Hi, related to bug #43525, I see that zend_fetch_resource() still expects a default id as int as parameter. After some investigation i think that the "int default_id" argument can be surely dropped from the signature. The only extension in the core passing it is ext/interbase, all the others pass -1. Any other zend_list_* signature expects no integer but a zend_resource*. What I would do instead - transfer the control over the defauld_id to the corresponding extension. Maybe also making a helper function in zend_list.c, if it proves itself as needed. But in any case, to be consistent, the consistency should be that the api only works with zend_resource *. Please thoughts, I'd be inventing a patch if it's found sensible. Regards Anatol