New upstream development version 1.49.3
This commit is contained in:
parent
4ab8c7248f
commit
d15a8071b1
@ -1,88 +0,0 @@
|
||||
From ec27979398b0871c1a3e0e244849f8435c9c9a8d Mon Sep 17 00:00:00 2001
|
||||
From: Geoff Amey <gamey@datto.com>
|
||||
Date: Wed, 15 Jun 2022 17:06:56 -0400
|
||||
Subject: [PATCH] php: add arginfo to php bindings
|
||||
|
||||
Starting with PHP8, arginfo is mandatory for PHP extensions. This patch
|
||||
updates the generator for the PHP bindings to generate the arginfo
|
||||
structures, using the Zend API macros. Only basic arginfo is added,
|
||||
without full documentation of argument and return types, in order to
|
||||
ensure compatibility with as many versions of PHP as possible.
|
||||
---
|
||||
.gitignore | 1 +
|
||||
generator/php.ml | 37 ++++++++++++++++++++++++++++++++++---
|
||||
2 files changed, 35 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index a36ccc86af..356c01fbd1 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -325,6 +325,7 @@ Makefile.in
|
||||
/php/extension/configure.in
|
||||
/php/extension/env
|
||||
/php/extension/guestfs_php.c
|
||||
+/php/extension/guestfs_php.dep
|
||||
/php/extension/install-sh
|
||||
/php/extension/libtool
|
||||
/php/extension/ltmain.sh
|
||||
diff --git a/generator/php.ml b/generator/php.ml
|
||||
index 5c7ef48e8b..acdc7b877c 100644
|
||||
--- a/generator/php.ml
|
||||
+++ b/generator/php.ml
|
||||
@@ -130,6 +130,37 @@ typedef size_t guestfs_string_length;
|
||||
typedef int guestfs_string_length;
|
||||
#endif
|
||||
|
||||
+/* Declare argument info structures */
|
||||
+ZEND_BEGIN_ARG_INFO_EX(arginfo_create, 0, 0, 0)
|
||||
+ZEND_END_ARG_INFO()
|
||||
+
|
||||
+ZEND_BEGIN_ARG_INFO_EX(arginfo_last_error, 0, 0, 1)
|
||||
+ ZEND_ARG_INFO(0, g)
|
||||
+ZEND_END_ARG_INFO()
|
||||
+
|
||||
+";
|
||||
+ List.iter (
|
||||
+ fun { name = shortname; style = ret, args, optargs; } ->
|
||||
+ let len = List.length args in
|
||||
+ pr "ZEND_BEGIN_ARG_INFO_EX(arginfo_%s, 0, 0, %d)\n" shortname (len + 1);
|
||||
+ pr " ZEND_ARG_INFO(0, g)\n";
|
||||
+ List.iter (
|
||||
+ function
|
||||
+ | BufferIn n | Bool n | Int n | Int64 n | OptString n
|
||||
+ | Pointer(_, n) | String (_, n) | StringList (_, n) ->
|
||||
+ pr " ZEND_ARG_INFO(0, %s)\n" n
|
||||
+ ) args;
|
||||
+
|
||||
+ List.iter (
|
||||
+ function
|
||||
+ | OBool n | OInt n | OInt64 n | OString n | OStringList n ->
|
||||
+ pr " ZEND_ARG_INFO(0, %s)\n" n
|
||||
+ ) optargs;
|
||||
+ pr "ZEND_END_ARG_INFO()\n\n";
|
||||
+ ) (actions |> external_functions |> sort);
|
||||
+
|
||||
+ pr "
|
||||
+
|
||||
/* Convert array to list of strings.
|
||||
* http://marc.info/?l=pecl-dev&m=112205192100631&w=2
|
||||
*/
|
||||
@@ -204,12 +235,12 @@ PHP_MINIT_FUNCTION (guestfs_php)
|
||||
}
|
||||
|
||||
static zend_function_entry guestfs_php_functions[] = {
|
||||
- PHP_FE (guestfs_create, NULL)
|
||||
- PHP_FE (guestfs_last_error, NULL)
|
||||
+ PHP_FE (guestfs_create, arginfo_create)
|
||||
+ PHP_FE (guestfs_last_error, arginfo_last_error)
|
||||
";
|
||||
|
||||
List.iter (
|
||||
- fun { name } -> pr " PHP_FE (guestfs_%s, NULL)\n" name
|
||||
+ fun { name } -> pr " PHP_FE (guestfs_%s, arginfo_%s)\n" name name
|
||||
) (actions |> external_functions |> sort);
|
||||
|
||||
pr " { NULL, NULL, NULL }
|
||||
--
|
||||
2.35.1
|
||||
|
@ -47,8 +47,8 @@
|
||||
Summary: Access and modify virtual machine disk images
|
||||
Name: libguestfs
|
||||
Epoch: 1
|
||||
Version: 1.49.2
|
||||
Release: 7%{?dist}
|
||||
Version: 1.49.3
|
||||
Release: 1%{?dist}
|
||||
License: LGPLv2+
|
||||
|
||||
# Build only for architectures that have a kernel
|
||||
@ -86,9 +86,6 @@ Source8: copy-patches.sh
|
||||
BuildRequires: autoconf, automake, libtool, gettext-devel
|
||||
%endif
|
||||
|
||||
# Fix PHP bindings.
|
||||
Patch1: 0001-php-add-arginfo-to-php-bindings.patch
|
||||
|
||||
# Basic build requirements.
|
||||
BuildRequires: gcc, gcc-c++
|
||||
BuildRequires: make
|
||||
@ -1118,6 +1115,9 @@ rm ocaml/html/.gitignore
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jul 01 2022 Richard W.M. Jones <rjones@redhat.com> - 1:1.49.3-1
|
||||
- New upstream development version 1.49.3
|
||||
|
||||
* Mon Jun 20 2022 Python Maint <python-maint@redhat.com> - 1:1.49.2-7
|
||||
- Rebuilt for Python 3.11
|
||||
|
||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (libguestfs-1.49.2.tar.gz) = e9c82076948567bbf4a2b6363850d259c782bf5e64fb61f92849604cbc5ef776bfb1b6686c53e8dd79ea242ad3a5cba76a753d9766ac4135661e587331c70e4a
|
||||
SHA512 (libguestfs-1.49.2.tar.gz.sig) = eb3a52df37d9ec57a8f54041a4dc1179c6f230cca525c942370acad53d13e113db9ec913cba85b05d26ee6d8f244dde829617be34c773072f72cbf71162704da
|
||||
SHA512 (libguestfs-1.49.3.tar.gz) = 4f58f567d207ad529483a6dfd4a594e86b0e12eda97310594e4e8b1589cc5de019592b930318eccd68a173e29fc37b56045c95cb52d8eea95a90b2f42fcc24d6
|
||||
SHA512 (libguestfs-1.49.3.tar.gz.sig) = 0af9e6c8ad410e53e44b4d72a6fbf3c0ef10df0c2925c8c228dd528e810f5112be4268702b25d7b22ae7adeac27244f2558d5b5f56b024023db689283b2d6cbe
|
||||
|
Loading…
Reference in New Issue
Block a user