File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 11===========
22 Changelog
33===========
4+ current
5+ * fixed errors with Unicode literals on Python 2
6+
471.5.0
58 * python-tdl distributions are now universal builds
69 * new Map class
710 * map.bresenham now returns a list
8- * this release will require libtcod-cffi 0 .2.3 or later
11+ * this release will require libtcod-cffi v0 .2.3 or later
912
10131.4.0
1114 * The DLL's have been moved into another library which you can find at https://github.com/HexDecimal/libtcod-cffi
Original file line number Diff line number Diff line change 5959 @undocumented: style
6060"""
6161
62+ from __future__ import (absolute_import , division ,
63+ print_function , unicode_literals )
64+
6265import sys as _sys
6366import os as _os
6467
8689else :
8790 _INTTYPES = (int , long )
8891 _NUMTYPES = (int , long , float )
89- _STRTYPES = (str ,)
92+ _STRTYPES = (str , unicode )
9093
9194def _encodeString (string ): # still used for filepaths, and that's about it
9295 "changes string into bytes if running in python 3, for sending to ctypes"
93- if _IS_PYTHON3 and isinstance (string , str ):
96+ if isinstance (string , _STRTYPES ):
9497 return string .encode ()
9598 return string
9699
@@ -108,7 +111,7 @@ def _format_char(char):
108111 try :
109112 return int (char ) # allow all int-like objects
110113 except :
111- raise TypeError ('char single character string, integer, or None\n Received: ' + repr (color ))
114+ raise TypeError ('char single character string, integer, or None\n Received: ' + repr (char ))
112115
113116_utf32_codec = {'little' : 'utf-32le' , 'big' : 'utf-32le' }[_sys .byteorder ]
114117
You can’t perform that action at this time.
0 commit comments