source:
pyyaml/trunk/ext/_yaml.h
@
335
| Revision 335, 341 bytes checked in by xi, 4 years ago (diff) |
|---|
| Line | |
|---|---|
| 1 | |
| 2 | #include <yaml.h> |
| 3 | |
| 4 | #if PY_MAJOR_VERSION < 3 |
| 5 | |
| 6 | #define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict") |
| 7 | |
| 8 | #else |
| 9 | |
| 10 | #define PyString_CheckExact PyBytes_CheckExact |
| 11 | #define PyString_AS_STRING PyBytes_AS_STRING |
| 12 | #define PyString_GET_SIZE PyBytes_GET_SIZE |
| 13 | #define PyString_FromStringAndSize PyBytes_FromStringAndSize |
| 14 | |
| 15 | #endif |
Note: See TracBrowser
for help on using the repository browser.
