From 830ee22b85f1e91c547354435af2b6a79578f7ce Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Mon, 20 Apr 2020 22:06:11 +0200 Subject: Add cc4group.isChild --- src/cc4group.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/cc4group.c') diff --git a/src/cc4group.c b/src/cc4group.c index 5cbce53..c1c434a 100644 --- a/src/cc4group.c +++ b/src/cc4group.c @@ -3289,6 +3289,11 @@ static CC4Group* cc4group_openAsChild(CC4Group* const this, const char* const pa return child; } +static bool cc4group_isChild(const CC4Group* const this) +{ + return this->parent != NULL; +} + static void* cc4group_memoryManagementTakeStart(void* const data, size_t const size, void* const arg) { (void)size; @@ -3436,5 +3441,6 @@ CC4Group_API cc4group = { .getErrorCauser = cc4group_getErrorCauser, - .openAsChild = cc4group_openAsChild + .openAsChild = cc4group_openAsChild, + .isChild = cc4group_isChild }; -- cgit v1.2.3-54-g00ecf