]> git.ipfire.org Git - thirdparty/vala.git/log
thirdparty/vala.git
5 years agovala: Improve check of expression passed to yield
Rico Tzschichholz [Mon, 20 Jul 2020 08:37:53 +0000 (10:37 +0200)] 
vala: Improve check of expression passed to yield

Report a proper error and fix codegen cricical when a signal is given:

  vala_ccode_function_add_expression: assertion 'expression != NULL' failed

See https://gitlab.gnome.org/GNOME/vala/issues/1039

5 years agogstreamer: Update from 1.17.2+ git master
Rico Tzschichholz [Sat, 18 Jul 2020 14:14:45 +0000 (16:14 +0200)] 
gstreamer: Update from 1.17.2+ git master

5 years agogtk4: Update to 3.98.5+4da3edd4
Rico Tzschichholz [Sat, 18 Jul 2020 14:13:43 +0000 (16:13 +0200)] 
gtk4: Update to 3.98.5+4da3edd4

5 years agotests: Fix "methods/extern" test with -Werror=address and gcc 5.4.0
Rico Tzschichholz [Fri, 17 Jul 2020 21:43:23 +0000 (23:43 +0200)] 
tests: Fix "methods/extern" test with -Werror=address and gcc 5.4.0

5 years agogtk+-3.0: Resolve conflicts of signals with properties
Rico Tzschichholz [Fri, 17 Jul 2020 21:23:59 +0000 (23:23 +0200)] 
gtk+-3.0: Resolve conflicts of signals with properties

5 years agogtk4: Resolve conflict of DropTarget.drop signal with property
Rico Tzschichholz [Fri, 17 Jul 2020 21:23:59 +0000 (23:23 +0200)] 
gtk4: Resolve conflict of DropTarget.drop signal with property

Fixes https://gitlab.gnome.org/GNOME/vala/issues/1033

5 years agogirparser: Warn about conflicting signals and properties
Rico Tzschichholz [Fri, 17 Jul 2020 21:23:59 +0000 (23:23 +0200)] 
girparser: Warn about conflicting signals and properties

5 years agovala: Fix code indentation
Rico Tzschichholz [Fri, 17 Jul 2020 10:35:03 +0000 (12:35 +0200)] 
vala: Fix code indentation

5 years agolibvaladoc: Support exporting the `class` modifier on fields
Rico Tzschichholz [Fri, 17 Jul 2020 10:29:25 +0000 (12:29 +0200)] 
libvaladoc: Support exporting the `class` modifier on fields

5 years agolibvaladoc: Support exporting the `class` modifier on methods
Corentin Noël [Fri, 17 Jul 2020 08:35:37 +0000 (10:35 +0200)] 
libvaladoc: Support exporting the `class` modifier on methods

5 years agovala: Tranform instance member-access to a static one if possible
Rico Tzschichholz [Thu, 16 Jul 2020 13:25:05 +0000 (15:25 +0200)] 
vala: Tranform instance member-access to a static one if possible

There is a warning issued already and this cleans up the AST to prevent
unwanted behaviour in the code-generator, which resulted in the
invocation of "CCodeBaseModule.emit_temp_var()" and criticals like:

  vala_ccode_function_add_declaration: assertion 'self != NULL' failed
  vala_ccode_function_add_assignment: assertion 'self != NULL' failed

Fixes https://gitlab.gnome.org/GNOME/vala/issues/270

5 years agovala: Use inheritted scopes of base-types/prerequisites to resolve symbols
Rico Tzschichholz [Wed, 15 Jul 2020 15:46:58 +0000 (17:46 +0200)] 
vala: Use inheritted scopes of base-types/prerequisites to resolve symbols

Fixes https://gitlab.gnome.org/GNOME/vala/issues/54

5 years agovala: Fully qualify member-access when using-directive was used to resolve
Rico Tzschichholz [Wed, 15 Jul 2020 15:46:58 +0000 (17:46 +0200)] 
vala: Fully qualify member-access when using-directive was used to resolve

Fixes https://gitlab.gnome.org/GNOME/vala/issues/57

5 years agotests: Add "pre/post-increment" tests to increase coverage
Rico Tzschichholz [Tue, 14 Jul 2020 12:13:51 +0000 (14:13 +0200)] 
tests: Add "pre/post-increment" tests to increase coverage

