File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,26 +37,17 @@ typedef int Py_ssize_t;
3737
3838#if PY_MAJOR_VERSION >= 3
3939#define PY3K 1
40- #define PyString_FromStringAndSize PyUnicode_FromStringAndSize
4140
4241#define PyString_AsString PyUnicode_AsUTF8
43- #define PyString_AsUtf8AndSize PyUnicode_AsUTF8AndSize
4442
4543#define PyCreateDummyObject PyModule_New
4644
4745#define PyString_FSConverter PyUnicode_FSConverter
4846#else // PY3K
4947
50- #define PyBytes_FromStringAndSize PyString_FromStringAndSize
51-
5248#define PyBytes_AsString PyString_AsString
5349#define PyBytes_AsStringAndSize PyString_AsStringAndSize
5450
55- static inline char * PyString_AsUtf8AndSize (PyObject * obj , Py_ssize_t * length ) {
56- char * buffer = NULL ;
57- return (PyString_AsStringAndSize (obj , & buffer , length ) < 0 ) ? (char * )(0 ) : buffer ;
58- }
59-
6051static inline PyObject * PyCreateDummyObject (const char * name ) {
6152 PyObject * tmp = Py_InitModule (name , NULL );
6253 Py_INCREF (tmp );
You can’t perform that action at this time.
0 commit comments