]>
git.ipfire.org Git - thirdparty/vala.git/log
Rico Tzschichholz [Mon, 8 Jul 2019 17:11:19 +0000 (19:11 +0200)]
codegen: Real structs are allowed by simple generics and passed as reference
Add the required pointer-indirections to fix invalid memory accesses.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/819
Rico Tzschichholz [Fri, 5 Jul 2019 14:54:19 +0000 (16:54 +0200)]
codegen: Assign GValue result of function calls to temp-var on copy_value
Regression of
a94a28141e1f222d1da7e72bea4cd2d1e5242f41
Fixes https://gitlab.gnome.org/GNOME/vala/issues/819
Rico Tzschichholz [Thu, 13 Jun 2019 13:58:58 +0000 (15:58 +0200)]
codegen: Use array_length of collection variable instead of expression
Rico Tzschichholz [Fri, 17 May 2019 06:56:12 +0000 (08:56 +0200)]
codegen: When freeing local variables don't stop at "switch" on "continue"
So distinguish between BreakStatement and ContinueStatement to make the
correct decision in append_local_free().
Fixes https://gitlab.gnome.org/GNOME/vala/issues/799
Rico Tzschichholz [Sun, 12 May 2019 18:59:15 +0000 (20:59 +0200)]
codegen: Always use G_TYPE_CHECK_INSTANCE_TYPE for external symbols
and get_ccode_type_check_function() for SourceFileType.SOURCE symbols.
Rico Tzschichholz [Sun, 28 Apr 2019 14:41:44 +0000 (16:41 +0200)]
codegen: Make sure to call a corresponding pop_function()
Rico Tzschichholz [Sun, 28 Apr 2019 14:30:22 +0000 (16:30 +0200)]
codegen: Make sure to call a corresponding pop_line()
Rico Tzschichholz [Sun, 28 Apr 2019 14:08:34 +0000 (16:08 +0200)]
codegen: Make sure to call a corresponding pop_context()
Rico Tzschichholz [Wed, 1 May 2019 15:37:07 +0000 (17:37 +0200)]
compiler: Add OptionFlags.NO_ARG to deprecated "--thread" option
It was defined with OptionArg.NONE and never took an extra argument.
Regression of
d8e810680f370fac7e9a5e80f8d94316707625c2
Rico Tzschichholz [Tue, 23 Jul 2019 07:00:44 +0000 (09:00 +0200)]
tests: Add GMutex and GRecMutex test to increase coverage
Rico Tzschichholz [Mon, 17 Jun 2019 10:59:12 +0000 (12:59 +0200)]
tests: Null-terminate arrays for compatibility test of uint8 and uchar
Fixes https://gitlab.gnome.org/GNOME/vala/issues/809
Rico Tzschichholz [Sun, 9 Sep 2018 11:46:19 +0000 (13:46 +0200)]
tests: Check uchar[] and uint8[] compatibility
Rico Tzschichholz [Thu, 9 May 2019 16:51:43 +0000 (18:51 +0200)]
tests: Properties with NoAccessorMethod return heap-allocated structs
Rico Tzschichholz [Mon, 22 Jul 2019 07:29:37 +0000 (09:29 +0200)]
girparser: Handle "function-macro" by skipping them
See https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/159
Rico Tzschichholz [Sat, 15 Jun 2019 15:43:28 +0000 (17:43 +0200)]
girparser: Skip 'attribute' elements
Rico Tzschichholz [Tue, 7 May 2019 13:44:37 +0000 (15:44 +0200)]
girparser: Add support for string "ctype" metadata
https://gitlab.gnome.org/GNOME/vala/issues/793
Rico Tzschichholz [Fri, 3 May 2019 13:32:04 +0000 (15:32 +0200)]
girwriter: Write implicit fields for arrays and delegates
Rico Tzschichholz [Thu, 2 May 2019 16:09:19 +0000 (18:09 +0200)]
girwriter: Write implicit parameters and properties for generics
Rico Tzschichholz [Wed, 1 May 2019 10:51:45 +0000 (12:51 +0200)]
girwriter: Only replace existing GIR files if they changed
Same how it is done in CodeWriter.write_file()
Rico Tzschichholz [Sat, 27 Apr 2019 11:20:28 +0000 (13:20 +0200)]
girwriter: Populate gir_namespace/version attributes of external namespaces
Rico Tzschichholz [Mon, 29 Apr 2019 14:30:43 +0000 (16:30 +0200)]
girwriter: Don't write c:include tags for symbols from external packages
Rico Tzschichholz [Sun, 28 Apr 2019 15:52:40 +0000 (17:52 +0200)]
girwriter: Properly write attributes for non-GObject classes
Rico Tzschichholz [Sat, 27 Apr 2019 18:21:44 +0000 (20:21 +0200)]
girwriter: Don't write "property" attribute for non-gobject properties
Rico Tzschichholz [Sat, 27 Apr 2019 09:17:28 +0000 (11:17 +0200)]
girwriter: Properly resolve GLib.TypeInterface instead of hardcoding it
This makes sure to pick up the dependency on GObject-2.0.gir
Rico Tzschichholz [Sat, 27 Apr 2019 08:25:32 +0000 (10:25 +0200)]
girwriter: Mention that this file is generated and not meant to be modified
Same as already done for generated vapi files.
Rico Tzschichholz [Tue, 23 Apr 2019 07:22:40 +0000 (09:22 +0200)]
tests: More "unassigned variable" tests to increase coverage
Rico Tzschichholz [Sat, 13 Apr 2019 15:46:23 +0000 (17:46 +0200)]
tests: Extend "foreach" tests to increase coverage
Rico Tzschichholz [Sun, 14 Apr 2019 13:28:49 +0000 (15:28 +0200)]
tests: Extend "assigned local variable" control flow tests
Rico Tzschichholz [Sat, 6 Apr 2019 08:13:02 +0000 (10:13 +0200)]
tests: Extend "assigned local variable" control flow tests
Cover condition statements of WhileStatement and ConditionalExpression
Rico Tzschichholz [Thu, 11 Apr 2019 05:32:24 +0000 (07:32 +0200)]
parser: Set correct end source-reference of Block for embedded statement
Rico Tzschichholz [Wed, 10 Apr 2019 12:12:21 +0000 (14:12 +0200)]
parser: Improve source-reference of declaration block for ForStatement
Rico Tzschichholz [Wed, 10 Apr 2019 12:12:21 +0000 (14:12 +0200)]
parser: Improve source-location for local Constant declarations
Rico Tzschichholz [Wed, 10 Apr 2019 12:12:21 +0000 (14:12 +0200)]
parser: Don't include trailing semi-colon to ExpressionStatement
Rico Tzschichholz [Wed, 10 Apr 2019 12:12:21 +0000 (14:12 +0200)]
parser: Improve source-location for LocalVariable/DeclarationStatement
Rico Tzschichholz [Wed, 10 Apr 2019 12:12:21 +0000 (14:12 +0200)]
parser: Set correct end source-location for Block
This location was off by one token.
Rico Tzschichholz [Mon, 15 Apr 2019 14:29:20 +0000 (16:29 +0200)]
Release 0.36.19
Rico Tzschichholz [Mon, 8 Apr 2019 08:00:19 +0000 (10:00 +0200)]
codegen: Always assign original variable when consuming instance to destroy
Fixes https://gitlab.gnome.org/GNOME/vala/issues/781
Luca Bruno [Sat, 4 May 2013 13:35:04 +0000 (15:35 +0200)]
vala: Use global CodeContext to retrieve root_symbol
Rico Tzschichholz [Thu, 4 Apr 2019 08:45:10 +0000 (10:45 +0200)]
pango: Fix StringBuilder parameter of scan_word()
Rico Tzschichholz [Wed, 27 Mar 2019 23:02:59 +0000 (00:02 +0100)]
gstreamer-1.0: Fix TypeFind and TypeFindFactory method references
Rico Tzschichholz [Wed, 27 Mar 2019 23:02:59 +0000 (00:02 +0100)]
gobject-introspection-1.0: Fix TypeInfo and TypeTag method references
Fixes https://gitlab.gnome.org/GNOME/vala/issues/778
Rico Tzschichholz [Wed, 27 Mar 2019 23:02:59 +0000 (00:02 +0100)]
girparser: Create correct output in get_default_lower_case_suffix()
It must match the output of CCodeAttribute.get_default_lower_case_suffix()
Add metadata support to set lower_case_csuffix
See https://gitlab.gnome.org/GNOME/vala/issues/778
Rico Tzschichholz [Sun, 24 Mar 2019 17:34:29 +0000 (18:34 +0100)]
tests: Add "struct (un)boxing" variant test
Rico Tzschichholz [Mon, 25 Mar 2019 11:46:15 +0000 (12:46 +0100)]
codegen: Move implicit GValue cast for comparison to BinaryExpression
Handle "==" and "!=" only as it was done before.
This generates correct c-code for boxed simple-types and will perform
value-based comparisons.
See https://bugzilla.gnome.org/show_bug.cgi?id=585063
Rico Tzschichholz [Mon, 11 Mar 2019 09:31:10 +0000 (10:31 +0100)]
codegen: Resolve generics in sizeof-expression of parameter initializer
Rico Tzschichholz [Tue, 19 Mar 2019 08:53:45 +0000 (09:53 +0100)]
glib-2.0: Don't annotate dedicated GLib.assert_*() functions with [Assert]
Fixes https://gitlab.gnome.org/GNOME/vala/issues/769
Rico Tzschichholz [Tue, 19 Mar 2019 07:09:35 +0000 (08:09 +0100)]
vala: Variadic parameters are not supported for async methods
Rico Tzschichholz [Tue, 12 Mar 2019 09:18:03 +0000 (10:18 +0100)]
parser: Implicit creation method of abstract classes must be protected
Rico Tzschichholz [Sun, 10 Mar 2019 17:14:09 +0000 (18:14 +0100)]
vala: Allow assignment of 0U to enum types
Don't restrict unsigned 0 literal to flags-enums though.
Rico Tzschichholz [Sun, 10 Mar 2019 17:14:09 +0000 (18:14 +0100)]
ccodegen: Use unsigned default value for flags-enum
Rico Tzschichholz [Sun, 10 Mar 2019 17:14:09 +0000 (18:14 +0100)]
gsignal: Use guint to represent flags-enum in custom GMarshalFunc
Rico Tzschichholz [Sun, 10 Mar 2019 17:14:09 +0000 (18:14 +0100)]
tests: Extend "detailed signal" test to increase coverage
Rico Tzschichholz [Tue, 12 Mar 2019 09:06:11 +0000 (10:06 +0100)]
Mark defined constructors of abstract classes as protected
Rico Tzschichholz [Sun, 3 Mar 2019 19:58:50 +0000 (20:58 +0100)]
Release 0.36.18
Rico Tzschichholz [Wed, 27 Feb 2019 14:45:13 +0000 (15:45 +0100)]
girwriter: Always use get_gir_name() for TypeSymbols
Rico Tzschichholz [Tue, 26 Feb 2019 21:45:02 +0000 (22:45 +0100)]
poppler-glib: Update to 0.74
Rico Tzschichholz [Tue, 26 Feb 2019 13:10:35 +0000 (14:10 +0100)]
girwriter: Support transfer-ownership="container" for arrays
Rico Tzschichholz [Mon, 25 Feb 2019 08:58:11 +0000 (09:58 +0100)]
gobject-2.0: Add SignalHandler.disconnect_by_data()
Rico Tzschichholz [Sun, 24 Feb 2019 20:44:48 +0000 (21:44 +0100)]
codegen: Respect array_length_cname attribute for global fields
Rico Tzschichholz [Thu, 21 Feb 2019 07:04:03 +0000 (08:04 +0100)]
tests: Add regression test for modulo operation on double and float
https://bugzilla.gnome.org/show_bug.cgi?id=610660
Rico Tzschichholz [Wed, 20 Feb 2019 22:37:46 +0000 (23:37 +0100)]
girparser: Correctly set array_length_type for delegates returning an array
Fixes https://gitlab.gnome.org/GNOME/vala/issues/754
Rico Tzschichholz [Thu, 14 Feb 2019 11:40:36 +0000 (12:40 +0100)]
clutter-1.0: Drop deprecated from Actor.pick()
The signal "pick" was deprecated with 1.12, but not the virtual method.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/625
Rico Tzschichholz [Sun, 10 Feb 2019 18:58:46 +0000 (19:58 +0100)]
vapi: Drop gdk-x11-3.0 from GIDL_BINDINGS
Rico Tzschichholz [Sun, 10 Feb 2019 12:12:43 +0000 (13:12 +0100)]
gtk+-unix-print-*.0: Fix PrintJob.get_page_ranges(), Printer.get_hard_margins()
Rico Tzschichholz [Wed, 30 Jan 2019 15:47:49 +0000 (16:47 +0100)]
gdk-3.0: Fix ownership of FrameClock.get_current_timings/get_timings()
Rico Tzschichholz [Tue, 29 Jan 2019 17:22:39 +0000 (18:22 +0100)]
g-i: Fix return value on error in start_discriminator()
Rico Tzschichholz [Sat, 26 Jan 2019 20:23:22 +0000 (21:23 +0100)]
vala: Parser doesn't ensure "protected" to be applied on TypeSymbol members
Probably ObjectTypeSymbol should be enforced.
Rico Tzschichholz [Fri, 25 Jan 2019 19:10:48 +0000 (20:10 +0100)]
vala: Check inferred variable_type of LocalVariables
Rico Tzschichholz [Wed, 23 Jan 2019 20:36:12 +0000 (21:36 +0100)]
codegen: Replace some unfortunate asserts with internal error reports
Rico Tzschichholz [Wed, 23 Jan 2019 21:39:42 +0000 (22:39 +0100)]
codegen: Properly handle and catch inner-error of finally-block
If all inner-errors are caught there is no jump-out of the current finally-
block therefore the control-flow analyzer is happy. To make this work the
surrounding inner-error must not be used or changed here.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/742
Rico Tzschichholz [Sun, 20 Jan 2019 18:23:43 +0000 (19:23 +0100)]
codegen: Don't apply address-of operator on literals when casting to array
Regression of
5f316333d6a803e4240b5cccc95a6abd2294137b
https://bugzilla.gnome.org/show_bug.cgi?id=777194
Rico Tzschichholz [Sun, 21 Oct 2018 08:34:28 +0000 (10:34 +0200)]
girparser: Async methods don't allow out-parameters before in-parameters
In vala out-parameters are always handled in the *_finish implementation
and therefore are asynchronous. Report a warning for GIR sources where
convert them to pointer-types to create usuable signatures for bindings.
See https://gitlab.gnome.org/GNOME/vala/issues/636
Rico Tzschichholz [Wed, 16 Jan 2019 20:12:23 +0000 (21:12 +0100)]
clutter-1.0: Fix BindingPool.override_action()
Rico Tzschichholz [Fri, 18 Jan 2019 13:19:54 +0000 (14:19 +0100)]
compiler: Report deprecated command-line option "--thread"
Rico Tzschichholz [Sun, 13 Jan 2019 12:36:56 +0000 (13:36 +0100)]
libsoup-2.4: Fix Message.add_*_handler() by unhiding user_data parameter
See https://gitlab.gnome.org/GNOME/vala/issues/731
Rico Tzschichholz [Thu, 10 Jan 2019 19:02:39 +0000 (20:02 +0100)]
codegen: Emit struct declaration typedef before resolving its fields
This a regression when compiling a circular dependency of delegates with
structs.
Regression of
7adb3a45bb8d663c0cfca55af26b7e6f7292b14a
See https://gitlab.gnome.org/GNOME/vala/issues/318
Rico Tzschichholz [Thu, 10 Jan 2019 08:21:54 +0000 (09:21 +0100)]
codegen: Use a parameter-map for creation of delegate declaration
This is required to take instance_pos into account and will allow the error
parameter to be put before the target (aka instance) in delegates.
See https://gitlab.gnome.org/GNOME/vala/issues/728
Rico Tzschichholz [Sun, 6 Jan 2019 08:47:07 +0000 (09:47 +0100)]
gobject-2.0: Minor syncing from GIR
Rico Tzschichholz [Sat, 5 Jan 2019 23:49:14 +0000 (00:49 +0100)]
gdbus: Cast instance and result of g_async_initable_new_finish() call
This will silence those incompatible-pointer-types warnings
Jiří Janoušek [Sat, 5 Jan 2019 16:46:42 +0000 (17:46 +0100)]
sqlite3: Correct return C type of Statement.column_text & Value.to_text
Rico Tzschichholz [Sat, 5 Jan 2019 20:41:20 +0000 (21:41 +0100)]
gdbus: Properly set annotations field of GDBus*Info struct to NULL
Found by -Werror=missing-field-initializers
Rico Tzschichholz [Sat, 5 Jan 2019 21:01:06 +0000 (22:01 +0100)]
tests: Extend "DBus errors" tests to increase coverage
Alistair Thomas [Sat, 5 Jan 2019 20:41:00 +0000 (20:41 +0000)]
docs: Add a basic CONTRIBUTING.md file that links to the relevant Wiki page
Rico Tzschichholz [Sat, 5 Jan 2019 17:11:30 +0000 (18:11 +0100)]
codegen: Don't check boolean values for (in)equality in GTask API
This resolves any value but 0 to true as it is suppose to be.
/* invalid */
if (condition == TRUE)
do_foo ();
/* valid */
if (another_condition)
do_bar ();
See https://gitlab.gnome.org/GNOME/glib/issues/1636
Jiří Janoušek [Thu, 3 Jan 2019 13:43:26 +0000 (14:43 +0100)]
gio-2.0: Fix File.replace_contents_bytes_async()
Closes https://gitlab.gnome.org/GNOME/vala/merge_requests/37
Rico Tzschichholz [Wed, 2 Jan 2019 12:08:56 +0000 (13:08 +0100)]
gobject-2.0: Use correct array-length-type for returned arrays
Rico Tzschichholz [Wed, 2 Jan 2019 08:33:26 +0000 (09:33 +0100)]
glib-2.0: Use correct array-length-type for returned arrays
As usual length is returned by an implicit out-parameter where the
provided target variable must have a matching data type.
Discovered by -fstack-protector-all
See https://gitlab.gnome.org/GNOME/gitg/issues/171
Rico Tzschichholz [Mon, 31 Dec 2018 13:48:08 +0000 (14:48 +0100)]
vala: Report invalid instance member access to property
See https://gitlab.gnome.org/GNOME/vala/issues/605
Rico Tzschichholz [Sun, 23 Dec 2018 22:08:31 +0000 (23:08 +0100)]
codegen: Use temp-vars for ellipsis out-arguments to fix memory management
Fixes https://gitlab.gnome.org/GNOME/vala/issues/722
Rico Tzschichholz [Tue, 18 Dec 2018 10:02:14 +0000 (11:02 +0100)]
poppler-glib: Update to 0.71
Rico Tzschichholz [Thu, 20 Dec 2018 15:30:11 +0000 (16:30 +0100)]
Release 0.36.17
Rico Tzschichholz [Tue, 20 Nov 2018 12:03:31 +0000 (13:03 +0100)]
gdk-x11-3.0: Update to 3.24.1+
356f1f59
Rico Tzschichholz [Tue, 11 Dec 2018 13:08:20 +0000 (14:08 +0100)]
gobject-introspection-1.0: Pick up version attribute fixes
Rico Tzschichholz [Tue, 11 Dec 2018 08:51:51 +0000 (09:51 +0100)]
vapi: Regenerate GIR-based bindings to fix non-standard async methods
See https://gitlab.gnome.org/GNOME/vala/issues/709
Rico Tzschichholz [Mon, 10 Dec 2018 15:07:46 +0000 (16:07 +0100)]
codegen: Handle non-default AsyncResult parameter position
Unfortunately gdbus-codegen puts the AsyncResult parameter after possible
out-parameters therefore there is an "async_result_pos" attribute required
to handle this correctly.
Vala supposely follows the common practice to put the AsyncResult before
out-parameters by default.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/709
Rico Tzschichholz [Sat, 8 Dec 2018 09:41:50 +0000 (10:41 +0100)]
codegen: Always emit constants with initializer-list
generate_constant_declaration() handles both definition and declaration.
This is important when using --use-header where the actual definition
would never be written and we ended up with an "extern const ..." in the
header only.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/81
Rico Tzschichholz [Thu, 6 Dec 2018 21:41:43 +0000 (22:41 +0100)]
codegen: Emit delegate/enum typedefs to type-declaration section
This fixes compilation of circular dependency of delegates with enums,
structs, classes and interfaces.
Resolve interface prerequisites after writing forward declarations to
fix entagled delegate dependencies in them.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/318
Florian Brosch [Wed, 10 Sep 2014 11:07:11 +0000 (13:07 +0200)]
vala: Break possible endless loop in SymbolResolver.get_type_for_struct()
Required to deal with invalid code containing base struct cycles.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/444
Rico Tzschichholz [Wed, 5 Dec 2018 06:57:36 +0000 (07:57 +0100)]
girparser: Skip possible docs in transparent union
See https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/75
Rico Tzschichholz [Mon, 3 Dec 2018 08:05:25 +0000 (09:05 +0100)]
girparser: Skip "source-position" elements
See https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/75