5 years agotestrunner: Add "-Werror=tautological-pointer-compare" flag
Rico Tzschichholz [Tue, 14 Jul 2020 12:13:51 +0000 (14:13 +0200)] 
testrunner: Add "-Werror=tautological-pointer-compare" flag

5 years agocodegen: Inline allocated and constant arrays are never NULL
Rico Tzschichholz [Tue, 14 Jul 2020 12:13:51 +0000 (14:13 +0200)] 
codegen: Inline allocated and constant arrays are never NULL

Found by -Werror=tautological-pointer-compare

5 years agovapi: Disable deprecation warnings when checking bindings
Rico Tzschichholz [Tue, 14 Jul 2020 12:13:51 +0000 (14:13 +0200)] 
vapi: Disable deprecation warnings when checking bindings

5 years agovala: Remove some public API from expressions and statements (2)
Rico Tzschichholz [Mon, 13 Jul 2020 18:00:08 +0000 (20:00 +0200)] 
vala: Remove some public API from expressions and statements (2)

5 years agocodegen: Make use of CCode.cname for label name of CatchClause
Rico Tzschichholz [Mon, 13 Jul 2020 18:00:08 +0000 (20:00 +0200)] 
codegen: Make use of CCode.cname for label name of CatchClause

5 years agovapi: Update GIR-based bindings
Rico Tzschichholz [Sun, 12 Jul 2020 14:14:34 +0000 (16:14 +0200)] 
vapi: Update GIR-based bindings

5 years agogstreamer: Update from 1.17.2+ git master
Rico Tzschichholz [Sun, 12 Jul 2020 14:14:22 +0000 (16:14 +0200)] 
gstreamer: Update from 1.17.2+ git master

5 years agogtk4: Update to 3.98.5+191e0e8d
Rico Tzschichholz [Sun, 12 Jul 2020 11:34:46 +0000 (13:34 +0200)] 
gtk4: Update to 3.98.5+191e0e8d

5 years agowebkit2gtk-4.0: Update to 2.29.3
Rico Tzschichholz [Sun, 12 Jul 2020 11:34:12 +0000 (13:34 +0200)] 
webkit2gtk-4.0: Update to 2.29.3

5 years agovala: Handle parameter initializer without value-type
Rico Tzschichholz [Sat, 11 Jul 2020 17:06:04 +0000 (19:06 +0200)] 
vala: Handle parameter initializer without value-type

This caused criticals like:

  vala_data_type_compatible: assertion 'self != NULL' failed

See https://gitlab.gnome.org/GNOME/vala/issues/1029

5 years agotestrunner: Add more -Werror=* flags
Rico Tzschichholz [Sat, 11 Jul 2020 16:29:42 +0000 (18:29 +0200)] 
testrunner: Add more -Werror=* flags

5 years agocodegen: Properly compare string if binary-expression contains string-literal
Rico Tzschichholz [Sat, 11 Jul 2020 16:29:42 +0000 (18:29 +0200)] 
codegen: Properly compare string if binary-expression contains string-literal

Found by -Werror=address

5 years agotests: Add "unique namespace" test
Rico Tzschichholz [Wed, 8 Jul 2020 20:57:56 +0000 (22:57 +0200)] 
tests: Add "unique namespace" test

A namespace symbol is unique for a given name in its CodeContext. This
means attributes are inherited accross all occurances.

5 years agovapi: Update GIR-based bindings
Rico Tzschichholz [Mon, 6 Jul 2020 11:59:41 +0000 (13:59 +0200)] 
vapi: Update GIR-based bindings

5 years agogtk4: Update to 3.98.5+26d83b1a
Rico Tzschichholz [Mon, 6 Jul 2020 11:58:40 +0000 (13:58 +0200)] 
gtk4: Update to 3.98.5+26d83b1a

5 years agogstreamer: Update from 1.17.2+ git master
Rico Tzschichholz [Mon, 6 Jul 2020 11:57:51 +0000 (13:57 +0200)] 
gstreamer: Update from 1.17.2+ git master

5 years agotests: Extend "default gtype" tests to increase coverage
Rico Tzschichholz [Sun, 5 Jul 2020 19:40:22 +0000 (21:40 +0200)] 
tests: Extend "default gtype" tests to increase coverage

5 years agoglib-2.0: Add more explicit type_id attributes for various symbols
Rico Tzschichholz [Sun, 5 Jul 2020 18:58:18 +0000 (20:58 +0200)] 
glib-2.0: Add more explicit type_id attributes for various symbols

