| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cc58607 commit fc0c773
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,26 +38,12 @@ | |||
| 38 | 38 | #ifndef __PyCXX_wrap_python_hxx__ | |
| 39 | 39 | #define __PyCXX_wrap_python_hxx__ | |
| 40 | 40 | ||
| 41 | + /* Python API mandates Python.h is included *first* */ | ||
| 42 | + #include "Python.h" | ||
| 43 | + | ||
| 41 | 44 | // On some platforms we have to include time.h to get select defined | |
| 42 | 45 | #if !defined(__WIN32__) && !defined(WIN32) && !defined(_WIN32) && !defined(_WIN64) | |
| 43 | 46 | #include <sys/time.h> | |
| 44 | 47 | #endif | |
| 45 | 48 | ||
| 46 | - // Prevent multiple conflicting definitions of swab from stdlib.h and unistd.h | ||
| 47 | - #if defined(__sun) || defined(sun) | ||
| 48 | - #if defined(_XPG4) | ||
| 49 | - #undef _XPG4 | ||
| 50 | - #endif | ||
| 51 | - #if defined(_XPG3) | ||
| 52 | - #undef _XPG3 | ||
| 53 | - #endif | ||
| 54 | - #endif | ||
| 55 | - | ||
| 56 | - // Python.h will redefine these and generate warning in the process | ||
| 57 | - #undef _XOPEN_SOURCE | ||
| 58 | - #undef _POSIX_C_SOURCE | ||
| 59 | - | ||
| 60 | - // pull in python definitions | ||
| 61 | - #include <Python.h> | ||
| 62 | - | ||
| 63 | 49 | #endif | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,11 +1,11 @@ | |||
| 1 | 1 | /* A rewrite of _backend_agg using PyCXX to handle ref counting, etc.. | |
| 2 | 2 | */ | |
| 3 | - #include <png.h> | ||
| 4 | 3 | ||
| 5 | - // To remove a gcc warning | ||
| 6 | - #ifdef _POSIX_C_SOURCE | ||
| 7 | - #undef _POSIX_C_SOURCE | ||
| 8 | - #endif | ||
| 4 | + /* Python API mandates Python.h is included *first* */ | ||
| 5 | + #include "Python.h" | ||
| 6 | + | ||
| 7 | + #define PNG_SKIP_SETJMP_CHECK | ||
| 8 | + #include <png.h> | ||
| 9 | 9 | ||
| 10 | 10 | #include "ft2font.h" | |
| 11 | 11 | #include "_image.h" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,8 +1,4 @@ | |||
| 1 | - // To remove a gcc warning | ||
| 2 | - #ifdef _POSIX_C_SOURCE | ||
| 3 | - #undef _POSIX_C_SOURCE | ||
| 4 | - #endif | ||
| 5 | - | ||
| 1 | + /* Python API mandates Python.h is included *first* */ | ||
| 6 | 2 | #include "Python.h" | |
| 7 | 3 | #include <string> | |
| 8 | 4 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,9 +1,8 @@ | |||
| 1 | - #include <png.h> | ||
| 1 | + /* Python API mandates Python.h is included *first* */ | ||
| 2 | + #include "Python.h" | ||
| 2 | 3 | ||
| 3 | - // To remove a gcc warning | ||
| 4 | - #ifdef _POSIX_C_SOURCE | ||
| 5 | - #undef _POSIX_C_SOURCE | ||
| 6 | - #endif | ||
| 4 | + #define PNG_SKIP_SETJMP_CHECK | ||
| 5 | + #include <png.h> | ||
| 7 | 6 | ||
| 8 | 7 | // TODO: Un CXX-ify this module | |
| 9 | 8 | #include "CXX/Extensions.hxx" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments