Backport a patch to support fixed-size array as return-value
https://bugzilla.redhat.com/show_bug.cgi?id=1398738
This commit is contained in:
parent
f39ad1bd0b
commit
c5e83e8971
@ -0,0 +1,33 @@
|
|||||||
|
From 7e76f75e42e7ac45c896e81e97955c8b2089d7e9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Rico Tzschichholz <ricotz@ubuntu.com>
|
||||||
|
Date: Thu, 24 Nov 2016 09:23:40 +0100
|
||||||
|
Subject: [PATCH] girparser: No support for fixed-size array as return-value
|
||||||
|
|
||||||
|
Due to the special syntax for those arrays it lead to omitting the
|
||||||
|
array-qualifier and therefore generating broken bindings.
|
||||||
|
---
|
||||||
|
vala/valagirparser.vala | 8 ++++++++
|
||||||
|
1 file changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
|
||||||
|
index d05d08a..b0ae2b0 100644
|
||||||
|
--- a/vala/valagirparser.vala
|
||||||
|
+++ b/vala/valagirparser.vala
|
||||||
|
@@ -2387,6 +2387,14 @@ public class Vala.GirParser : CodeVisitor {
|
||||||
|
type.nullable = true;
|
||||||
|
}
|
||||||
|
type = element_get_type (type, true, ref no_array_length, ref array_null_terminated);
|
||||||
|
+
|
||||||
|
+ // FIXME No support for fixed-size array as return-value
|
||||||
|
+ var array_type = type as ArrayType;
|
||||||
|
+ if (array_type != null && array_type.fixed_length) {
|
||||||
|
+ array_type.fixed_length = false;
|
||||||
|
+ array_type.length = null;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
end_element ("return-value");
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.9.3
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: vala
|
Name: vala
|
||||||
Version: 0.34.3
|
Version: 0.34.3
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: A modern programming language for GNOME
|
Summary: A modern programming language for GNOME
|
||||||
|
|
||||||
# Most files are LGPLv2.1+, curses.vapi is 2-clause BSD
|
# Most files are LGPLv2.1+, curses.vapi is 2-clause BSD
|
||||||
@ -12,6 +12,8 @@ URL: https://wiki.gnome.org/Projects/Vala
|
|||||||
Source0: https://download.gnome.org/sources/vala/0.34/vala-%{version}.tar.xz
|
Source0: https://download.gnome.org/sources/vala/0.34/vala-%{version}.tar.xz
|
||||||
# https://bugzilla.gnome.org/show_bug.cgi?id=775446
|
# https://bugzilla.gnome.org/show_bug.cgi?id=775446
|
||||||
Patch0: 0001-codegen-Add-function-prototypes-for-all-register-typ.patch
|
Patch0: 0001-codegen-Add-function-prototypes-for-all-register-typ.patch
|
||||||
|
# Backported from upstream
|
||||||
|
Patch1: 0001-girparser-No-support-for-fixed-size-array-as-return-.patch
|
||||||
|
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
@ -89,6 +91,7 @@ This package contains documentation in a devhelp HTML book.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -184,6 +187,9 @@ done
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Dec 02 2016 Kalev Lember <klember@redhat.com> - 0.34.3-3
|
||||||
|
- Backport a patch to support fixed-size array as return-value (#1398738)
|
||||||
|
|
||||||
* Thu Dec 01 2016 Kalev Lember <klember@redhat.com> - 0.34.3-2
|
* Thu Dec 01 2016 Kalev Lember <klember@redhat.com> - 0.34.3-2
|
||||||
- codegen: Add function-prototypes for all register-type calls
|
- codegen: Add function-prototypes for all register-type calls
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user