Skip to content

Commit 165e812

Browse files
Fixed a build issue with python 2.7.
Signed-off-by: David Rebbe <drebbe@intrepidcs.com>
1 parent 86fcfa5 commit 165e812

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

include/object_vcan412_settings.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
#define VCAN412_SETTINGS_OBJECT_NAME "Vcan412Settings"
2121

22+
#if PY_MAJOR_VERSION < 3
23+
#define PyUnicode_CompareWithASCIIString(uni, string) strcmp(PyString_AsString(uni), string)
24+
#endif
25+
2226

2327
typedef struct {
2428
PyObject_HEAD

include/object_vividcan_settings.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919

2020
#define VIVIDCAN_SETTINGS_OBJECT_NAME "VividCANSettings"
2121

22+
#if PY_MAJOR_VERSION < 3
23+
#define PyUnicode_CompareWithASCIIString(uni, string) strcmp(PyString_AsString(uni), string)
24+
#endif
2225

2326
typedef struct {
2427
PyObject_HEAD

0 commit comments

Comments
 (0)