NDEString.h 686 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. Ben Allison [email protected] Nov 14 2007
  3. Simple reference counted string, to avoid a whole bunch of _wcsdup's in NDE and ml_local
  4. */
  5. #pragma once
  6. #include "foundation/types.h"
  7. #include "nx/nxstring.h"
  8. enum
  9. {
  10. STRING_IS_WCHAR=0,
  11. STRING_IS_NDESTRING=1,
  12. };
  13. #include "nde_defines.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. NDE_API wchar_t *ndestring_wcsdup(const wchar_t *str);
  18. NDE_API wchar_t *ndestring_wcsndup(const wchar_t *str, size_t n);
  19. NDE_API wchar_t *ndestring_malloc(size_t str_size);
  20. NDE_API void ndestring_release(wchar_t *str);
  21. NDE_API void ndestring_retain(wchar_t *str);
  22. NDE_API nx_string_t ndestring_get_string(wchar_t *str);
  23. #ifdef __cplusplus
  24. }
  25. #endif