1 #ifndef _PYGSL_STRING_HELPERS_H_
2 #define _PYGSL_STRING_HELPERS_H_ 1
3 #include <pygsl/intern.h>
4 
5 #undef __BEGIN_DECLS
6 #undef __END_DECLS
7 #ifdef __cplusplus
8 # define __BEGIN_DECLS extern "C" {
9 # define __END_DECLS }
10 #else
11 # define __BEGIN_DECLS /* empty */
12 # define __END_DECLS /* empty */
13 #endif
14 __BEGIN_DECLS
15 
16 #define PyGSL_string_from_string PyUnicode_FromString
17 #define PyGSL_string_check       PyUnicode_Check
18 
19 char *
20 PyGSL_string_as_string(PyObject *);
21 
22 #ifndef _PyGSL_API_MODULE
23 /* uses PyBytes_AsString */
24 #define PyGSL_string_as_string  (*(PyObject (*)(PyObject *)) PyGSL_API[PyGSL_string_as_string_NUM])
25 #endif  /* _PyGSL_API_MODULE */
26 
27 __END_DECLS
28 #endif /* _PYGSL_STRING_HELPERS_H_ */
29