Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68333 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55805 invoked from network); 29 Jul 2013 14:36:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jul 2013 14:36:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.53 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.212.53 mail-vb0-f53.google.com Received: from [209.85.212.53] ([209.85.212.53:33937] helo=mail-vb0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AF/02-34264-4DD76F15 for ; Mon, 29 Jul 2013 10:36:05 -0400 Received: by mail-vb0-f53.google.com with SMTP id i3so582865vbh.26 for ; Mon, 29 Jul 2013 07:36:02 -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:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=VOQnUxuHdhAgoVeVHNhqND0z4lIkBkw2IynbPNQvBKA=; b=Ax26gHpbPuvPAdAPMRk/VKnkSdQ0h/yLyA3loGT2kE39HlBPFZnBkQGQgybX/a169N g4e80pGJStTdI4QMCXcBz8kM8GW1xo/VZVhYNUlXayykL1mfy4iGpo1l08Rf5Fa8H75X DH0qKbKBqfKO2QXdep1YDIM38Po+gyH6+GSJJr21A0WG6O/Brqi3c6ijEbyqx+m+UL0A mXSX4iuNCMJOyCJEiTLQd6itFuTvWu2M47MLG4SYMdATyj7P33oBMYGt+WS3KF4KGB91 gLP8+GQ+xkS/XpkaC8gZvGoBO58WG2INA6P7yz8FSc2Ec0FeeUClz+4WthlWTPfDE9p0 IqDA== X-Received: by 10.52.163.165 with SMTP id yj5mr11850255vdb.104.1375108562381; Mon, 29 Jul 2013 07:36:02 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.220.142.12 with HTTP; Mon, 29 Jul 2013 07:35:22 -0700 (PDT) In-Reply-To: <51F63D70.70200@hristov.com> References: <51F63D70.70200@hristov.com> Date: Mon, 29 Jul 2013 16:35:22 +0200 X-Google-Sender-Auth: yuGC3obGJHFwP2o9Y-uSqkE9NnY Message-ID: To: Andrey Hristov Cc: PHP internals list Content-Type: multipart/alternative; boundary=001a11c25004638bfe04e2a769f1 Subject: Re: [PHP-DEV] [PATCH] Constification of some PHP API calls From: jpauli@php.net (Julien Pauli) --001a11c25004638bfe04e2a769f1 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Jul 29, 2013 at 12:01 PM, 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? > I'm +1. About strings sizes from int to size_t , you perhaps could sync with Anthony who worked hard recently on such changes, especially regarding zval string type. Julien.Pauli --001a11c25004638bfe04e2a769f1--