summaryrefslogtreecommitdiff
path: root/codegen/valagtypemodule.vala
Commit message (Collapse)AuthorAgeFilesLines
* codegen: Consistently handle GLib.Error as boxed typeRico Tzschichholz2023-03-091-0/+3
| | | | | | Use G_TYPE_ERROR and GBoxed API for all error domains. Fixes https://gitlab.gnome.org/GNOME/vala/issues/1418
* Require and target GLib >= 2.56Rico Tzschichholz2023-02-281-20/+5
| | | | | | | The next stable release of vala will happen over 5 years after the release of GLib 2.56.0. Fixes https://gitlab.gnome.org/GNOME/vala/issues/1415
* codegen: Cast vfunc of property accessors by using cast_method_pointer()Rico Tzschichholz2023-02-051-27/+17
| | | | | | Found by -Wincompatible-function-pointer-types See https://gitlab.gnome.org/GNOME/vala/issues/1408
* codegen: Cast return value of generic type accessor functionsRico Tzschichholz2023-02-051-1/+1
| | | | | | Found by -Wincompatible-function-pointer-types See https://gitlab.gnome.org/GNOME/vala/issues/1408
* codegen: Correctly handle fixed-length array initialization of fields in classesRico Tzschichholz2023-01-041-2/+1
|
* codegen: Emit GType definition for error domainsRico Tzschichholz2022-02-241-0/+12
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/699
* codegen: Emit G_DEFINE_AUTOPTR_CLEANUP_FUNC() for interfaces with base classRico Tzschichholz2022-02-241-1/+12
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/1292
* codegen: Split out GTypeModule.generate_autoptr_cleanup()Rico Tzschichholz2022-02-241-6/+10
|
* codegen: Accept CCode.type attribute on parametersRico Tzschichholz2021-11-271-3/+6
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/876
* codegen: Drop inconsistent space for ObjectType parametersRico Tzschichholz2021-11-271-1/+1
|
* codegen: Check required length of enum type name for GType supportRico Tzschichholz2021-11-171-0/+12
| | | | Add corresponding tests for types which have support for GType
* Slightly improve source_reference for get_dup_func_expression()Rico Tzschichholz2021-08-061-1/+1
|
* Add support for sealed classesRico Tzschichholz2021-08-051-9/+19
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/278
* codegen: Fix support for public fields on GLib.Source subclassesOle André Vadla Ravnås2021-05-221-3/+2
|
* codegen: Factor out compact_class_has_instance_struct_member()Rico Tzschichholz2021-05-221-20/+40
|
* codegen/vala: Improve check for GLib.Source derived classesRico Tzschichholz2021-05-201-6/+6
|
* codegen: Introduce VALA_EXPORT for public symbols to improve portabilityPrinceton Ferro2021-05-201-0/+23
| | | | | | | Use it as replacement for "extern" and attribute every public symbol. We want to ensure that public symbols are exported, which isn't the default when generating a shared library in MSVC, for example.
* codegen: Add missing "_return" label and "_inner_error*_" declaration in dtorsRico Tzschichholz2021-04-241-0/+20
|
* codegen: Unify handling of GenericType arguments/parametersRico Tzschichholz2021-04-191-19/+9
|
* codegen: Always use CCodeConstant for NULLRico Tzschichholz2021-04-061-4/+4
|
* codegen: More use of get_ccode_type_name()Rico Tzschichholz2021-03-031-13/+13
|
* codegen: Don't wrongly emit declaration for default-handler of signalsRico Tzschichholz2021-02-241-1/+0
| | | | This is done in GTypeModule.generate_interface_declaration()
* codegen: Allow CCode.type_cname for classes and use get_ccode_type_name()Rico Tzschichholz2021-01-301-3/+3
|
* codegen: Add CCode.type_get_function and get_ccode_type_get_function()Rico Tzschichholz2021-01-301-4/+4
| | | | | Allow to overide the macro name, and join get_ccode_class_get_function () and get_ccode_interface_get_function().
* codegen: Improve support of SimpleType struct constructorsRico Tzschichholz2021-01-271-0/+5
| | | | | Additionally stop generating broken and superfluous dup/free functions, and don't create not used GType declarations.
* Add support for 'opaque' compact classesSimon Werbeck2021-01-191-9/+8
| | | | | | | | | | | | | | This change intruduces a new attribute switch [Compact (opaque = true)] which allows to completely hide the implementation of a compact class. This is especially useful for libraries when maintaining a stable abi. An 'opaque' compact class exposes no struct definition in the generated c header, only a typedef is provided. As such, certain requirements apply for members of such classes: - Access to instance fields must be either private or internal. - No abstract/virtual methods or properties are allowed. Fixes https://gitlab.gnome.org/GNOME/vala/issues/1129
* codegen: Make use of new printf-like API of Report.*()Rico Tzschichholz2020-10-261-2/+2
|
* codegen: Don't falsly use g_return_val_if_fail() for async creation methodRico Tzschichholz2020-09-271-1/+1
| | | | | | | | | | | Asynchronous creation methods are represented by 5 functions, "*_new", "*_new_finish", "*_construct", "*_construct_co" and "*_construct_finish". The argument checks are emitted in "*_construct" which is a void function and cannot return any value. Regression of 43f3e2ca534d082433fbe62aa347b7af443f9f33 Fixes https://gitlab.gnome.org/GNOME/vala/issues/1077
* Don't use locale dependent string functions on syntax stringsRico Tzschichholz2020-09-021-9/+9
| | | | | | | Replace usage of string.down() with string.ascii_down(), and string.up() with string.ascii_up() Fixes https://gitlab.gnome.org/GNOME/vala/issues/1067
* codegen: Support non-virtual signals with default handlerRico Tzschichholz2020-08-071-5/+17
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/1056
* codegen: Include header for base-symbols when connecting vfuncsRico Tzschichholz2020-08-051-0/+20
| | | | This eases the handling of types which are split over different headers.
* codegen: Handle "gtk_param_spec_expression" in get_param_spec()Rico Tzschichholz2020-07-021-0/+2
|
* codegen: Cache type_symbol in get_param_spec()Rico Tzschichholz2020-07-021-10/+10
|
* Consistently use get_ccode_lower_case_prefix() for function namesRico Tzschichholz2020-06-141-1/+1
| | | | | | | Create the expected name for "constructor" and "finalize" functions which are non-public API. Fixes https://gitlab.gnome.org/GNOME/vala/issues/1008
* vala: Drop --use-header compiler option and enable it by defaultMason Bogue2020-04-051-4/+4
| | | | | | Import definitions from generated header files if available Fixes https://gitlab.gnome.org/GNOME/vala/issues/713
* codegen: Use defintions of public header in internal header if availableMason Bogue2020-04-051-2/+4
| | | | | | Add CCode API to distinguish between public and internal header files. See https://gitlab.gnome.org/GNOME/vala/issues/713
* codegen: Include "glib.h" for g_return_*() usageRico Tzschichholz2020-03-191-0/+3
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/940
* codegen: Improve handling of "array_length_type" attributeRico Tzschichholz2020-03-171-2/+2
| | | | | | This affects methods, parameters, field and properties. Fixes https://gitlab.gnome.org/GNOME/vala/issues/938
* codegen: Move ObjectTypeSymbol casting to GTypeModuleRico Tzschichholz2020-03-101-0/+36
|
* codegen: Add destroy of parameter in vfunc of delegate property setterRico Tzschichholz2020-03-071-0/+3
| | | | | | | The vfunc of an owned setter requires a destroy parameter. Support for this was introduced with 1e90d53dba0eff6ec2babd8292676099308dd4f6 Fixes https://gitlab.gnome.org/GNOME/vala/issues/919
* codegen: Skip StructRegisterFunction for boolean/integer/floating typesRico Tzschichholz2020-01-251-0/+6
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/901
* codegen: Commonized generation of public/private fieldsSimon Werbeck2020-01-211-22/+14
|
* codegen: Refactor generation of fields for ccode structsSimon Werbeck2020-01-211-58/+2
| | | | | Introduce a common method to add field including its possible composite fields for array and delegate types.
* codegen: Don't set implemenation of interface property to its ownRico Tzschichholz2020-01-071-0/+5
| | | | | | | | | A base-class is allowed to provide interface implementations for methods and properties. If those exist without an explicit implementation in the sub-class we then we end up finding the interface property itself. Using that is obviously wrong and causes a cyclic call stack. Fixes https://gitlab.gnome.org/GNOME/vala/issues/891
* codegen: Share generate_struct_*() helpers between classes and interfacesRico Tzschichholz2019-11-141-66/+14
|
* codegen: Fix vfunc signature of delegate-typed property in interfaceRico Tzschichholz2019-11-141-0/+4
|
* codegen: Commonize the determining of return-type for delegates and methodsRico Tzschichholz2019-11-091-15/+5
|
* codegen: Use SemanticAnalyzer.get_data_type_for_symbol()Rico Tzschichholz2019-11-091-5/+5
|
* codegen: G_DEFINE_AUTOPTR_CLEANUP_FUNC must not declared more than onceRico Tzschichholz2019-11-031-2/+4
| | | | Follow on f413cb32470d9c2598416772bc0166c6f974ec9f
* codegen: Fix custom reference-counting for compact classesSimon Werbeck2019-10-091-10/+30
| | | | | This fix defers emitting G_DEFINE_AUTOPTR_CLEANUP_FUNC when a compact class defines custom unref function and set by ccode "unref_function".