5 years agovala: Return copy of constant type in get_value_type_for_symbol()
Rico Tzschichholz [Sat, 4 Jul 2020 14:04:22 +0000 (16:04 +0200)] 
vala: Return copy of constant type in get_value_type_for_symbol()

5 years agovala: Recursive check of assignment target to recognize constants fbd40a292a2e491ba76dbd80de6ae428ac971b7e
Rico Tzschichholz [Sat, 4 Jul 2020 14:04:22 +0000 (16:04 +0200)] 
vala: Recursive check of assignment target to recognize constants

See https://gitlab.gnome.org/GNOME/vala/issues/944

5 years agovala: Property must be writable when invoking ReturnsModifiedPointer method
Rico Tzschichholz [Sat, 4 Jul 2020 07:07:06 +0000 (09:07 +0200)] 
vala: Property must be writable when invoking ReturnsModifiedPointer method

Fixes https://gitlab.gnome.org/GNOME/vala/issues/1023

5 years agovala: Don't allow "resize" invocation on variable with unowned array type
Rico Tzschichholz [Fri, 3 Jul 2020 17:33:41 +0000 (19:33 +0200)] 
vala: Don't allow "resize" invocation on variable with unowned array type

Fixes https://gitlab.gnome.org/GNOME/vala/issues/928

5 years agogtk4: Fix binding of CClosureExpression ctor
Rico Tzschichholz [Sat, 4 Jul 2020 07:03:30 +0000 (09:03 +0200)] 
gtk4: Fix binding of CClosureExpression ctor

Fixes https://gitlab.gnome.org/GNOME/vala/issues/1024

5 years agoglib-2.0: Add AtomicUint, an alternation of AtomicInt for uint
Rico Tzschichholz [Tue, 12 May 2020 05:28:29 +0000 (07:28 +0200)] 
glib-2.0: Add AtomicUint, an alternation of AtomicInt for uint

Fixes https://gitlab.gnome.org/GNOME/vala/issues/915

5 years agogtk4: Improve Gtk.ParamSpecExpression binding
Rico Tzschichholz [Thu, 2 Jul 2020 17:50:48 +0000 (19:50 +0200)] 
gtk4: Improve Gtk.ParamSpecExpression binding

5 years agocodegen: Handle "gtk_param_spec_expression" in get_param_spec()
Rico Tzschichholz [Thu, 2 Jul 2020 17:50:48 +0000 (19:50 +0200)] 
codegen: Handle "gtk_param_spec_expression" in get_param_spec()

5 years agocodegen: Cache type_symbol in get_param_spec()
Rico Tzschichholz [Thu, 2 Jul 2020 17:50:48 +0000 (19:50 +0200)] 
codegen: Cache type_symbol in get_param_spec()

5 years agovala: Improve error handling of nested initializer lists
Rico Tzschichholz [Thu, 2 Jul 2020 14:50:36 +0000 (16:50 +0200)] 
vala: Improve error handling of nested initializer lists

This avoids reporting consequential errors.

5 years agovala: Don't loose invalid_syntax when copying array type for local variable
Rico Tzschichholz [Thu, 2 Jul 2020 11:11:52 +0000 (13:11 +0200)] 
vala: Don't loose invalid_syntax when copying array type for local variable

Fixes https://gitlab.gnome.org/GNOME/vala/issues/942

5 years agotests: Don't use invalid syntax to declare local variable with array type
Rico Tzschichholz [Thu, 2 Jul 2020 11:11:52 +0000 (13:11 +0200)] 
tests: Don't use invalid syntax to declare local variable with array type

See https://gitlab.gnome.org/GNOME/vala/issues/942

5 years agovala: Avoid subsequent critical caused by invalid array type for constant
Rico Tzschichholz [Thu, 2 Jul 2020 11:11:52 +0000 (13:11 +0200)] 
vala: Avoid subsequent critical caused by invalid array type for constant

5 years agomanual: Update from wiki.gnome.org 2ad5524c5e4ce1a73e43361610925ea33db3e4ac
Rico Tzschichholz [Tue, 30 Jun 2020 09:43:11 +0000 (11:43 +0200)] 
manual: Update from wiki.gnome.org

5 years agoSync NEWS from 0.48
Rico Tzschichholz [Tue, 30 Jun 2020 10:39:14 +0000 (12:39 +0200)] 
Sync NEWS from 0.48

