Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69477 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22194 invoked from network); 3 Oct 2013 09:27:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Oct 2013 09:27:44 -0000 Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.51 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.128.51 mail-qe0-f51.google.com Received: from [209.85.128.51] ([209.85.128.51:38412] helo=mail-qe0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 76/D0-18027-F883D425 for ; Thu, 03 Oct 2013 05:27:43 -0400 Received: by mail-qe0-f51.google.com with SMTP id ne12so1494692qeb.38 for ; Thu, 03 Oct 2013 02:27:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=MSfab2EMOyuT6eFKbPhK9r+8HHgZqEHrGEO6ULthwHI=; b=vasqvCzML/Qe+bQWbIKq1wfEGbF/jcVvihrux1R//oEZ7c/YtQ8qJ1D/LPRXuYE0xD txiG6h2kFjfJ3sybuOBpJxlEKM9OO19DfZFktLZ4rFuBj3/cNlUR1ZEItm2NoVnW5yHm gzVZNR/4q5Suj/18BwUBSEKv+ESnVnsAMo7cc1vQC08Nap1x76DHfE7j+0VrzLP60CcV JR+iDGYejNDRD+KBXfv8zmR3cNGsNq1WuvazV/zyxu/n6XBr559l17mL8xiYLaCXtx0j ojd8X/UOuLupkEkur1NPfA44L423twmw0FkkU7JX7QM0Zo3OEZm2Z8fxR5bOf5UgWVq1 Dn0g== MIME-Version: 1.0 X-Received: by 10.49.30.66 with SMTP id q2mr8465369qeh.38.1380792461189; Thu, 03 Oct 2013 02:27:41 -0700 (PDT) Sender: jakub.php@gmail.com Received: by 10.224.55.16 with HTTP; Thu, 3 Oct 2013 02:27:41 -0700 (PDT) In-Reply-To: <524D31E1.1050103@fedoraproject.org> References: <524D31E1.1050103@fedoraproject.org> Date: Thu, 3 Oct 2013 10:27:41 +0100 X-Google-Sender-Auth: NGHKd6fQFDNqHqO4wBisDQzxUXw Message-ID: To: Remi Collet Cc: PHP Internals Content-Type: multipart/alternative; boundary=047d7bdc90be28674304e7d2cc9a Subject: Re: [PHP-DEV] Streams constify API change in master leads to compilation warning for extensions From: bukka@php.net (Jakub Zelenka) --047d7bdc90be28674304e7d2cc9a Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable > > -PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper > (const char *path, char **path_for_open, int options TSRMLS_DC); > > +PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper > (const char *path, const char **path_for_open, int options TSRMLS_DC); > > While is absolutly safe (and often useful) to switch from (char *) to > (const char *), it is not with (char **) > > No compatibility in ever way. > ... expected =91const char **=92 but argument is of type =91char **=92 ..= . > ... expected =91char **=92 but argument is of type =91const char **=92 ..= . > > So I agree, this one could probably be reverted. > > As I found awful having to see more code like this (ex from twig) > > #if PHP_API_VERSION >=3D 20100412 > zend_get_object_classname(object, (const char **) &class_name, > &class_name_len TSRMLS_CC); > #else > zend_get_object_classname(object, &class_name, &class_name_len > TSRMLS_CC); > #endif > return class_name; > } > > Yeah, this is just for (char **) -> (const char **) I found this in php_stream_locate_url_wrapper. I think that this should be changed to PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper (const char *path, char **path_for_open, int options TSRMLS_DC); There is a similar change for php_glob_stream_path_split but it doesn't have any influence on extensions as it is a static function. Sorry about the zpp comment. It really didn't make any sense! :) Jakub --047d7bdc90be28674304e7d2cc9a--