[libglib-object-introspection-perl] 02/03: New patch (0001-Fix-return-value-handling-on-big-endian-architecture.patch) proposed by upstream to fix the test suite on 32-bit big-endian architectures.
Intrigeri
intrigeri at moszumanska.debian.org
Sun Mar 23 09:26:25 UTC 2014
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to branch master
in repository libglib-object-introspection-perl.
commit 580d252ad4517e5fe41977cb044c4bd72d47b873
Author: intrigeri <intrigeri at boum.org>
Date: Sun Mar 23 09:22:08 2014 +0000
New patch (0001-Fix-return-value-handling-on-big-endian-architecture.patch) proposed by upstream to fix the test suite on 32-bit big-endian architectures.
The patch was downloaded from
https://rt.cpan.org/Ticket/Attachment/1324475/702426/0001-Fix-return-value-handling-on-big-endian-architecture.patch
---
...value-handling-on-big-endian-architecture.patch | 84 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 85 insertions(+)
diff --git a/debian/patches/0001-Fix-return-value-handling-on-big-endian-architecture.patch b/debian/patches/0001-Fix-return-value-handling-on-big-endian-architecture.patch
new file mode 100644
index 0000000..99c2243
--- /dev/null
+++ b/debian/patches/0001-Fix-return-value-handling-on-big-endian-architecture.patch
@@ -0,0 +1,84 @@
+From 5a347de490cf8ee3136ad21aef0ecfc233aefedc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Torsten=20Sch=C3=B6nfeld?= <kaffeetisch at gmx.de>
+Date: Wed, 22 Jan 2014 23:14:07 +0100
+Subject: [PATCH] Fix return value handling on big-endian architectures
+
+https://rt.cpan.org/Ticket/Display.html?id=89552
+---
+ gperl-i11n-invoke-c.c | 31 +++++++++++++++++++++++++++++--
+ 1 file changed, 29 insertions(+), 2 deletions(-)
+
+diff --git a/gperl-i11n-invoke-c.c b/gperl-i11n-invoke-c.c
+index 19f6317..1b00543 100644
+--- a/gperl-i11n-invoke-c.c
++++ b/gperl-i11n-invoke-c.c
+@@ -29,6 +29,10 @@ invoke_c_code (GICallableInfo *info,
+ guint i;
+ GPerlI11nInvocationInfo iinfo = {0,};
+ guint n_return_values;
++#if GI_CHECK_VERSION (1, 32, 0)
++ GIFFIReturnValue ffi_return_value;
++#endif
++ gpointer return_value_p;
+ GIArgument return_value;
+ GError * local_error = NULL;
+ gpointer local_error_address = &local_error;
+@@ -46,6 +50,10 @@ invoke_c_code (GICallableInfo *info,
+ iinfo.args[0] = &instance;
+ }
+
++ /*
++ * --- handle arguments -----------------------------------------------
++ */
++
+ for (i = 0 ; i < iinfo.n_args ; i++) {
+ GIArgInfo * arg_info;
+ GITypeInfo * arg_type;
+@@ -172,6 +180,10 @@ invoke_c_code (GICallableInfo *info,
+ iinfo.arg_types[iinfo.n_invoke_args - 1] = &ffi_type_pointer;
+ }
+
++ /*
++ * --- prepare & call -------------------------------------------------
++ */
++
+ /* prepare and call the function */
+ if (FFI_OK != ffi_prep_cif (&cif, FFI_DEFAULT_ABI, iinfo.n_invoke_args,
+ iinfo.return_type_ffi, iinfo.arg_types))
+@@ -180,7 +192,13 @@ invoke_c_code (GICallableInfo *info,
+ ccroak ("Could not prepare a call interface");
+ }
+
+- ffi_call (&cif, func_pointer, &return_value, iinfo.args);
++#if GI_CHECK_VERSION (1, 32, 0)
++ return_value_p = &ffi_return_value;
++#else
++ return_value_p = &return_value;
++#endif
++
++ ffi_call (&cif, func_pointer, return_value_p, iinfo.args);
+
+ /* free call-scoped data */
+ _invoke_free_after_call_handlers (&iinfo);
+@@ -190,8 +208,17 @@ invoke_c_code (GICallableInfo *info,
+ }
+
+ /*
+- * handle return values
++ * --- handle return values -------------------------------------------
+ */
++
++#if GI_CHECK_VERSION (1, 32, 0)
++ /* libffi has special semantics for return value storage; see `man
++ * ffi_call`. We use gobject-introspection's extraction helper. */
++ gi_type_info_extract_ffi_return_value (iinfo.return_type_info,
++ &ffi_return_value,
++ &return_value);
++#endif
++
+ n_return_values = 0;
+
+ /* place return value and output args on the stack */
+--
+1.8.5.3
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..20e7ff3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Fix-return-value-handling-on-big-endian-architecture.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libglib-object-introspection-perl.git
More information about the Pkg-perl-cvs-commits
mailing list