[vala/staging] codegen: Include "stddef.h" in CCodeBaseModule.destroy_value() (POSIX)
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] codegen: Include "stddef.h" in CCodeBaseModule.destroy_value() (POSIX)
- Date: Fri, 11 Jan 2019 22:33:44 +0000 (UTC)
commit 0d4d498261b1662d9bfa9ba6e8a97b2236ff243e
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Jan 11 23:28:00 2019 +0100
codegen: Include "stddef.h" in CCodeBaseModule.destroy_value() (POSIX)
Fixes https://gitlab.gnome.org/GNOME/vala/issues/730
codegen/valaccodebasemodule.vala | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 070489be1..5e5b7e153 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -3472,6 +3472,11 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
var cvar = get_cvalue_ (value);
if (type is DelegateType) {
+ if (context.profile != Profile.GOBJECT) {
+ // Required for NULL
+ cfile.add_include ("stddef.h");
+ }
+
var delegate_target = get_delegate_target_cvalue (value);
var delegate_target_destroy_notify = get_delegate_target_destroy_notify_cvalue
(value);
@@ -3552,6 +3557,11 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
return ccall;
}
+ if (context.profile != Profile.GOBJECT) {
+ // Required for NULL
+ cfile.add_include ("stddef.h");
+ }
+
/* (foo == NULL ? NULL : foo = (unref (foo), NULL)) */
/* can be simplified to
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]