diff options
-rw-r--r-- | CHANGES.txt | 5 | ||||
-rw-r--r-- | conf.py | 2 | ||||
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | simplejson/__init__.py | 2 | ||||
-rw-r--r-- | simplejson/_speedups.c | 8 |
5 files changed, 13 insertions, 6 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 8f0bcc1..c915fe3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,8 @@ +Version 3.0.8 released 2013-02-19 + +* Fix a Python 2.x compiler warning for narrow unicode builds + https://github.com/simplejson/simplejson/issues/56 + Version 3.0.7 released 2013-01-11 * NOTE: this release only changes the license. @@ -44,7 +44,7 @@ copyright = '2012, Bob Ippolito' # The short X.Y version. version = '3.0' # The full version, including alpha/beta/rc tags. -release = '3.0.7' +release = '3.0.8' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: @@ -8,7 +8,7 @@ from distutils.errors import CCompilerError, DistutilsExecError, \ DistutilsPlatformError IS_PYPY = hasattr(sys, 'pypy_translation_info') -VERSION = '3.0.7' +VERSION = '3.0.8' DESCRIPTION = "Simple, fast, extensible JSON encoder/decoder for Python" with open('README.rst', 'r') as f: diff --git a/simplejson/__init__.py b/simplejson/__init__.py index 7e82827..2cba948 100644 --- a/simplejson/__init__.py +++ b/simplejson/__init__.py @@ -99,7 +99,7 @@ Using simplejson.tool from the shell to validate and pretty-print:: Expecting property name: line 1 column 2 (char 2) """ from __future__ import absolute_import -__version__ = '3.0.7' +__version__ = '3.0.8' __all__ = [ 'dump', 'dumps', 'load', 'loads', 'JSONDecoder', 'JSONDecodeError', 'JSONEncoder', diff --git a/simplejson/_speedups.c b/simplejson/_speedups.c index ae5b567..ae6044b 100644 --- a/simplejson/_speedups.c +++ b/simplejson/_speedups.c @@ -486,11 +486,13 @@ ascii_char_size(JSON_UNICHR c) c == '\t') { return 2; } - else if (c < 0x10000U) { - return MIN_EXPANSION; +#if defined(Py_UNICODE_WIDE) || PY_MAJOR_VERSION >= 3 + else if (c >= 0x10000U) { + return 2 * MIN_EXPANSION; } +#endif else { - return 2 * MIN_EXPANSION; + return MIN_EXPANSION; } } |