Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions kiva/agg/src/agg_std_string.i
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@
{
$1 = new std::string((char *)PyBytes_AsString($input));
}
#if PY_VERSION_HEX >= 0x03030000
else if (PyUnicode_Check($input))
{
$1 = new std::string((char *)PyUnicode_AsUTF8($input));
}
#endif
else
{
PyErr_SetString (PyExc_TypeError, "not a String");
Expand Down
8 changes: 0 additions & 8 deletions kiva/agg/src/agg_typemaps.i
Original file line number Diff line number Diff line change
Expand Up @@ -353,18 +353,10 @@
{
$1 = (char *)PyBytes_AsString($input);
}
#if PY_VERSION_HEX >= 0x03030000
else if (PyUnicode_Check($input))
{
$1 = (char *)PyUnicode_AsUTF8($input);
}
#elif PY_VERSION_HEX < 0x03000000
else if (PyUnicode_Check($input))
{
utfstr = PyUnicode_AsUTF8String($input);
$1 = (char *)PyString_AsString(utfstr);
}
#endif
else
{
PyErr_SetString(PyExc_TypeError, "not a string");
Expand Down
4 changes: 0 additions & 4 deletions kiva/agg/src/win32/plat_support.i
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,7 @@ namespace agg24
// unsigned value. It is cleared at the end of this file.
%typemap(in) unsigned
{
%#if PY_VERSION_HEX < 0x03000000
PyObject* obj = PyNumber_Int($input);
%#else
PyObject* obj = PyNumber_Long($input);
%#endif
if (PyErr_Occurred()) SWIG_fail;
$1 = (unsigned) PyLong_AsLong(obj);
if (PyErr_Occurred()) SWIG_fail;
Expand Down
2 changes: 0 additions & 2 deletions kiva/gl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
# is also available online at http://www.enthought.com/licenses/BSD.txt
#
# Thanks for using Enthought open source!
from __future__ import absolute_import, print_function

import ctypes
from math import floor
import sys
Expand Down
2 changes: 0 additions & 2 deletions kiva/gl/src/swig/agg_std_string.i
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@
{
$1 = new std::string((char *)PyBytes_AsString($input));
}
#if PY_VERSION_HEX >= 0x03030000
else if (PyUnicode_Check($input))
{
$1 = new std::string((char *)PyUnicode_AsUTF8($input));
}
#endif
else
{
PyErr_SetString (PyExc_TypeError, "not a String");
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def macos_extensions():
for framework in frameworks:
extra_link_args.extend(['-framework', framework])

return[
return [
Extension(
'kiva.quartz.ABCGI',
sources=[
Expand Down