From b83f5f252b2f2db096b15acae5ed4992f4354196 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Fri, 4 Oct 2019 00:36:01 +0300 Subject: [PATCH 1/9] Bump version --- Library/Zephir.php | 2 +- appveyor.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Zephir.php b/Library/Zephir.php index 92651b8e98..185019d93d 100644 --- a/Library/Zephir.php +++ b/Library/Zephir.php @@ -16,7 +16,7 @@ */ final class Zephir { - const VERSION = '0.12.6-$Id$'; + const VERSION = '0.12.7-$Id$'; const LOGO = <<<'ASCII' _____ __ _ diff --git a/appveyor.yml b/appveyor.yml index 839f41ab4a..61e01424b7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 0.12.6-{build} +version: 0.12.7-{build} environment: matrix: From df7572c6ad3227baf5b7497f0d85331923fc2b2a Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Fri, 4 Oct 2019 00:39:40 +0300 Subject: [PATCH 2/9] More safe ZEPHIR_USE_PHP_JSON & ZEPHIR_USE_PHP_PCRE check --- kernels/ZendEngine3/fcall.c | 27 +++++++++------------------ kernels/ZendEngine3/fcall.h | 27 +++++++++------------------ kernels/ZendEngine3/memory.c | 27 +++++++++------------------ kernels/ZendEngine3/memory.h | 27 +++++++++------------------ kernels/ZendEngine3/object.h | 27 +++++++++------------------ kernels/ZendEngine3/string.c | 8 ++++---- kernels/ZendEngine3/string.h | 27 +++++++++------------------ 7 files changed, 58 insertions(+), 112 deletions(-) diff --git a/kernels/ZendEngine3/fcall.c b/kernels/ZendEngine3/fcall.c index 2b338289ea..55712a2860 100644 --- a/kernels/ZendEngine3/fcall.c +++ b/kernels/ZendEngine3/fcall.c @@ -1,22 +1,13 @@ - /* - +------------------------------------------------------------------------+ - | Zephir Language | - +------------------------------------------------------------------------+ - | Copyright (c) 2011-2017 Zephir Team (https://www.zephir-lang.com) | - +------------------------------------------------------------------------+ - | This source file is subject to the New BSD License that is bundled | - | with this package in the file docs/LICENSE.txt. | - | | - | If you did not receive a copy of the license and are unable to | - | obtain it through the world-wide-web, please send an email | - | to license@zephir-lang.com so we can send you a copy immediately. | - +------------------------------------------------------------------------+ - | Authors: Andres Gutierrez | - | Eduar Carvajal | - | Vladimir Kolesnikov | - +------------------------------------------------------------------------+ -*/ + * This file is part of the Zephir. + * + * (c) Zephir Team + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. If you did not receive + * a copy of the license it is available through the world-wide-web at the + * following url: https://docs.zephir-lang.com/en/latest/license + */ #include #include "php_ext.h" diff --git a/kernels/ZendEngine3/fcall.h b/kernels/ZendEngine3/fcall.h index 2860b04052..fe2022eda4 100644 --- a/kernels/ZendEngine3/fcall.h +++ b/kernels/ZendEngine3/fcall.h @@ -1,22 +1,13 @@ - /* - +------------------------------------------------------------------------+ - | Zephir Language | - +------------------------------------------------------------------------+ - | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) | - +------------------------------------------------------------------------+ - | This source file is subject to the New BSD License that is bundled | - | with this package in the file docs/LICENSE.txt. | - | | - | If you did not receive a copy of the license and are unable to | - | obtain it through the world-wide-web, please send an email | - | to license@zephir-lang.com so we can send you a copy immediately. | - +------------------------------------------------------------------------+ - | Authors: Andres Gutierrez | - | Eduar Carvajal | - | Vladimir Kolesnikov | - +------------------------------------------------------------------------+ -*/ + * This file is part of the Zephir. + * + * (c) Zephir Team + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. If you did not receive + * a copy of the license it is available through the world-wide-web at the + * following url: https://docs.zephir-lang.com/en/latest/license + */ #ifndef ZEPHIR_KERNEL_FCALL_H #define ZEPHIR_KERNEL_FCALL_H diff --git a/kernels/ZendEngine3/memory.c b/kernels/ZendEngine3/memory.c index 3e82f7f027..722b7fbf50 100644 --- a/kernels/ZendEngine3/memory.c +++ b/kernels/ZendEngine3/memory.c @@ -1,22 +1,13 @@ - /* - +------------------------------------------------------------------------+ - | Zephir Language | - +------------------------------------------------------------------------+ - | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) | - +------------------------------------------------------------------------+ - | This source file is subject to the New BSD License that is bundled | - | with this package in the file docs/LICENSE.txt. | - | | - | If you did not receive a copy of the license and are unable to | - | obtain it through the world-wide-web, please send an email | - | to license@zephir-lang.com so we can send you a copy immediately. | - +------------------------------------------------------------------------+ - | Authors: Andres Gutierrez | - | Eduar Carvajal | - | Vladimir Kolesnikov | - +------------------------------------------------------------------------+ -*/ + * This file is part of the Zephir. + * + * (c) Zephir Team + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. If you did not receive + * a copy of the license it is available through the world-wide-web at the + * following url: https://docs.zephir-lang.com/en/latest/license + */ #include "php.h" #include "php_ext.h" diff --git a/kernels/ZendEngine3/memory.h b/kernels/ZendEngine3/memory.h index 80f850a55b..cab57fcfa7 100644 --- a/kernels/ZendEngine3/memory.h +++ b/kernels/ZendEngine3/memory.h @@ -1,22 +1,13 @@ - /* - +------------------------------------------------------------------------+ - | Zephir Language | - +------------------------------------------------------------------------+ - | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) | - +------------------------------------------------------------------------+ - | This source file is subject to the New BSD License that is bundled | - | with this package in the file docs/LICENSE.txt. | - | | - | If you did not receive a copy of the license and are unable to | - | obtain it through the world-wide-web, please send an email | - | to license@zephir-lang.com so we can send you a copy immediately. | - +------------------------------------------------------------------------+ - | Authors: Andres Gutierrez | - | Eduar Carvajal | - | Vladimir Kolesnikov | - +------------------------------------------------------------------------+ -*/ + * This file is part of the Zephir. + * + * (c) Zephir Team + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. If you did not receive + * a copy of the license it is available through the world-wide-web at the + * following url: https://docs.zephir-lang.com/en/latest/license + */ #ifndef ZEPHIR_KERNEL_MEMORY_H #define ZEPHIR_KERNEL_MEMORY_H diff --git a/kernels/ZendEngine3/object.h b/kernels/ZendEngine3/object.h index c60a60b623..c2f91d3d89 100644 --- a/kernels/ZendEngine3/object.h +++ b/kernels/ZendEngine3/object.h @@ -1,22 +1,13 @@ - /* - +------------------------------------------------------------------------+ - | Zephir Language | - +------------------------------------------------------------------------+ - | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) | - +------------------------------------------------------------------------+ - | This source file is subject to the New BSD License that is bundled | - | with this package in the file docs/LICENSE.txt. | - | | - | If you did not receive a copy of the license and are unable to | - | obtain it through the world-wide-web, please send an email | - | to license@zephir-lang.com so we can send you a copy immediately. | - +------------------------------------------------------------------------+ - | Authors: Andres Gutierrez | - | Eduar Carvajal | - | Vladimir Kolesnikov | - +------------------------------------------------------------------------+ -*/ + * This file is part of the Zephir. + * + * (c) Zephir Team + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. If you did not receive + * a copy of the license it is available through the world-wide-web at the + * following url: https://docs.zephir-lang.com/en/latest/license + */ #ifndef ZEPHIR_KERNEL_OBJECT_H #define ZEPHIR_KERNEL_OBJECT_H diff --git a/kernels/ZendEngine3/string.c b/kernels/ZendEngine3/string.c index 74fcfdcba6..b7116bbd9c 100644 --- a/kernels/ZendEngine3/string.c +++ b/kernels/ZendEngine3/string.c @@ -39,11 +39,11 @@ #include #include -#ifdef ZEPHIR_USE_PHP_PCRE +#if defined ZEPHIR_USE_PHP_PCRE && ZEPHIR_USE_PHP_PCRE #include #endif -#ifdef ZEPHIR_USE_PHP_JSON +#if defined ZEPHIR_USE_PHP_JSON && ZEPHIR_USE_PHP_JSON #include #endif @@ -1041,7 +1041,7 @@ void zephir_fast_str_replace(zval *return_value_ptr, zval *search, zval *replace } } -#ifdef ZEPHIR_USE_PHP_PCRE +#if defined ZEPHIR_USE_PHP_PCRE && ZEPHIR_USE_PHP_PCRE /** * Execute preg-match without function lookup in the PHP userland @@ -1150,7 +1150,7 @@ void zephir_preg_match(zval *return_value, zval *regex, zval *subject, zval *mat #endif /* ZEPHIR_USE_PHP_PCRE */ -#ifdef ZEPHIR_USE_PHP_JSON +#if defined ZEPHIR_USE_PHP_JSON && ZEPHIR_USE_PHP_JSON int zephir_json_encode(zval *return_value, zval *v, int opts) { diff --git a/kernels/ZendEngine3/string.h b/kernels/ZendEngine3/string.h index 5998bb2470..29513eb9ae 100644 --- a/kernels/ZendEngine3/string.h +++ b/kernels/ZendEngine3/string.h @@ -1,22 +1,13 @@ - /* - +------------------------------------------------------------------------+ - | Zephir Language | - +------------------------------------------------------------------------+ - | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) | - +------------------------------------------------------------------------+ - | This source file is subject to the New BSD License that is bundled | - | with this package in the file docs/LICENSE.txt. | - | | - | If you did not receive a copy of the license and are unable to | - | obtain it through the world-wide-web, please send an email | - | to license@zephir-lang.com so we can send you a copy immediately. | - +------------------------------------------------------------------------+ - | Authors: Andres Gutierrez | - | Eduar Carvajal | - | Vladimir Kolesnikov | - +------------------------------------------------------------------------+ -*/ + * This file is part of the Zephir. + * + * (c) Zephir Team + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. If you did not receive + * a copy of the license it is available through the world-wide-web at the + * following url: https://docs.zephir-lang.com/en/latest/license + */ #ifndef ZEPHIR_KERNEL_STRING_H #define ZEPHIR_KERNEL_STRING_H From e9a00c4f210cf2d16b738bf38ecc90cb9e596f0d Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Fri, 4 Oct 2019 00:40:28 +0300 Subject: [PATCH 3/9] Regenerate C code --- ext/kernel/fcall.c | 27 +++++++++------------------ ext/kernel/fcall.h | 27 +++++++++------------------ ext/kernel/memory.c | 27 +++++++++------------------ ext/kernel/memory.h | 27 +++++++++------------------ ext/kernel/object.h | 27 +++++++++------------------ ext/kernel/string.c | 30 ++++++++++++++---------------- ext/kernel/string.h | 27 +++++++++------------------ ext/php_test.h | 2 +- 8 files changed, 69 insertions(+), 125 deletions(-) diff --git a/ext/kernel/fcall.c b/ext/kernel/fcall.c index 2b338289ea..55712a2860 100644 --- a/ext/kernel/fcall.c +++ b/ext/kernel/fcall.c @@ -1,22 +1,13 @@ - /* - +------------------------------------------------------------------------+ - | Zephir Language | - +------------------------------------------------------------------------+ - | Copyright (c) 2011-2017 Zephir Team (https://www.zephir-lang.com) | - +------------------------------------------------------------------------+ - | This source file is subject to the New BSD License that is bundled | - | with this package in the file docs/LICENSE.txt. | - | | - | If you did not receive a copy of the license and are unable to | - | obtain it through the world-wide-web, please send an email | - | to license@zephir-lang.com so we can send you a copy immediately. | - +------------------------------------------------------------------------+ - | Authors: Andres Gutierrez | - | Eduar Carvajal | - | Vladimir Kolesnikov | - +------------------------------------------------------------------------+ -*/ + * This file is part of the Zephir. + * + * (c) Zephir Team + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. If you did not receive + * a copy of the license it is available through the world-wide-web at the + * following url: https://docs.zephir-lang.com/en/latest/license + */ #include #include "php_ext.h" diff --git a/ext/kernel/fcall.h b/ext/kernel/fcall.h index 2860b04052..fe2022eda4 100644 --- a/ext/kernel/fcall.h +++ b/ext/kernel/fcall.h @@ -1,22 +1,13 @@ - /* - +------------------------------------------------------------------------+ - | Zephir Language | - +------------------------------------------------------------------------+ - | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) | - +------------------------------------------------------------------------+ - | This source file is subject to the New BSD License that is bundled | - | with this package in the file docs/LICENSE.txt. | - | | - | If you did not receive a copy of the license and are unable to | - | obtain it through the world-wide-web, please send an email | - | to license@zephir-lang.com so we can send you a copy immediately. | - +------------------------------------------------------------------------+ - | Authors: Andres Gutierrez | - | Eduar Carvajal | - | Vladimir Kolesnikov | - +------------------------------------------------------------------------+ -*/ + * This file is part of the Zephir. + * + * (c) Zephir Team + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. If you did not receive + * a copy of the license it is available through the world-wide-web at the + * following url: https://docs.zephir-lang.com/en/latest/license + */ #ifndef ZEPHIR_KERNEL_FCALL_H #define ZEPHIR_KERNEL_FCALL_H diff --git a/ext/kernel/memory.c b/ext/kernel/memory.c index 3e82f7f027..722b7fbf50 100644 --- a/ext/kernel/memory.c +++ b/ext/kernel/memory.c @@ -1,22 +1,13 @@ - /* - +------------------------------------------------------------------------+ - | Zephir Language | - +------------------------------------------------------------------------+ - | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) | - +------------------------------------------------------------------------+ - | This source file is subject to the New BSD License that is bundled | - | with this package in the file docs/LICENSE.txt. | - | | - | If you did not receive a copy of the license and are unable to | - | obtain it through the world-wide-web, please send an email | - | to license@zephir-lang.com so we can send you a copy immediately. | - +------------------------------------------------------------------------+ - | Authors: Andres Gutierrez | - | Eduar Carvajal | - | Vladimir Kolesnikov | - +------------------------------------------------------------------------+ -*/ + * This file is part of the Zephir. + * + * (c) Zephir Team + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. If you did not receive + * a copy of the license it is available through the world-wide-web at the + * following url: https://docs.zephir-lang.com/en/latest/license + */ #include "php.h" #include "php_ext.h" diff --git a/ext/kernel/memory.h b/ext/kernel/memory.h index 80f850a55b..cab57fcfa7 100644 --- a/ext/kernel/memory.h +++ b/ext/kernel/memory.h @@ -1,22 +1,13 @@ - /* - +------------------------------------------------------------------------+ - | Zephir Language | - +------------------------------------------------------------------------+ - | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) | - +------------------------------------------------------------------------+ - | This source file is subject to the New BSD License that is bundled | - | with this package in the file docs/LICENSE.txt. | - | | - | If you did not receive a copy of the license and are unable to | - | obtain it through the world-wide-web, please send an email | - | to license@zephir-lang.com so we can send you a copy immediately. | - +------------------------------------------------------------------------+ - | Authors: Andres Gutierrez | - | Eduar Carvajal | - | Vladimir Kolesnikov | - +------------------------------------------------------------------------+ -*/ + * This file is part of the Zephir. + * + * (c) Zephir Team + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. If you did not receive + * a copy of the license it is available through the world-wide-web at the + * following url: https://docs.zephir-lang.com/en/latest/license + */ #ifndef ZEPHIR_KERNEL_MEMORY_H #define ZEPHIR_KERNEL_MEMORY_H diff --git a/ext/kernel/object.h b/ext/kernel/object.h index c60a60b623..c2f91d3d89 100644 --- a/ext/kernel/object.h +++ b/ext/kernel/object.h @@ -1,22 +1,13 @@ - /* - +------------------------------------------------------------------------+ - | Zephir Language | - +------------------------------------------------------------------------+ - | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) | - +------------------------------------------------------------------------+ - | This source file is subject to the New BSD License that is bundled | - | with this package in the file docs/LICENSE.txt. | - | | - | If you did not receive a copy of the license and are unable to | - | obtain it through the world-wide-web, please send an email | - | to license@zephir-lang.com so we can send you a copy immediately. | - +------------------------------------------------------------------------+ - | Authors: Andres Gutierrez | - | Eduar Carvajal | - | Vladimir Kolesnikov | - +------------------------------------------------------------------------+ -*/ + * This file is part of the Zephir. + * + * (c) Zephir Team + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. If you did not receive + * a copy of the license it is available through the world-wide-web at the + * following url: https://docs.zephir-lang.com/en/latest/license + */ #ifndef ZEPHIR_KERNEL_OBJECT_H #define ZEPHIR_KERNEL_OBJECT_H diff --git a/ext/kernel/string.c b/ext/kernel/string.c index 1c5f3e92d6..b7116bbd9c 100644 --- a/ext/kernel/string.c +++ b/ext/kernel/string.c @@ -39,11 +39,11 @@ #include #include -#ifdef ZEPHIR_USE_PHP_PCRE +#if defined ZEPHIR_USE_PHP_PCRE && ZEPHIR_USE_PHP_PCRE #include #endif -#ifdef ZEPHIR_USE_PHP_JSON +#if defined ZEPHIR_USE_PHP_JSON && ZEPHIR_USE_PHP_JSON #include #endif @@ -402,10 +402,8 @@ static void zephir_append_printable_zval(smart_str *implstr, zval *tmp) void zephir_append_printable_array(smart_str *implstr, const zval *value) { - - zval *tmp; - zend_array *arr; - unsigned int numelems, i = 0; + zend_array *arr; + unsigned int numelems; arr = Z_ARRVAL_P(value); numelems = zend_hash_num_elements(arr); @@ -413,6 +411,8 @@ void zephir_append_printable_array(smart_str *implstr, const zval *value) smart_str_appendc(implstr, '['); if (numelems > 0) { + zval *tmp; + unsigned int i = 0; ZEND_HASH_FOREACH_VAL(arr, tmp) { @@ -1041,7 +1041,7 @@ void zephir_fast_str_replace(zval *return_value_ptr, zval *search, zval *replace } } -#ifdef ZEPHIR_USE_PHP_PCRE +#if defined ZEPHIR_USE_PHP_PCRE && ZEPHIR_USE_PHP_PCRE /** * Execute preg-match without function lookup in the PHP userland @@ -1150,7 +1150,7 @@ void zephir_preg_match(zval *return_value, zval *regex, zval *subject, zval *mat #endif /* ZEPHIR_USE_PHP_PCRE */ -#ifdef ZEPHIR_USE_PHP_JSON +#if defined ZEPHIR_USE_PHP_JSON && ZEPHIR_USE_PHP_JSON int zephir_json_encode(zval *return_value, zval *v, int opts) { @@ -1191,7 +1191,7 @@ int zephir_json_encode(zval *return_value, zval *v, int opts) zval zopts; zval *params[2]; - ZEPHIR_INIT_VAR(&zopts); + ZEPHIR_NULL(&zopts); ZVAL_LONG(&zopts, opts); params[0] = v; @@ -1205,7 +1205,7 @@ int zephir_json_decode(zval *return_value, zval *v, zend_bool assoc) zval zassoc; zval *params[2]; - ZEPHIR_INIT_VAR(&zassoc); + ZEPHIR_NULL(&zassoc); ZVAL_BOOL(&zassoc, assoc); params[0] = v; @@ -1222,10 +1222,9 @@ void zephir_md5(zval *return_value, zval *str) unsigned char digest[16]; char hexdigest[33]; zval copy; - int use_copy = 0; if (Z_TYPE_P(str) != IS_STRING) { - use_copy = zend_make_printable_zval(str, ©); + int use_copy = zend_make_printable_zval(str, ©); if (use_copy) { str = © } @@ -1274,7 +1273,6 @@ void zephir_crc32(zval *return_value, zval *str) void zephir_ucfirst(zval *return_value, zval *s) { zval copy; - char *c; int use_copy = 0; if (UNEXPECTED(Z_TYPE_P(s) != IS_STRING)) { @@ -1286,8 +1284,8 @@ void zephir_ucfirst(zval *return_value, zval *s) if (!Z_STRLEN_P(s)) { ZVAL_EMPTY_STRING(return_value); - } - else { + } else { + char *c; ZVAL_STRINGL(return_value, Z_STRVAL_P(s), Z_STRLEN_P(s)); c = Z_STRVAL_P(return_value); *c = toupper((unsigned char)*c); @@ -1407,7 +1405,7 @@ void zephir_string_to_hex(zval *return_value, zval *var) res = zend_string_alloc(2*Z_STRLEN_P(var) + 1, 0); s = Z_STRVAL_P(var); for (i=0; ival + 2*i, "%hhX", s[i]); + sprintf(res->val + 2*i, "%hhX", (unsigned char) s[i]); } res->val[2*Z_STRLEN_P(var)] = 0; diff --git a/ext/kernel/string.h b/ext/kernel/string.h index 5998bb2470..29513eb9ae 100644 --- a/ext/kernel/string.h +++ b/ext/kernel/string.h @@ -1,22 +1,13 @@ - /* - +------------------------------------------------------------------------+ - | Zephir Language | - +------------------------------------------------------------------------+ - | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) | - +------------------------------------------------------------------------+ - | This source file is subject to the New BSD License that is bundled | - | with this package in the file docs/LICENSE.txt. | - | | - | If you did not receive a copy of the license and are unable to | - | obtain it through the world-wide-web, please send an email | - | to license@zephir-lang.com so we can send you a copy immediately. | - +------------------------------------------------------------------------+ - | Authors: Andres Gutierrez | - | Eduar Carvajal | - | Vladimir Kolesnikov | - +------------------------------------------------------------------------+ -*/ + * This file is part of the Zephir. + * + * (c) Zephir Team + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. If you did not receive + * a copy of the license it is available through the world-wide-web at the + * following url: https://docs.zephir-lang.com/en/latest/license + */ #ifndef ZEPHIR_KERNEL_STRING_H #define ZEPHIR_KERNEL_STRING_H diff --git a/ext/php_test.h b/ext/php_test.h index 2bd63c22e9..ae8a525613 100644 --- a/ext/php_test.h +++ b/ext/php_test.h @@ -14,7 +14,7 @@ #define PHP_TEST_VERSION "1.0.0" #define PHP_TEST_EXTNAME "test" #define PHP_TEST_AUTHOR "Zephir Team and contributors" -#define PHP_TEST_ZEPVERSION "0.12.6-$Id$" +#define PHP_TEST_ZEPVERSION "0.12.7-$Id$" #define PHP_TEST_DESCRIPTION "Description test for
Test Extension." typedef struct _zephir_struct_db { From 9be0236f5241b1ca94eca0280186ab107634d8b5 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Fri, 4 Oct 2019 11:18:22 +0300 Subject: [PATCH 4/9] Fixed regression with zephir_preg_match Closes: https://github.com/phalcon/zephir/issues/1944 Fixes: https://github.com/phalcon/zephir/issues/1940 Refs: - https://github.com/phalcon/zephir/commit/0922dad6ef9c8178644f78fe15b0137baf74d25b --- CHANGELOG.md | 6 +++++- kernels/ZendEngine3/string.c | 30 +++++++++++------------------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7177690114..9c7ec589bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Fixed +- Fixed regression introduced in `0.12.5` for those users who doesn't use + bundled `ext/pcre/php_pcre.h` [#1944](https://github.com/phalcon/zephir/issues/1944) + ## [0.12.6] - 2019-10-03 ### Fixed - Fixed regression introduced in `0.12.5` for those users who doesn't use - bundled `ext/json/php_json.h` [#1940](https://github.com/phalcon/zephir/issues/1940) + bundled `ext/json/php_json.h` [#1940](https://github.com/phalcon/zephir/issues/1940) ## [0.12.5] - 2019-10-02 ### Changed diff --git a/kernels/ZendEngine3/string.c b/kernels/ZendEngine3/string.c index b7116bbd9c..69c5963643 100644 --- a/kernels/ZendEngine3/string.c +++ b/kernels/ZendEngine3/string.c @@ -1,21 +1,13 @@ /* - +------------------------------------------------------------------------+ - | Zephir Language | - +------------------------------------------------------------------------+ - | Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) | - +------------------------------------------------------------------------+ - | This source file is subject to the New BSD License that is bundled | - | with this package in the file docs/LICENSE.txt. | - | | - | If you did not receive a copy of the license and are unable to | - | obtain it through the world-wide-web, please send an email | - | to license@zephir-lang.com so we can send you a copy immediately. | - +------------------------------------------------------------------------+ - | Authors: Andres Gutierrez | - | Eduar Carvajal | - | Vladimir Kolesnikov | - +------------------------------------------------------------------------+ -*/ + * This file is part of the Zephir. + * + * (c) Zephir Team + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. If you did not receive + * a copy of the license it is available through the world-wide-web at the + * following url: https://docs.zephir-lang.com/en/latest/license + */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1114,8 +1106,8 @@ void zephir_preg_match(zval *return_value, zval *regex, zval *subject, zval *mat zval rv, tmp_matches; zval *rvp = return_value ? return_value : &rv; - ZEPHIR_INIT_VAR(&tmp_flags); - ZEPHIR_INIT_VAR(&tmp_offset); + ZEPHIR_NULL(&tmp_flags); + ZEPHIR_NULL(&tmp_offset); ZVAL_LONG(&tmp_flags, flags); ZVAL_LONG(&tmp_offset, offset); From 0abcf359792240e5edbfcf46444b84cbf1f0f5e9 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Fri, 4 Oct 2019 11:52:24 +0300 Subject: [PATCH 5/9] Update change log --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c7ec589bd..b4a55bf9af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] ### Fixed - Fixed regression introduced in `0.12.5` for those users who doesn't use - bundled `ext/pcre/php_pcre.h` [#1944](https://github.com/phalcon/zephir/issues/1944) + bundled `ext/pcre/php_pcre.h` + [#1944](https://github.com/phalcon/zephir/issues/1944) + [#1940](https://github.com/phalcon/zephir/issues/1940) ## [0.12.6] - 2019-10-03 ### Fixed From 312b0c836dad9e0b03f3725efbd0a1bd603fafde Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Fri, 4 Oct 2019 11:56:06 +0300 Subject: [PATCH 6/9] Fixed sitemap API generator --- CHANGELOG.md | 1 + templates/Api/sitemap.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4a55bf9af..d6c8b0a43e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). bundled `ext/pcre/php_pcre.h` [#1944](https://github.com/phalcon/zephir/issues/1944) [#1940](https://github.com/phalcon/zephir/issues/1940) +- Fixed sitemap API generator [#1940](https://github.com/phalcon/zephir/issues/1940) ## [0.12.6] - 2019-10-03 ### Fixed diff --git a/templates/Api/sitemap.php b/templates/Api/sitemap.php index 7263e7a251..6d943def7d 100644 --- a/templates/Api/sitemap.php +++ b/templates/Api/sitemap.php @@ -1,4 +1,4 @@ - +' ?> From 98c5a73576e06c73886b7a4eb2bc69dfeafb3840 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Fri, 4 Oct 2019 12:11:36 +0300 Subject: [PATCH 7/9] Update editor config --- .editorconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/.editorconfig b/.editorconfig index 3ca35c6d40..3f7a94244a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -19,9 +19,6 @@ tab_width = 4 indent_style = tab tab_width = 4 -[*.md] -trim_trailing_whitespace = false - [*.{yml,m4,json,xml,sh}] indent_size = 2 From 2bf315db0eeeaf361dbf5173419798f7d1bd84e7 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Fri, 4 Oct 2019 13:24:53 +0300 Subject: [PATCH 8/9] Update change log --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6c8b0a43e..34ed44d9f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## [0.12.7] - 2019-10-03 ### Fixed - Fixed regression introduced in `0.12.5` for those users who doesn't use bundled `ext/pcre/php_pcre.h` @@ -254,7 +255,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fixed casting resource to int (only ZendEngine 3) [#1524](https://github.com/phalcon/zephir/issues/1524) -[Unreleased]: https://github.com/phalcon/zephir/compare/0.12.6...HEAD +[Unreleased]: https://github.com/phalcon/zephir/compare/0.12.7...HEAD +[0.12.7]: https://github.com/phalcon/zephir/compare/0.12.6...0.12.7 [0.12.6]: https://github.com/phalcon/zephir/compare/0.12.5...0.12.6 [0.12.5]: https://github.com/phalcon/zephir/compare/0.12.4...0.12.5 [0.12.4]: https://github.com/phalcon/zephir/compare/0.12.3...0.12.4 From b3277c53fc459d052da28e44ffd3c6955efe804c Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Fri, 4 Oct 2019 13:25:14 +0300 Subject: [PATCH 9/9] Fixed code style --- templates/Api/sitemap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/Api/sitemap.php b/templates/Api/sitemap.php index 6d943def7d..3965f89bb7 100644 --- a/templates/Api/sitemap.php +++ b/templates/Api/sitemap.php @@ -1,4 +1,4 @@ -' ?> +'; ?>