Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71100 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22190 invoked from network); 12 Jan 2014 20:40:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jan 2014 20:40:39 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.215.10 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.215.10 mail.experimentalworks.net Received: from [217.114.215.10] ([217.114.215.10:53747] helo=mail.experimentalworks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0B/A1-13233-4CDF2D25 for ; Sun, 12 Jan 2014 15:40:36 -0500 Received: from [192.168.2.20] (ppp-93-104-8-77.dynamic.mnet-online.de [93.104.8.77]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: johannes@schlueters.de) by mail.experimentalworks.net (Postfix) with ESMTPSA id 2534642BDA; Sun, 12 Jan 2014 21:41:06 +0100 (CET) To: Stefan Neufeind Cc: php-dev In-Reply-To: <52D19850.1090104@php.net> References: <52D19850.1090104@php.net> Content-Type: text/plain; charset="UTF-8" Date: Sun, 12 Jan 2014 21:40:32 +0100 Message-ID: <1389559232.3439.13.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Suggestion: Add optional suffix to tempnam() From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Sat, 2014-01-11 at 20:15 +0100, Stefan Neufeind wrote: > -static int php_do_open_temporary_file(const char *path, const char *pfx, char **opened_path_p TSRMLS_DC) > +static int php_do_open_temporary_file(const char *path, const char *pfx, char **opened_path_p TSRMLS_DC, const char *suffix) TSRM should be the last parameter, move your new one in front of it. > -PHPAPI int php_open_temporary_fd_ex(const char *dir, const char *pfx, char **opened_path_p, zend_bool open_basedir_check TSRMLS_DC) > +PHPAPI int php_open_temporary_fd_ex(const char *dir, const char *pfx, char **opened_path_p, zend_bool open_basedir_check TSRMLS_DC, const char *suffix) > -PHPAPI int php_open_temporary_fd(const char *dir, const char *pfx, char **opened_path_p TSRMLS_DC) > +PHPAPI int php_open_temporary_fd(const char *dir, const char *pfx, char **opened_path_p TSRMLS_DC, const char *suffix) > -PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, char **opened_path_p TSRMLS_DC) > +PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, char **opened_path_p TSRMLS_DC, const char *suffix) [...] These are API changes so it could only be in 5.6.0. Eventually it might be added if instead of changing APIs new functions might be introduced and the old ones call the new ones. (also TSRM should be last last there, too) Aside for that: A test would be good. For not loosing it either create a feature request at bugs.php.net or pull request at github. johannes