ds 0.10.0
A C library to safely yet efficiently work with UTF-8–encoded, growable dynamic strings.
helpers.c
Go to the documentation of this file.
1//! @file ds/helpers.c
2//! @author Avinash Maddikonda (svasssakavi@gmail.com)
3//! @brief Implementation of helper constants and functions.
4//! @since 0.2.0
5//! @date 2023-07-25
6
7#include <stdbool.h>
8#include <stddef.h>
9
10#include "ds/helpers.h"
11
12bool
13ds_helpers_is_null (void const *const ptr)
14{
15 return ptr == NULL;
16}
17
18bool
19ds_helpers_is_instance (void const *const ptr)
20{
21 return !ds_helpers_is_null (ptr);
22}
bool ds_helpers_is_instance(void const *const ptr)
Returns true if ptr is a valid non-NULL pointer.
Definition: helpers.c:19
bool ds_helpers_is_null(void const *const ptr)
Returns true if ptr is NULL.
Definition: helpers.c:13
Declaration of helper constants and functions.