5 years agovapi: Update GIR-based bindings
Rico Tzschichholz [Tue, 30 Jun 2020 07:52:22 +0000 (09:52 +0200)] 
vapi: Update GIR-based bindings

5 years agogstreamer: Update from 1.17.1+ git master
Rico Tzschichholz [Tue, 30 Jun 2020 07:50:28 +0000 (09:50 +0200)] 
gstreamer: Update from 1.17.1+ git master

5 years agogtk4: Update to 3.98.5+fca2ba96
Rico Tzschichholz [Tue, 30 Jun 2020 07:27:40 +0000 (09:27 +0200)] 
gtk4: Update to 3.98.5+fca2ba96

5 years agogtk4: Mark optional methods of Gdk.Paintable interface as virtual
Rico Tzschichholz [Tue, 30 Jun 2020 06:03:48 +0000 (08:03 +0200)] 
gtk4: Mark optional methods of Gdk.Paintable interface as virtual

Fixes https://gitlab.gnome.org/GNOME/vala/issues/1021

5 years agowebkit2gtk-4.0: Update to 2.29.2
Rico Tzschichholz [Fri, 26 Jun 2020 17:49:30 +0000 (19:49 +0200)] 
webkit2gtk-4.0: Update to 2.29.2

5 years agogio-2.0: Add new symbols from 2.66 aae22f92f44245d528b14718b21d094b5510e398
Rico Tzschichholz [Fri, 26 Jun 2020 16:22:12 +0000 (18:22 +0200)] 
gio-2.0: Add new symbols from 2.66

5 years agoglib-2.0: Add GLib.Uri bindings (since 2.66)
Rico Tzschichholz [Fri, 26 Jun 2020 16:22:12 +0000 (18:22 +0200)] 
glib-2.0: Add GLib.Uri bindings (since 2.66)

5 years agovala: Don't carry floating reference into unknown target type expression
Rico Tzschichholz [Fri, 26 Jun 2020 13:27:11 +0000 (15:27 +0200)] 
vala: Don't carry floating reference into unknown target type expression

A floating reference result of a method, which may throw an error, needs
to be sinked when passed as argument for ellipsis parameter.

Fixes https://gitlab.gnome.org/GNOME/vala/issues/1018

5 years agotests: Add "named argument" test to increase coverage
Rico Tzschichholz [Fri, 26 Jun 2020 11:46:07 +0000 (13:46 +0200)] 
tests: Add "named argument" test to increase coverage

5 years agogtk4: Update to 3.98.5+1d1f618a
Rico Tzschichholz [Fri, 26 Jun 2020 10:41:39 +0000 (12:41 +0200)] 
gtk4: Update to 3.98.5+1d1f618a

5 years agovala: Improve parameter check of "get" method meant to be used by foreach (2) 0be560d8380a6e9a8b9d307ede109412cbdc55bd
Rico Tzschichholz [Fri, 26 Jun 2020 07:40:11 +0000 (09:40 +0200)] 
vala: Improve parameter check of "get" method meant to be used by foreach (2)

Actually all integer-types as index parameter.

5 years agovala: Improve parameter check of "get" method meant to be used by foreach
Rico Tzschichholz [Fri, 26 Jun 2020 06:43:12 +0000 (08:43 +0200)] 
vala: Improve parameter check of "get" method meant to be used by foreach

The index-based iteration requires the "get" method to take one integer
compatible parameter. Otherwise continue checking other options.

Fixes https://gitlab.gnome.org/GNOME/vala/issues/1017

5 years agogtk4: Update to 3.98.5+c0cbf9db c6a4b6e95e64a6ebd2bf88d4f3c3a55b2d3f31f4
Rico Tzschichholz [Thu, 25 Jun 2020 21:12:41 +0000 (23:12 +0200)] 
gtk4: Update to 3.98.5+c0cbf9db

5 years agobuild: Update git-version-gen to latest upstream ef3b9ce3abf58e803955cdde511dc43e7cd4ae8c
Chris White [Mon, 22 Jun 2020 12:24:48 +0000 (08:24 -0400)] 
build: Update git-version-gen to latest upstream

From commit 8a09003664733eb6bef031f56ef9cd575e403023 of
https://git.savannah.gnu.org/cgit/autoconf.git/tree/build-aux/git-version-gen

5 years agoglib-2.0: data of GLib.Bytes is allowed to be null 9c1542ce35ce39aecdde00e3a3353f8c4efe7a7f 131/head
Michael Gratton [Thu, 25 Jun 2020 06:56:46 +0000 (16:56 +1000)] 
glib-2.0: data of GLib.Bytes is allowed to be null

