From dcfb6a883618d02eb2ac814a0c204e71ec2998dc Mon Sep 17 00:00:00 2001 From: Stefan Rueger Date: Fri, 26 Apr 2024 23:31:23 +0100 Subject: [PATCH] Utilise magic memory tree interface for src/whereami.h --- src/whereami.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/whereami.h b/src/whereami.h index d5edffb8..0eabee7c 100644 --- a/src/whereami.h +++ b/src/whereami.h @@ -23,7 +23,7 @@ extern "C" { * Usage: * - first call `int length = wai_getExecutablePath(NULL, 0, NULL);` to * retrieve the length of the path - * - allocate the destination buffer with `path = (char*)malloc(length + 1);` + * - allocate the destination buffer with `path = (char*) mmt_malloc(length + 1);` * - call `wai_getExecutablePath(path, length, NULL)` again to retrieve the * path * - add a terminal NUL character with `path[length] = '\0';` @@ -45,7 +45,7 @@ int WAI_PREFIX(getExecutablePath)(char* out, int capacity, int* dirname_length); * Usage: * - first call `int length = wai_getModulePath(NULL, 0, NULL);` to retrieve * the length of the path - * - allocate the destination buffer with `path = (char*)malloc(length + 1);` + * - allocate the destination buffer with `path = (char*) mmt_malloc(length + 1);` * - call `wai_getModulePath(path, length, NULL)` again to retrieve the path * - add a terminal NUL character with `path[length] = '\0';` * @@ -64,4 +64,4 @@ int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length); } #endif -#endif // #ifndef WHEREAMI_H \ No newline at end of file +#endif // #ifndef WHEREAMI_H