diff options
Diffstat (limited to 'src/sys/include/lib/ptrbox.h')
-rw-r--r-- | src/sys/include/lib/ptrbox.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sys/include/lib/ptrbox.h b/src/sys/include/lib/ptrbox.h index a84a760..025ac06 100644 --- a/src/sys/include/lib/ptrbox.h +++ b/src/sys/include/lib/ptrbox.h @@ -96,4 +96,16 @@ int ptrbox_terminate(struct ptrbox *box); */ void *ptrbox_alloc(size_t len, struct ptrbox *box); +/* + * Duplicate a string and store it in a + * pointer box + * + * @s: String to duplicate + * @box: Box to do tracking + * + * Returns new heap string on success, otherwise NULL + * on failure + */ +char *ptrbox_strdup(const char *s, struct ptrbox *box); + #endif /* !_PTRBOX_H_ */ |