Ctors accepting uint8 arrays accept null as 0-sized array and the
`get_data` may return null if the size of the buffer is 0.

https://developer.gnome.org/glib/stable/glib-Byte-Arrays.html

5 years agoparser: Avoid mitigation for missing token if it follows DOT or DOUBLE_COLON 8edd90dd26e3acf652ea4a24e288d7f9a57a5cb4 128/head
Rico Tzschichholz [Tue, 16 Jun 2020 12:55:04 +0000 (14:55 +0200)] 
parser: Avoid mitigation for missing token if it follows DOT or DOUBLE_COLON

Rolling back to a DOT/DOUBLE_COLON token will retrigger the attempt to parse
an incomplete member access.

Regression of 4368a4fa667148378dcdbd251a4ae4e00c9a8e5a

Fixes https://gitlab.gnome.org/GNOME/vala/issues/987

5 years agocodegen: Cast initializer-list to struct for non-constant/non-array assignments 68db26a5a26338ce2ccb586d4a7eb109f4a3bbcf
Rico Tzschichholz [Wed, 17 Jun 2020 17:26:55 +0000 (19:26 +0200)] 
codegen: Cast initializer-list to struct for non-constant/non-array assignments

Avoid invalid c-code and use the correct syntax for compound literals.

Fixes https://gitlab.gnome.org/GNOME/vala/issues/1013

5 years agogtk4: Prefix value names of PaintableFlags with "STATIC_"
Rico Tzschichholz [Wed, 17 Jun 2020 15:03:47 +0000 (17:03 +0200)] 
gtk4: Prefix value names of PaintableFlags with "STATIC_"

Fixes https://gitlab.gnome.org/GNOME/vala/issues/1011

5 years agogirparser: Actually respect given cprefix metadata for enumerations
Rico Tzschichholz [Wed, 17 Jun 2020 14:58:56 +0000 (16:58 +0200)] 
girparser: Actually respect given cprefix metadata for enumerations

5 years agovala: Use available CodeContext instance for VersionAttribute.check()
Rico Tzschichholz [Thu, 16 Apr 2020 10:37:26 +0000 (12:37 +0200)] 
vala: Use available CodeContext instance for VersionAttribute.check()

5 years agovapi: Update GIR-based bindings 26cecfc8b15a7ecba42ffd955546dbdd5d352d02
Rico Tzschichholz [Tue, 16 Jun 2020 10:39:55 +0000 (12:39 +0200)] 
vapi: Update GIR-based bindings

5 years agogtk4: Update to 3.98.5+2cc39fe2
Rico Tzschichholz [Tue, 16 Jun 2020 10:38:49 +0000 (12:38 +0200)] 
gtk4: Update to 3.98.5+2cc39fe2

5 years agogstreamer: Update from 1.17.0+ git master
Rico Tzschichholz [Tue, 16 Jun 2020 10:23:46 +0000 (12:23 +0200)] 
gstreamer: Update from 1.17.0+ git master

5 years agopango: Update from 1.45.2
Rico Tzschichholz [Tue, 16 Jun 2020 10:21:59 +0000 (12:21 +0200)] 
pango: Update from 1.45.2

5 years agovala: Use correct value-type for ArrayCreationExpression used as argument
Rico Tzschichholz [Mon, 15 Jun 2020 18:18:11 +0000 (20:18 +0200)] 
vala: Use correct value-type for ArrayCreationExpression used as argument

Copy fixed_length and inline_allocated attributes from formal-target-type.

Fixes https://gitlab.gnome.org/GNOME/vala/issues/1009

5 years agolibvaladoc: Remove unused Api.Class.get_finalize_function_name() API
Rico Tzschichholz [Sun, 14 Jun 2020 07:53:21 +0000 (09:53 +0200)] 
libvaladoc: Remove unused Api.Class.get_finalize_function_name() API

5 years agoConsistently use get_ccode_lower_case_prefix() for function names
Rico Tzschichholz [Sun, 14 Jun 2020 06:59:51 +0000 (08:59 +0200)] 
Consistently use get_ccode_lower_case_prefix() for function names

Create the expected name for "constructor" and "finalize" functions
which are non-public API.

Fixes https://gitlab.gnome.org/GNOME/vala/issues/1008

