summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2007-10-22 01:13:52 +0000
committerBob Ippolito <bob@redivi.com>2007-10-22 01:13:52 +0000
commit1a7035f18fdb435a0d645f8a202d8b1ecf9c1bef (patch)
tree392f19c044dbcb51b96e84f53881a6ffd618b670
parentfc29185b6b19796284ed0ce7f7f7451ba197aef4 (diff)
downloadsimplejson-1a7035f18fdb435a0d645f8a202d8b1ecf9c1bef.tar.gz
fix windows build
git-svn-id: http://simplejson.googlecode.com/svn/trunk@57 a4795897-2c25-0410-b006-0d3caba88fa1
-rw-r--r--setup.py2
-rw-r--r--simplejson/__init__.py2
-rw-r--r--simplejson/_speedups.c10
3 files changed, 10 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 5b0c57f..787df74 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@ from setuptools import setup, find_packages, Extension, Feature
from distutils.command.build_ext import build_ext
from distutils.errors import CCompilerError
-VERSION = '1.7.3'
+VERSION = '1.7.4'
DESCRIPTION = "Simple, fast, extensible JSON encoder/decoder for Python"
LONG_DESCRIPTION = """
simplejson is a simple, fast, complete, correct and extensible
diff --git a/simplejson/__init__.py b/simplejson/__init__.py
index 38d6229..9b87225 100644
--- a/simplejson/__init__.py
+++ b/simplejson/__init__.py
@@ -86,7 +86,7 @@ Extending JSONEncoder::
Note that the JSON produced by this module's default settings
is a subset of YAML, so it may be used as a serializer for that as well.
"""
-__version__ = '1.7.3'
+__version__ = '1.7.4'
__all__ = [
'dump', 'dumps', 'load', 'loads',
'JSONDecoder', 'JSONEncoder',
diff --git a/simplejson/_speedups.c b/simplejson/_speedups.c
index 8f290bb..4aec693 100644
--- a/simplejson/_speedups.c
+++ b/simplejson/_speedups.c
@@ -5,6 +5,12 @@ typedef int Py_ssize_t;
#define PY_SSIZE_T_MIN INT_MIN
#endif
+#ifdef __GNUC__
+#define UNUSED __attribute__((__unused__))
+#else
+#define UNUSED
+#endif
+
static Py_ssize_t
ascii_escape_char(Py_UNICODE c, char *output, Py_ssize_t chars);
static PyObject *
@@ -12,7 +18,7 @@ ascii_escape_unicode(PyObject *pystr);
static PyObject *
ascii_escape_str(PyObject *pystr);
static PyObject *
-py_encode_basestring_ascii(PyObject* self __attribute__((__unused__)), PyObject *pystr);
+py_encode_basestring_ascii(PyObject* self UNUSED, PyObject *pystr);
void init_speedups(void);
#define S_CHAR(c) (c >= ' ' && c <= '~' && c != '\\' && c != '/' && c != '"')
@@ -183,7 +189,7 @@ PyDoc_STRVAR(pydoc_encode_basestring_ascii,
);
static PyObject *
-py_encode_basestring_ascii(PyObject* self __attribute__((__unused__)), PyObject *pystr) {
+py_encode_basestring_ascii(PyObject* self UNUSED, PyObject *pystr) {
/* METH_O */
if (PyString_Check(pystr)) {
return ascii_escape_str(pystr);