]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Append VALA_EXTERN also when using fast-vapi
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>
Mon, 10 Oct 2022 11:25:22 +0000 (14:25 +0300)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 23 Oct 2022 11:17:06 +0000 (13:17 +0200)
codegen/valaccodebasemodule.vala

index ccaf795478436da77cf295ef718e2314b96322aa..ff0ee3f94edfdae48d858c14b0eb60984558f9ab 100644 (file)
@@ -866,6 +866,14 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                 * C code output.
                 */
                if (source_file.file_type == SourceFileType.FAST) {
+                       if (requires_vala_extern) {
+                               if (context.header_filename != null) {
+                                       if (!header_file.add_declaration ("VALA_EXTERN")) {
+                                               append_vala_extern_define (header_file);
+                                       }
+                                       internal_header_file.add_include (source_file.get_cinclude_filename (), true);
+                               }
+                       }
                        return;
                }