5 years agovala: Reduce calls of CodeContext.get()
Rico Tzschichholz [Thu, 11 Jun 2020 09:59:46 +0000 (11:59 +0200)] 
vala: Reduce calls of CodeContext.get()

5 years agotests: Build typelib if g-ir-compiler is available
Rico Tzschichholz [Thu, 11 Jun 2020 11:29:52 +0000 (13:29 +0200)] 
tests: Build typelib if g-ir-compiler is available

5 years agolibvaladoc/girimporter: Skip "function-macro" elements 518984a95a61e0b0418b0c6591f6aa9d5d4f30a7 116/head
Corentin Noël [Fri, 27 Mar 2020 12:32:58 +0000 (13:32 +0100)] 
libvaladoc/girimporter: Skip "function-macro" elements

This is the same patch as in commit f51d9dfdaf97ab5b8377d7e5bb78cfc9b232dc86

5 years agogirwriter: Append symbol-attributes to callback field rather than its type bfaa68db5e8bc408a137b1db669eabae2b3a85f3
Rico Tzschichholz [Wed, 10 Jun 2020 12:01:05 +0000 (14:01 +0200)] 
girwriter: Append symbol-attributes to callback field rather than its type

Fixes https://gitlab.gnome.org/GNOME/vala/issues/1006

5 years agogtk4: Update to 3.98.5+d2235b71
Rico Tzschichholz [Wed, 10 Jun 2020 07:45:45 +0000 (09:45 +0200)] 
gtk4: Update to 3.98.5+d2235b71

5 years agocodegen: Add implicit parameter and instance checks in async method 43f3e2ca534d082433fbe62aa347b7af443f9f33
Rico Tzschichholz [Tue, 9 Jun 2020 14:22:17 +0000 (16:22 +0200)] 
codegen: Add implicit parameter and instance checks in async method

This is already done for every non-async method and can be disabled by
passing --disable-assert.

See https://gitlab.gnome.org/GNOME/vala/issues/1005

5 years agogstreamer-audio-1.0: Adjustments for Gst.Audio.Sink class extension
Rico Tzschichholz [Tue, 9 Jun 2020 11:56:25 +0000 (13:56 +0200)] 
gstreamer-audio-1.0: Adjustments for Gst.Audio.Sink class extension

5 years agopango: Update from 1.45.1
Rico Tzschichholz [Mon, 8 Jun 2020 18:37:43 +0000 (20:37 +0200)] 
pango: Update from 1.45.1

5 years agogstreamer: Update from 1.17.0+ git master
Rico Tzschichholz [Sun, 7 Jun 2020 13:29:37 +0000 (15:29 +0200)] 
gstreamer: Update from 1.17.0+ git master

5 years agovapi: Update GIR-based bindings
Rico Tzschichholz [Sun, 7 Jun 2020 13:29:07 +0000 (15:29 +0200)] 
vapi: Update GIR-based bindings

5 years agoglib-2.0,gobject-2.0: Add new symbols from 2.66
Rico Tzschichholz [Sun, 7 Jun 2020 11:35:45 +0000 (13:35 +0200)] 
glib-2.0,gobject-2.0: Add new symbols from 2.66

5 years agovala: Correctly handle qualified struct type reference in initializer list
Rico Tzschichholz [Sat, 6 Jun 2020 07:53:19 +0000 (09:53 +0200)] 
vala: Correctly handle qualified struct type reference in initializer list

Construct member-access including namespace of inferred struct type.

Fixes https://gitlab.gnome.org/GNOME/vala/issues/1004

5 years agovala: Fix typo in comments
Rico Tzschichholz [Fri, 5 Jun 2020 07:07:54 +0000 (09:07 +0200)] 
vala: Fix typo in comments

5 years agocodegen: Don't call get_ccode_finish_instance() with non-async methods
Rico Tzschichholz [Thu, 4 Jun 2020 06:10:21 +0000 (08:10 +0200)] 
codegen: Don't call get_ccode_finish_instance() with non-async methods

and restrict evaluation of CCode.finish_* attributes to async methods only

5 years agoAdd support for "with" statement 35f72f3ecdf0d61d0e67cd4f72c29fee2c3c9a55
Nick Schrader [Fri, 27 Mar 2020 16:12:09 +0000 (13:12 -0300)] 
Add support for "with" statement

Creates data type scoped blocks which allow implicit member access to
the given expression or declaration statement.

with (expr) {
    ...;
}

