Commit 0d4d4982 authored by Rico Tzschichholz's avatar Rico Tzschichholz

codegen: Include "stddef.h" in CCodeBaseModule.destroy_value() (POSIX)

Fixes #730
parent ef397d8b
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment