Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68349 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39290 invoked from network); 31 Jul 2013 14:56:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jul 2013 14:56:22 -0000 Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.160.42 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.160.42 mail-pb0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:61281] helo=mail-pb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0C/14-07795-49529F15 for ; Wed, 31 Jul 2013 10:56:21 -0400 Received: by mail-pb0-f42.google.com with SMTP id un15so328777pbc.15 for ; Wed, 31 Jul 2013 07:56:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=fwQDsxtqKlU+OHmae7A+E9Ni2ASQAF8/hGTyBvXHt4o=; b=fO7x85atqjFhbdDaI+l44pne/fdFQwd6sU8nceUp/gBZcZjGePgxV08iiClJzukEV0 oag0nghT/SEeQglRgz/co6Cvnz6SgGdvfmaZRHWItp5BXQezny/Nliv4jXDtoZt58QhN qvvpOm0wlsl8BD6Cn4e3+9tMYjG4JfHaGg5rKBJGy7DdDLlLMIfqQWB6m3sC98Gh2z41 mbyu0uuJSIASd2kVepP/x8SnIYfJHbQutiw9zCuoyt7YtK8ExkmX3Ia+dKphlxPuDUxX YBj85dPaJRxvTuUaPIEFCCtWJ6vynb/myBjq83Wv/9micS23HMtmZjNvTkYsnoAPiPOE KPGA== MIME-Version: 1.0 X-Received: by 10.66.118.163 with SMTP id kn3mr82486071pab.165.1375282577805; Wed, 31 Jul 2013 07:56:17 -0700 (PDT) Sender: php@golemon.com Received: by 10.70.128.71 with HTTP; Wed, 31 Jul 2013 07:56:17 -0700 (PDT) X-Originating-IP: [173.252.71.189] In-Reply-To: <51F8CC39.5080600@hristov.com> References: <51F63D70.70200@hristov.com> <51F8CC39.5080600@hristov.com> Date: Wed, 31 Jul 2013 07:56:17 -0700 X-Google-Sender-Auth: i8F5-oOu4b8mnkgVZwx5Ef1cHhI Message-ID: To: Andrey Hristov Cc: PHP internals list Content-Type: multipart/alternative; boundary=e89a8ffbab7584238604e2cfede8 X-Gm-Message-State: ALoCoQmCuyCB7m8eIIVYEcsdu1GcQmagTRcUWmeiyQLh2rMod619OiuXDwpq2jLM4MrJwlR8hGfQ Subject: Re: [PHP-DEV] [PATCH] Constification of some PHP API calls From: pollita@php.net (Sara Golemon) --e89a8ffbab7584238604e2cfede8 Content-Type: text/plain; charset=ISO-8859-1 Ah, yeah, I can see that clearly now. Looks universally cool to me. Do you just need someone with engine karma to push it? On Wed, Jul 31, 2013 at 1:35 AM, Andrey Hristov wrote: > Hi Sara, > > On 07/31/2013 12:55 AM, Sara Golemon wrote: > >> At a glance, this looks awesome. There are a few changes where you >> introduced #ifdef WIN32 checks that I want to spend a little more time >> looking at... >> > > In the WIN32 code there was an additional variable, declared always, but > switched from 0 to 1 only in under WIN32. It is a path, that is copied and > the copy is assigned to the parameter. I have simplified the logic for all > platforms by putting more WIN32 conditionals. > > > > -Sara >> >> P.S. - Could I convince you to put it on a github fork to make it easier >> to read? No big deal if not... I just like that web view. :) >> > > I have already done that : > https://github.com/**andreyhristov/php-src > > I have filled a pull request too. > > Best, > Andrey > > >> On Mon, Jul 29, 2013 at 3:01 AM, Andrey Hristov > > wrote: >> >> Hi, >> after experiencing again warnings about conversion from const char * >> to char * when calling some PHP API functions I decided to spend >> some time and constify a few of these. The result is a patch that >> constifies the Streams API, and few functions in Zend and TSRM (to >> which I have no karma). Most of the changes are conversion of "char >> *" to "const char *" parameters, where applicable. In a few places >> string lengths are changed from int to size_t. Few functions return >> now "const char *" instead of "char *" (the caller did not >> modify/release these before). >> >> The patch is against php-src because it changes API which can be >> only done in a new version. >> >> Opinions? >> >> Best, >> Andrey >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> >> > --e89a8ffbab7584238604e2cfede8--