summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-pcs.spec13
-rw-r--r--zend_resource.h152
3 files changed, 7 insertions, 160 deletions
diff --git a/REFLECTION b/REFLECTION
index 0ed1983..bb9f80e 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #110 pcs version 1.3.2 ] {
+Extension [ <persistent> extension #110 pcs version 1.3.3 ] {
- Dependencies {
Dependency [ tokenizer (Required) ]
diff --git a/php-pecl-pcs.spec b/php-pecl-pcs.spec
index ae98e26..4f35c06 100644
--- a/php-pecl-pcs.spec
+++ b/php-pecl-pcs.spec
@@ -23,16 +23,13 @@
Summary: PHP Code Service
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 1.3.2
+Version: 1.3.3
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-# https://github.com/flaupretre/pecl-pcs/issues/8
-Source1: https://raw.githubusercontent.com/flaupretre/pecl-pcs/%{version}/pecl-compat/src/zend_resource.h
-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: %{?scl_prefix}php-devel > 5.3
BuildRequires: %{?scl_prefix}php-pear
@@ -108,9 +105,8 @@ These are the files needed to compile programs using PCS.
mv %{pecl_name}-%{version} NTS
%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
-
cd NTS
-cp %{SOURCE1} pecl-compat/src/zend_resource.h
+%{?_licensedir:cp pecl-compat/LICENSE LICENSE_pecl_compat}
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_PCS_VERSION/{s/.* "//;s/".*$//;p}' php_pcs.h)
@@ -250,7 +246,7 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license NTS/LICENSE*}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -274,6 +270,9 @@ rm -rf %{buildroot}
%changelog
+* Fri Jan 20 2017 Remi Collet <remi@fedoraproject.org> - 1.3.3-1
+- Update to 1.3.3 (rc)
+
* Thu Jan 19 2017 Remi Collet <remi@fedoraproject.org> - 1.3.2-1
- Update to 1.3.2 (beta)
- open https://github.com/flaupretre/pecl-pcs/issues/8 missing file
diff --git a/zend_resource.h b/zend_resource.h
deleted file mode 100644
index 65a0e1d..0000000
--- a/zend_resource.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | Compatibility macros for different PHP versions |
- +----------------------------------------------------------------------+
- | Copyright (c) 2016 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: Adam Harvey <aharvey@php.net> |
- +----------------------------------------------------------------------+
-*/
-
-#ifndef _COMPAT_ZEND_RESOURCE_H
-#define _COMPAT_ZEND_RESOURCE_H
-
-/*
- * The PHP 5 and PHP 7 resource APIs use the same function names for mutually
- * incompatible functions, which is unfortunate. A simple version of the PHP 5
- * macro API can be implemented on top of the PHP 7 API, but not vice versa
- * (since, for example, zend_register_resource() in PHP 5 also sets the zval,
- * which is a separate action in PHP 7).
- *
- * Instead of using preprocessor trickery to try to mangle things into a sane
- * API, I've implemented a minimal API that supports basic resource handling
- * and delegates appropriately on both versions.
- *
- * Destructors should be registered using the normal
- * zend_register_list_destructors() or zend_register_list_destructors_ex()
- * functions. The destructor function should take a "zend_resource *" (there is
- * an appropriate typedef in the PHP 5 section to make this work); as only a
- * subset of fields are available across PHP versions, this should be treated
- * as this struct in effect:
- *
- * typedef struct {
- * void *ptr;
- * int type;
- * } zend_resource;
- *
- * Accessing other fields will likely result in compilation errors and/or
- * segfaults.
- */
-
-#include "zend_list.h"
-
-/**
- * Deletes the resource.
- *
- * On PHP 5, this is equivalent to zend_list_delete(Z_LVAL_P(zv)).
- * On PHP 7, this is equivalent to zend_list_close(Z_RES_P(zv)).
- *
- * @param zv The IS_RESOURCE zval to delete.
- */
-static zend_always_inline void compat_zend_delete_resource(const zval *zv TSRMLS_DC);
-
-/**
- * Fetches the resource.
- *
- * This API does not support the default ID that's possible with the PHP 5
- * zend_fetch_resource() API, and will always set that value to -1.
- *
- * @param zv The IS_RESOURCE zval to fetch.
- * @param rsrc_type_name The type name to use in error messages.
- * @param rsrc_type The resource type ID.
- * @return A void pointer to the resource, which needs to be typecast, or NULL
- * on error.
- */
-static zend_always_inline void *compat_zend_fetch_resource(zval *zv, const char *rsrc_type_name, int rsrc_type TSRMLS_DC);
-
-/**
- * Registers a new resource.
- *
- * @param zv The zval to set to IS_RESOURCE with the new resource value.
- * @param ptr A void pointer to the resource.
- * @param rsrc_type The resource type ID.
- */
-static zend_always_inline void compat_zend_register_resource(zval *zv, void *ptr, int rsrc_type TSRMLS_DC);
-
-#ifdef PHP_7
-/*============================================================================*/
-
-static zend_always_inline void compat_zend_delete_resource(const zval *zv TSRMLS_DC)
-{
- if (IS_RESOURCE != Z_TYPE_P(zv)) {
- return;
- }
-
- zend_list_close(Z_RES_P(zv));
-}
-
-/*---------*/
-
-static zend_always_inline void *compat_zend_fetch_resource(zval *zv, const char *rsrc_type_name, int rsrc_type TSRMLS_DC)
-{
- if (IS_RESOURCE != Z_TYPE_P(zv)) {
- return NULL;
- }
-
- return zend_fetch_resource(Z_RES_P(zv), rsrc_type_name, rsrc_type);
-}
-
-/*---------*/
-
-static zend_always_inline void compat_zend_register_resource(zval *zv, void *ptr, int rsrc_type TSRMLS_DC)
-{
- ZVAL_RES(zv, zend_register_resource(ptr, rsrc_type));
-}
-
-#else
-/*== PHP 5 ===================================================================*/
-
-/* Used for destructors. */
-typedef zend_rsrc_list_entry zend_resource;
-
-/*---------*/
-
-static zend_always_inline void compat_zend_delete_resource(const zval *zv TSRMLS_DC)
-{
- if (IS_RESOURCE != Z_TYPE_P(zv)) {
- return;
- }
-
- zend_list_delete(Z_LVAL_P(zv));
-}
-
-/*---------*/
-
-static zend_always_inline void *compat_zend_fetch_resource(zval *zv, const char *rsrc_type_name, int rsrc_type TSRMLS_DC)
-{
-#if ZEND_MODULE_API_NO >= 20100412
- return zend_fetch_resource(&zv TSRMLS_CC, -1, rsrc_type_name, NULL, 1, rsrc_type);
-#else
- return zend_fetch_resource(&zv TSRMLS_CC, -1, (char *)rsrc_type_name, NULL, 1, rsrc_type);
-#endif
-}
-
-/*---------*/
-
-static zend_always_inline void compat_zend_register_resource(zval *zv, void *ptr, int rsrc_type TSRMLS_DC)
-{
- ZEND_REGISTER_RESOURCE(zv, ptr, rsrc_type);
-}
-
-#endif /* PHP_7 */
-/*============================================================================*/
-
-#endif /* _COMPAT_ZEND_RESOURCE_H */