Within the with-block the expression's members can be directly accessed
without the member access operator.
Members may hide local, class and instance varibales with the same name.
Instance variables are still accessible through this.
A local variable can be directly declared in the with statement header.
Hidden local and class variables are currently not directly accessible
(using this for class members generates the expected warning).

Fixes https://gitlab.gnome.org/GNOME/vala/issues/327

5 years agovala: Add InvalidExpression as replacement for erroneous nodes instead
Rico Tzschichholz [Wed, 22 Apr 2020 20:33:53 +0000 (22:33 +0200)] 
vala: Add InvalidExpression as replacement for erroneous nodes instead

This type is meant to be used where a successful parsing or transforming
cannot be achieved and the usage of "null" is not possible.

5 years agovala: Improve source documentation 120f54f8c8181d4ef9c7294050a4271353dc4b5c
Rico Tzschichholz [Tue, 26 May 2020 08:03:16 +0000 (10:03 +0200)] 
vala: Improve source documentation

5 years agocodegen: Improve array-dup-wrapper for empty arrays 48679761c7298f14bdab9c6ea3bd4c48db192cf5
Rico Tzschichholz [Sun, 24 May 2020 17:25:41 +0000 (19:25 +0200)] 
codegen: Improve array-dup-wrapper for empty arrays

Guard against negative lengths and consistently return NULL if allocated
size would be 0.

See https://gitlab.gnome.org/GNOME/vala/issues/999

5 years agoRevert "codegen: Dup arrays only if length > 0, this consistently returns NULL (POSIX)"
Rico Tzschichholz [Wed, 27 May 2020 07:22:32 +0000 (09:22 +0200)] 
Revert "codegen: Dup arrays only if length > 0, this consistently returns NULL (POSIX)"

This reverts commit 18847c9221362081c9a9d37e2922f3e3ea648088.

Fixes https://gitlab.gnome.org/GNOME/vala/issues/999

5 years agoparser: Map empty start/end index to 0/length for slice expressions 6edde4b658ea372a489b367d6a43f79fe79b0087 126/head
wb9688 [Tue, 26 May 2020 09:57:03 +0000 (11:57 +0200)] 
parser: Map empty start/end index to 0/length for slice expressions

This allows a syntax like a[:], a[2:] or a[:3] for arrays and strings.

Co-authored-by: Simon Werbeck <simon.werbeck@gmail.com>
Fixes https://gitlab.gnome.org/GNOME/vala/issues/238

5 years agotests: Extend "s[p]lice" tests to increase coverage 6312d8c7563c227b77d2098c9de1048f65c3b51f
Rico Tzschichholz [Sun, 24 May 2020 17:25:41 +0000 (19:25 +0200)] 
tests: Extend "s[p]lice" tests to increase coverage

5 years agocodegen: Dup arrays only if length > 0, this consistently returns NULL (POSIX) 18847c9221362081c9a9d37e2922f3e3ea648088
Rico Tzschichholz [Sun, 24 May 2020 17:25:41 +0000 (19:25 +0200)] 
codegen: Dup arrays only if length > 0, this consistently returns NULL (POSIX)

5 years agoRevert "glib-2.0: Map given end == 0 for string.slice/splice() to string.length"
Rico Tzschichholz [Sun, 24 May 2020 12:15:38 +0000 (14:15 +0200)] 
Revert "glib-2.0: Map given end == 0 for string.slice/splice() to string.length"

This reverts commit f844ad1c02fb5b17e923a7ba4e69cf2a7df96a14.

5 years agoglib-2.0: Map given end == 0 for string.slice/splice() to string.length f844ad1c02fb5b17e923a7ba4e69cf2a7df96a14
wb9688 [Thu, 21 May 2020 08:52:01 +0000 (10:52 +0200)] 
glib-2.0: Map given end == 0 for string.slice/splice() to string.length

Fixes https://gitlab.gnome.org/GNOME/vala/issues/179

5 years agogtk+-3.0: Deprecated abstract methods are not required to be implemented
Rico Tzschichholz [Fri, 22 May 2020 16:31:46 +0000 (18:31 +0200)] 
gtk+-3.0: Deprecated abstract methods are not required to be implemented

5 years agoSync NEWS from 0.48 a3e7970cea5071a45228b4e3c4209f9b5efdecdb
Rico Tzschichholz [Tue, 19 May 2020 13:34:56 +0000 (15:34 +0200)] 
Sync NEWS from 0.48