From ff9409b1737627857eb47f64f536a3f66b6a09a4 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 11 Apr 2016 13:01:07 +0200 Subject: Imported Upstream version 2.0.0 --- CheckItem.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'CheckItem.c') diff --git a/CheckItem.c b/CheckItem.c index ea83e6f..b7ba6fe 100644 --- a/CheckItem.c +++ b/CheckItem.c @@ -49,14 +49,22 @@ ObjectClass CheckItem_class = { .delete = CheckItem_delete }; -CheckItem* CheckItem_new(char* text, bool* ref, bool value) { +CheckItem* CheckItem_newByRef(char* text, bool* ref) { CheckItem* this = AllocThis(CheckItem); this->text = text; - this->value = value; + this->value = false; this->ref = ref; return this; } +CheckItem* CheckItem_newByVal(char* text, bool value) { + CheckItem* this = AllocThis(CheckItem); + this->text = text; + this->value = value; + this->ref = NULL; + return this; +} + void CheckItem_set(CheckItem* this, bool value) { if (this->ref) *(this->ref) = value; -- cgit v1.2.3