12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #pragma once
- #ifdef WA_STR_EXPORT
- #include <bfc/platform/export.h>
- #define DLLIMPORT DLLEXPORT
- #else
- #define DLLIMPORT
- #endif
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define WA_STR_STATIC(x) ((wa_str)"\0\0\0\0" ## x);
- typedef void *wa_str;
- DLLIMPORT wa_str wa_strdup(const char *);
- DLLIMPORT wa_str wa_str_retain(wa_str str);
- DLLIMPORT void wa_str_release(wa_str str);
- DLLIMPORT const char *wa_str_get(wa_str str);
- DLLIMPORT void wa_str_strcpy(wa_str str, char *dest, size_t destlen);
- DLLIMPORT wa_str wa_str_malloc(size_t len, char **data);
- DLLIMPORT wa_str wa_str_own(char *ptr, void (*free_func)(char *));
- typedef void (*WA_STR_FREE_FUNC)(char *);
- #ifdef __cplusplus
- }
- #endif
|