pycore_fileutils.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef Py_INTERNAL_FILEUTILS_H
  2. #define Py_INTERNAL_FILEUTILS_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #ifndef Py_BUILD_CORE
  7. # error "Py_BUILD_CORE must be defined to include this header"
  8. #endif
  9. #include <locale.h> /* struct lconv */
  10. PyAPI_DATA(int) _Py_HasFileSystemDefaultEncodeErrors;
  11. PyAPI_FUNC(int) _Py_DecodeUTF8Ex(
  12. const char *arg,
  13. Py_ssize_t arglen,
  14. wchar_t **wstr,
  15. size_t *wlen,
  16. const char **reason,
  17. _Py_error_handler errors);
  18. PyAPI_FUNC(int) _Py_EncodeUTF8Ex(
  19. const wchar_t *text,
  20. char **str,
  21. size_t *error_pos,
  22. const char **reason,
  23. int raw_malloc,
  24. _Py_error_handler errors);
  25. PyAPI_FUNC(wchar_t*) _Py_DecodeUTF8_surrogateescape(
  26. const char *arg,
  27. Py_ssize_t arglen,
  28. size_t *wlen);
  29. PyAPI_FUNC(int) _Py_GetForceASCII(void);
  30. /* Reset "force ASCII" mode (if it was initialized).
  31. This function should be called when Python changes the LC_CTYPE locale,
  32. so the "force ASCII" mode can be detected again on the new locale
  33. encoding. */
  34. PyAPI_FUNC(void) _Py_ResetForceASCII(void);
  35. PyAPI_FUNC(int) _Py_GetLocaleconvNumeric(
  36. struct lconv *lc,
  37. PyObject **decimal_point,
  38. PyObject **thousands_sep);
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42. #endif /* !Py_INTERNAL_FILEUTILS_H */