Commit a2ae0a10 authored by David Gobbi's avatar David Gobbi Committed by Kitware Robot
Browse files

Merge topic 'py3_fixes2' into release

b80ecbf0

 Fix errors related to missing PyInt_AsLong and PyString_AsString on Python 3
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !1082
parents 4d6be94b b80ecbf0
......@@ -13,6 +13,7 @@
=========================================================================*/
#include "vtkPython.h" // must be the first thing that's included.
#include "vtkPythonCompatibility.h"
#include "vtkMatplotlibMathTextUtilities.h"
#include "vtkCommand.h"
......
......@@ -49,6 +49,9 @@
#define PyUnicode_DecodeLocaleAndSize PyUnicode_DecodeFSDefaultAndSize
#define PyUnicode_DecodeLocale PyUnicode_DecodeFSDefault
#define PyUnicode_EncodeLocale(o,e) PyUnicode_EncodeFSDefault(o)
#define PyString_AsString _PyUnicode_AsString
#else
#define PyString_AsString PyUnicode_AsUTF8
#endif
// Buffer compatibility
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment