diff --git a/do_not_remove_build_directory_manually.patch b/do_not_remove_build_directory_manually.patch deleted file mode 100644 index 8964d37..0000000 --- a/do_not_remove_build_directory_manually.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 39435177118c9fbc5d3863879c6e4616fd4c12c5 Mon Sep 17 00:00:00 2001 -From: anthraxx -Date: Tue, 26 Jan 2016 14:34:08 +0100 -Subject: [PATCH] do not forcefully remove the build directory manually - -this fixes issue #179. -setuptools should itself know when to use cache or create a -new build... however if someone wants to override that, it's -still possible but forcefully doing that on whatever -setuptools target will (and does) introduce problems. - -Build directory should be cleaned up via the clean sub-command. -examples: -- clean up temp: - python setup.py clean -- clean up whole build dir - python setup.py clean -a - -Or if somebody wants to, the build dir could be removed on the -shell. ---- - setup.py | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/setup.py b/setup.py -index 1e1e220..9f9c8b6 100644 ---- a/setup.py -+++ b/setup.py -@@ -3,7 +3,6 @@ - except ImportError: - from distutils.core import setup, Extension - import distutils.sysconfig --import shutil - import os.path - import re - import sys -@@ -22,11 +21,6 @@ - Programming Language :: Python :: 3.2 - """.splitlines())) - --try: -- shutil.rmtree("./build") --except(OSError): -- pass -- - module1 = Extension('ujson', - sources = ['./python/ujson.c', - './python/objToJSON.c', diff --git a/no-unittest2.patch b/no-unittest2.patch deleted file mode 100644 index eb2ec1e..0000000 --- a/no-unittest2.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: ujson-1.35/tests/tests.py -=================================================================== ---- ujson-1.35.orig/tests/tests.py -+++ ujson-1.35/tests/tests.py -@@ -11,10 +11,7 @@ import json - import math - import time - import pytz --if six.PY2: -- import unittest2 as unittest --else: -- import unittest -+import unittest - - import ujson - diff --git a/python-ujson-system-double-conversion.patch b/python-ujson-system-double-conversion.patch new file mode 100644 index 0000000..d91d8da --- /dev/null +++ b/python-ujson-system-double-conversion.patch @@ -0,0 +1,16 @@ +Index: ujson-2.0.1/setup.py +=================================================================== +--- ujson-2.0.1.orig/setup.py 2020-03-08 09:02:52.000000000 +0100 ++++ ujson-2.0.1/setup.py 2020-03-10 15:01:45.077782242 +0100 +@@ -33,9 +33,9 @@ module1 = Extension( + "./lib/ultrajsonenc.c", + "./lib/ultrajsondec.c", + ], +- include_dirs=["./python", "./lib", "./deps/double-conversion/double-conversion"], ++ include_dirs=["./python", "./lib", "/usr/include/double-conversion"], + extra_compile_args=["-D_GNU_SOURCE"], +- extra_link_args=["-lstdc++", "-lm"], ++ extra_link_args=["-lstdc++", "-lm", "-ldouble-conversion"], + ) + + diff --git a/python-ujson.changes b/python-ujson.changes index 039887b..da2eb99 100644 --- a/python-ujson.changes +++ b/python-ujson.changes @@ -1,3 +1,63 @@ +------------------------------------------------------------------- +Tue Mar 10 13:37:34 UTC 2020 - pgajdos@suse.com + +- version update to 2.0.1 + Added + Include license file in manifest (#288) @kszucs + added "static" to C functions, where possible (#238) @WGH- + bring back benchmark introduction (#234) @rdpate + Add syntax highlighting to README (#255) @adamchainz + Test on new Travis CPUs (#350) @hugovk + Test on GitHub Actions (#348) @hugovk + Test on Python 3.9-dev to avoid surprises (#349) @hugovk + Use Release Drafter to draft releases (#365) @hugovk + Deploy from GitHub Actions instead of Travis CI (#364) @hugovk + Autodeploy to PyPI from Travis CI (#357) @hugovk + Lint with pre-commit: Black, isort, Flake8 (#354) @hugovk + Changed + Use Google's double-conversion lib to fix floating-point precision when converting doubles to and from strings, improves double encoding by 4-5x (eb7d894) @Jahaja + Reduce default buffer on stack size (#281) @ncopa + Update ultrajsondec.c (#260) @markpiekarz + Indent dict values (#217) @orivej + Test with pytest (#363) @hugovk + Less Travis (#361) @hugovk + Update links (#356) @hugovk + Tests: Remove unused, unmaintained blist (#362) @hugovk + Only deploy sdist from Travis CI (#359) @hugovk + Removed + Drop EOL Python 2.5-2.6, 3.2-3.4 and add 3.7-3.8 (#298) @hugovk + Remove serialization of date/datetime objects (50181f0) @Jahaja + Remove double_precision encoding option and precise_float decoding option (eb7d894) @Jahaja + Remove generic serialization of objects/iterables (53f85b1) @Jahaja + Remove support for __json__ method on str (5f98f01) @Jahaja + Remove blist tests (3a6ba52) @Jahaja + Fixed + Fix for sort_keys bug and a typo (870ee48) @Jahaja + Fix for overflowing long causing invalid JSON (409c6d4) @Jahaja + Following std JSON handling of None dict key (ac4637f) + Fix for incorrect order when using OrderedDict (c9f8318) @Jahaja + Fix reference counting bug for dict values (#353) @richafrank + Fix a couple of memory leaks. (#257) @borman + Correct JSON decoding implementation to die on trailing commas in Objects (#323) @timdawborn + fixup dconv_wrapper linkage (#312) @tclh123 + Fix Warning: 'classifiers' should be a list, got type 'filter' (#351) @hugovk + Remove redundant license parameter (#341) @blag + do not forcefully remove the build directory manually (fix #179) (#207) @anthraxx + Merged pull request to fix memory leak. (#1) @Adriandorr + http -> https (#299) @hugovk +- added patches + fix unbundle double-conversion + + python-ujson-system-double-conversion.patch +- deleted patches + - do_not_remove_build_directory_manually.patch (upstreamed) + - no-unittest2.patch (upstreamed) + - ujson-1.35-fix-for-overflowing-long.patch (upstreamed) + - ujson-1.35-fix-ordering-of-orderdict.patch (upstreamed) + - ujson-1.35-sort_keys-segfault.patch (upstreamed) + - ujson-1.35-standard-handling-of-none.patch (upstreamed) + - ujson-1.35-test-depricationwarning.patch (upstreamed) + - ujson-1.35-use-static-where-possible.patch (upstreamed) + ------------------------------------------------------------------- Sun May 12 13:09:01 UTC 2019 - John Vandenberg diff --git a/python-ujson.spec b/python-ujson.spec index b58fb20..7e7aada 100644 --- a/python-ujson.spec +++ b/python-ujson.spec @@ -1,7 +1,7 @@ # # spec file for package python-ujson # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,29 +17,27 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python2 1 Name: python-ujson -Version: 1.35 +Version: 2.0.1 Release: 0 Summary: JSON encoder and decoder for Python License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/esnme/ultrajson Source: https://files.pythonhosted.org/packages/source/u/ujson/ujson-%{version}.tar.gz -# PATCH-FIX-UPSTREAM -- do_not_remove_build_directory_manually.patch -- https://github.com/esnme/ultrajson/issues/179 -Patch0: do_not_remove_build_directory_manually.patch -Patch1: no-unittest2.patch -Patch2: ujson-1.35-fix-for-overflowing-long.patch -Patch3: ujson-1.35-fix-ordering-of-orderdict.patch -Patch4: ujson-1.35-sort_keys-segfault.patch -Patch5: ujson-1.35-standard-handling-of-none.patch -Patch6: ujson-1.35-test-depricationwarning.patch -Patch7: ujson-1.35-use-static-where-possible.patch +# unbundle double-conversion (https://github.com/ultrajson/ultrajson/issues/375) +Patch0: python-ujson-system-double-conversion.patch BuildRequires: %{python_module blist} BuildRequires: %{python_module devel} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytz} +BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} +BuildRequires: double-conversion-devel BuildRequires: fdupes +BuildRequires: gcc-c++ BuildRequires: python-rpm-macros %python_subpackages @@ -53,6 +51,7 @@ decoder experience please checkout ujson4c_, based on UltraJSON. %autopatch -p1 %build +rm -r deps export CFLAGS="%{optflags} -fno-strict-aliasing" %python_build @@ -61,10 +60,7 @@ export CFLAGS="%{optflags} -fno-strict-aliasing" %python_expand %fdupes %{buildroot}%{$python_sitearch} %check -pushd tests -%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch} -$python tests.py -} +%pytest_arch %files %{python_files} %doc README.rst diff --git a/ujson-1.35-fix-for-overflowing-long.patch b/ujson-1.35-fix-for-overflowing-long.patch deleted file mode 100644 index a32e627..0000000 --- a/ujson-1.35-fix-for-overflowing-long.patch +++ /dev/null @@ -1,84 +0,0 @@ -commit 409c6d4006fdea27e746ea397124f98c92a41a92 -Author: Joakim Hamren -Date: Sat Feb 4 04:21:05 2017 +0100 - - Fix for overflowing long causing invalid json - - This was caused by checking for "__json__" using PyObject_HasAttrString - which clears the error set by a previous long overflow. Thus this was dependent - on the order of processing of dict items, which explains why it was - seemingly random as the dict items are likely ordered by a hash of - the key. - - This fixes GH224 and GH240. - -Index: ujson-1.35/python/objToJSON.c -=================================================================== ---- ujson-1.35.orig/python/objToJSON.c -+++ ujson-1.35/python/objToJSON.c -@@ -226,6 +226,21 @@ static void *PyDateToINT64(JSOBJ _obj, J - return NULL; - } - -+static int PyHasAttrStringPreserveErr(PyObject *obj, const char *attr) -+{ -+ int res; -+ PyObject *excType = NULL, *excValue, *excTraceback; -+ -+ if (!PyErr_Occurred()) -+ return PyObject_HasAttrString(obj, "__json__"); -+ -+ PyErr_Fetch(&excType, &excValue, &excTraceback); -+ res = PyObject_HasAttrString(obj, "__json__"); -+ PyErr_Restore(excType, excValue, excTraceback); -+ -+ return res; -+} -+ - int Tuple_iterNext(JSOBJ obj, JSONTypeContext *tc) - { - PyObject *item; -@@ -471,21 +486,21 @@ int Dict_iterNext(JSOBJ obj, JSONTypeCon - GET_TC(tc)->itemName = PyUnicode_AsUTF8String (GET_TC(tc)->itemName); - } - else -- if (!PyString_Check(GET_TC(tc)->itemName)) -- { -- GET_TC(tc)->itemName = PyObject_Str(GET_TC(tc)->itemName); -+ if (!PyString_Check(GET_TC(tc)->itemName)) -+ { -+ GET_TC(tc)->itemName = PyObject_Str(GET_TC(tc)->itemName); - #if PY_MAJOR_VERSION >= 3 -- itemNameTmp = GET_TC(tc)->itemName; -- GET_TC(tc)->itemName = PyUnicode_AsUTF8String (GET_TC(tc)->itemName); -- Py_DECREF(itemNameTmp); -+ itemNameTmp = GET_TC(tc)->itemName; -+ GET_TC(tc)->itemName = PyUnicode_AsUTF8String (GET_TC(tc)->itemName); -+ Py_DECREF(itemNameTmp); - #endif -- } -- else -- { -- Py_INCREF(GET_TC(tc)->itemName); -- } -- PRINTMARK(); -- return 1; -+ } -+ else -+ { -+ Py_INCREF(GET_TC(tc)->itemName); -+ } -+ PRINTMARK(); -+ return 1; - } - - void Dict_iterEnd(JSOBJ obj, JSONTypeContext *tc) -@@ -728,7 +743,7 @@ void Object_beginTypeContext (JSOBJ _obj - return; - } - else -- if (PyString_Check(obj) && !PyObject_HasAttrString(obj, "__json__")) -+ if (PyString_Check(obj) && !PyHasAttrStringPreserveErr(obj, "__json__")) - { - PRINTMARK(); - pc->PyTypeToJSON = PyStringToUTF8; tc->type = JT_UTF8; diff --git a/ujson-1.35-fix-ordering-of-orderdict.patch b/ujson-1.35-fix-ordering-of-orderdict.patch deleted file mode 100644 index 23dcabd..0000000 --- a/ujson-1.35-fix-ordering-of-orderdict.patch +++ /dev/null @@ -1,122 +0,0 @@ -commit c9f8318bd823ae9d44797b6b881a2b3e22cdbade -Author: Joakim Hamren -Date: Tue Feb 7 02:02:38 2017 +0100 - - Fix for incorrect order when using OrderedDict - -Index: ujson-1.35/python/objToJSON.c -=================================================================== ---- ujson-1.35.orig/python/objToJSON.c -+++ ujson-1.35/python/objToJSON.c -@@ -474,8 +474,13 @@ int Dict_iterNext(JSOBJ obj, JSONTypeCon - GET_TC(tc)->itemName = NULL; - } - -+ if (!(GET_TC(tc)->itemName = PyIter_Next(GET_TC(tc)->iterator))) -+ { -+ PRINTMARK(); -+ return 0; -+ } - -- if (!PyDict_Next ( (PyObject *)GET_TC(tc)->dictObj, &GET_TC(tc)->index, &GET_TC(tc)->itemName, &GET_TC(tc)->itemValue)) -+ if (!(GET_TC(tc)->itemValue = PyObject_GetItem(GET_TC(tc)->dictObj, GET_TC(tc)->itemName))) - { - PRINTMARK(); - return 0; -@@ -510,6 +515,7 @@ void Dict_iterEnd(JSOBJ obj, JSONTypeCon - Py_DECREF(GET_TC(tc)->itemName); - GET_TC(tc)->itemName = NULL; - } -+ Py_CLEAR(GET_TC(tc)->iterator); - Py_DECREF(GET_TC(tc)->dictObj); - PRINTMARK(); - } -@@ -641,20 +647,23 @@ char *SortedDict_iterGetName(JSOBJ obj, - - void SetupDictIter(PyObject *dictObj, TypeContext *pc, JSONObjectEncoder *enc) - { -- if (enc->sortKeys) { -+ pc->dictObj = dictObj; -+ if (enc->sortKeys) -+ { - pc->iterEnd = SortedDict_iterEnd; - pc->iterNext = SortedDict_iterNext; - pc->iterGetValue = SortedDict_iterGetValue; - pc->iterGetName = SortedDict_iterGetName; -+ pc->index = 0; - } -- else { -+ else -+ { - pc->iterEnd = Dict_iterEnd; - pc->iterNext = Dict_iterNext; - pc->iterGetValue = Dict_iterGetValue; - pc->iterGetName = Dict_iterGetName; -+ pc->iterator = PyObject_GetIter(dictObj); - } -- pc->dictObj = dictObj; -- pc->index = 0; - } - - void Object_beginTypeContext (JSOBJ _obj, JSONTypeContext *tc, JSONObjectEncoder *enc) -@@ -662,7 +671,8 @@ void Object_beginTypeContext (JSOBJ _obj - PyObject *obj, *exc, *iter; - TypeContext *pc; - PRINTMARK(); -- if (!_obj) { -+ if (!_obj) -+ { - tc->type = JT_INVALID; - return; - } -Index: ujson-1.35/tests/tests.py -=================================================================== ---- ujson-1.35.orig/tests/tests.py -+++ ujson-1.35/tests/tests.py -@@ -10,6 +10,8 @@ import decimal - import json - import math - import time -+from collections import OrderedDict -+ - import pytz - import unittest - -@@ -417,6 +419,10 @@ class UltraJSONTests(unittest.TestCase): - input = -float('inf') - self.assertRaises(OverflowError, ujson.encode, input) - -+ def test_encodeOrderedDict(self): -+ input = OrderedDict([(1, 1), (0, 0), (8, 8), (2, 2)]) -+ self.assertEqual('{"1":1,"0":0,"8":8,"2":2}', ujson.encode(input)) -+ - def test_decodeJibberish(self): - input = "fdsa sda v9sa fdsa" - self.assertRaises(ValueError, ujson.decode, input) -@@ -720,7 +726,7 @@ class UltraJSONTests(unittest.TestCase): - d = {u'key': JSONTest()} - output = ujson.encode(d) - dec = ujson.decode(output) -- self.assertEquals(dec, {u'key': output_text}) -+ self.assertEqual(dec, {u'key': output_text}) - - def test_object_with_json_unicode(self): - # If __json__ returns a string, then that string -@@ -733,7 +739,7 @@ class UltraJSONTests(unittest.TestCase): - d = {u'key': JSONTest()} - output = ujson.encode(d) - dec = ujson.decode(output) -- self.assertEquals(dec, {u'key': output_text}) -+ self.assertEqual(dec, {u'key': output_text}) - - def test_object_with_complex_json(self): - # If __json__ returns a string, then that string -@@ -746,7 +752,7 @@ class UltraJSONTests(unittest.TestCase): - d = {u'key': JSONTest()} - output = ujson.encode(d) - dec = ujson.decode(output) -- self.assertEquals(dec, {u'key': obj}) -+ self.assertEqual(dec, {u'key': obj}) - - def test_object_with_json_type_error(self): - # __json__ must return a string, otherwise it should raise an error. diff --git a/ujson-1.35-sort_keys-segfault.patch b/ujson-1.35-sort_keys-segfault.patch deleted file mode 100644 index 63191d8..0000000 --- a/ujson-1.35-sort_keys-segfault.patch +++ /dev/null @@ -1,73 +0,0 @@ -commit 870ee48fe109c289033cd0b7543b6f5ea4e6f128 -Author: Joakim Hamren -Date: Sat Feb 4 01:07:52 2017 +0100 - - Fixes for sort_keys bug and a typo. - - - Fixed segfault when using sort_keys=True on dict with unorderable keys (GH247) - - - Fixed refcount becoming negative when using sort_keys=True (GH243) - - - Fixed compile error when defining JSON_NO_EXTRA_WHITESPACE - caused by a wrongly named variable. (GH245) - -Index: ujson-1.35/lib/ultrajsonenc.c -=================================================================== ---- ujson-1.35.orig/lib/ultrajsonenc.c -+++ ujson-1.35/lib/ultrajsonenc.c -@@ -718,7 +718,7 @@ void encode(JSOBJ obj, JSONObjectEncoder - { - const char *value; - char *objName; -- int count; -+ int count, res; - JSOBJ iterObj; - size_t szlen; - JSONTypeContext tc; -@@ -792,7 +792,7 @@ void encode(JSOBJ obj, JSONObjectEncoder - { - Buffer_AppendCharUnchecked (enc, ','); - #ifndef JSON_NO_EXTRA_WHITESPACE -- Buffer_AppendCharUnchecked (buffer, ' '); -+ Buffer_AppendCharUnchecked (enc, ' '); - #endif - Buffer_AppendIndentNewlineUnchecked (enc); - } -@@ -819,8 +819,16 @@ void encode(JSOBJ obj, JSONObjectEncoder - Buffer_AppendCharUnchecked (enc, '{'); - Buffer_AppendIndentNewlineUnchecked (enc); - -- while (enc->iterNext(obj, &tc)) -+ while ((res = enc->iterNext(obj, &tc))) - { -+ if(res < 0) -+ { -+ enc->iterEnd(obj, &tc); -+ enc->endTypeContext(obj, &tc); -+ enc->level--; -+ return; -+ } -+ - if (count > 0) - { - Buffer_AppendCharUnchecked (enc, ','); -Index: ujson-1.35/python/objToJSON.c -=================================================================== ---- ujson-1.35.orig/python/objToJSON.c -+++ ujson-1.35/python/objToJSON.c -@@ -558,6 +558,7 @@ int SortedDict_iterNext(JSOBJ obj, JSONT - // Sort the list. - if (PyList_Sort(items) < 0) - { -+ PyErr_SetString(PyExc_ValueError, "unorderable keys"); - goto error; - } - -@@ -628,7 +629,6 @@ void SortedDict_iterEnd(JSOBJ obj, JSONT - { - GET_TC(tc)->itemName = NULL; - GET_TC(tc)->itemValue = NULL; -- Py_DECREF(GET_TC(tc)->newObj); - Py_DECREF(GET_TC(tc)->dictObj); - PRINTMARK(); - } diff --git a/ujson-1.35-standard-handling-of-none.patch b/ujson-1.35-standard-handling-of-none.patch deleted file mode 100644 index 913215e..0000000 --- a/ujson-1.35-standard-handling-of-none.patch +++ /dev/null @@ -1,77 +0,0 @@ -commit ac4637fbc4e72bd59f221d9bba19127820d21023 -Author: Joakim Hamren -Date: Sat Feb 4 16:36:14 2017 +0100 - - Following std json handling of None dict key - - Previously a None dict item key would be outputted in JSON as "None". - To better align with the standard json module this was changed to output - "null". There's no proper representation of null object keys in JSON so - this is implementation specific but it seems more natural to follow - suit when it can be done without a significant performance hit. - - Added and used branch prediction macros (LIKELY/UNLIKELY) as well. - -diff --git a/lib/ultrajson.h b/lib/ultrajson.h -index 6c1dbc1..ca82a29 100644 ---- a/lib/ultrajson.h -+++ b/lib/ultrajson.h -@@ -117,6 +117,14 @@ typedef uint32_t JSUINT32; - - #define INLINE_PREFIX inline - -+#ifdef __GNUC__ -+#define LIKELY(x) __builtin_expect(!!(x), 1) -+#define UNLIKELY(x) __builtin_expect(!!(x), 0) -+#else -+#define LIKELY(x) (x) -+#define UNLIKELY(x) (x) -+#endif -+ - typedef uint8_t JSUINT8; - typedef uint16_t JSUTF16; - typedef uint32_t JSUTF32; -diff --git a/python/objToJSON.c b/python/objToJSON.c -index adea2f6..41d4289 100644 ---- a/python/objToJSON.c -+++ b/python/objToJSON.c -@@ -488,6 +488,12 @@ static int Dict_iterNext(JSOBJ obj, JSONTypeContext *tc) - else - if (!PyString_Check(GET_TC(tc)->itemName)) - { -+ if (UNLIKELY(GET_TC(tc)->itemName == Py_None)) -+ { -+ GET_TC(tc)->itemName = PyString_FromString("null"); -+ return 1; -+ } -+ - GET_TC(tc)->itemName = PyObject_Str(GET_TC(tc)->itemName); - #if PY_MAJOR_VERSION >= 3 - itemNameTmp = GET_TC(tc)->itemName; -@@ -743,7 +749,7 @@ static void Object_beginTypeContext (JSOBJ _obj, JSONTypeContext *tc, JSONObject - return; - } - else -- if (PyString_Check(obj) && !PyHasAttrStringPreserveErr(obj, "__json__")) -+ if (PyString_Check(obj) && LIKELY(!PyHasAttrStringPreserveErr(obj, "__json__"))) - { - PRINTMARK(); - pc->PyTypeToJSON = PyStringToUTF8; tc->type = JT_UTF8; -@@ -837,7 +843,7 @@ ISITERABLE: - } - */ - -- if (PyObject_HasAttrString(obj, "toDict")) -+ if (UNLIKELY(PyObject_HasAttrString(obj, "toDict"))) - { - PyObject* toDictFunc = PyObject_GetAttrString(obj, "toDict"); - PyObject* tuple = PyTuple_New(0); -@@ -863,7 +869,7 @@ ISITERABLE: - return; - } - else -- if (PyObject_HasAttrString(obj, "__json__")) -+ if (UNLIKELY(PyObject_HasAttrString(obj, "__json__"))) - { - PyObject* toJSONFunc = PyObject_GetAttrString(obj, "__json__"); - PyObject* tuple = PyTuple_New(0); diff --git a/ujson-1.35-test-depricationwarning.patch b/ujson-1.35-test-depricationwarning.patch deleted file mode 100644 index 7c0bdb9..0000000 --- a/ujson-1.35-test-depricationwarning.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ujson-1.35.orig/tests/tests.py 2017-04-14 18:14:36.298345782 -0700 -+++ ujson-1.35/tests/tests.py 2017-04-14 18:14:47.899947795 -0700 -@@ -702,7 +702,7 @@ - - output = ujson.encode(ObjectTest()) - dec = ujson.decode(output) -- self.assertEquals(dec, {}) -+ self.assertEqual(dec, {}) - - def test_toDict(self): - d = {"key": 31337} diff --git a/ujson-1.35-use-static-where-possible.patch b/ujson-1.35-use-static-where-possible.patch deleted file mode 100644 index 9a81ab0..0000000 --- a/ujson-1.35-use-static-where-possible.patch +++ /dev/null @@ -1,591 +0,0 @@ -commit 6cf6c7ff25c883349e8e9e5468e61498358e2e91 -Author: WGH -Date: Sat Aug 27 17:34:22 2016 +0300 - - added "static" to C functions, where possible - - 1. It reduces clutter in symbol table. - 2. It fixes issues with C99 inline semantics for functions - marked as inline (#237, #180, #222), which manifests - when compiled with GCC>=5. - -Index: ujson-1.35/lib/ultrajsondec.c -=================================================================== ---- ujson-1.35.orig/lib/ultrajsondec.c -+++ ujson-1.35/lib/ultrajsondec.c -@@ -66,7 +66,7 @@ struct DecoderState - JSONObjectDecoder *dec; - }; - --JSOBJ FASTCALL_MSVC decode_any( struct DecoderState *ds) FASTCALL_ATTR; -+static JSOBJ FASTCALL_MSVC decode_any( struct DecoderState *ds) FASTCALL_ATTR; - typedef JSOBJ (*PFN_DECODER)( struct DecoderState *ds); - - static JSOBJ SetError( struct DecoderState *ds, int offset, const char *message) -@@ -76,13 +76,13 @@ static JSOBJ SetError( struct DecoderSta - return NULL; - } - --double createDouble(double intNeg, double intValue, double frcValue, int frcDecimalCount) -+static double createDouble(double intNeg, double intValue, double frcValue, int frcDecimalCount) - { - static const double g_pow10[] = {1.0, 0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001,0.0000001, 0.00000001, 0.000000001, 0.0000000001, 0.00000000001, 0.000000000001, 0.0000000000001, 0.00000000000001, 0.000000000000001}; - return (intValue + (frcValue * g_pow10[frcDecimalCount])) * intNeg; - } - --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decodePreciseFloat(struct DecoderState *ds) -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decodePreciseFloat(struct DecoderState *ds) - { - char *end; - double value; -@@ -99,7 +99,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode - return ds->dec->newDouble(ds->prv, value); - } - --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_numeric (struct DecoderState *ds) -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_numeric (struct DecoderState *ds) - { - int intNeg = 1; - int mantSize = 0; -@@ -309,7 +309,7 @@ BREAK_EXP_LOOP: - return ds->dec->newDouble (ds->prv, createDouble( (double) intNeg, (double) intValue , frcValue, decimalCount) * pow(10.0, expValue * expNeg)); - } - --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_true ( struct DecoderState *ds) -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_true ( struct DecoderState *ds) - { - char *offset = ds->start; - offset ++; -@@ -329,7 +329,7 @@ SETERROR: - return SetError(ds, -1, "Unexpected character found when decoding 'true'"); - } - --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_false ( struct DecoderState *ds) -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_false ( struct DecoderState *ds) - { - char *offset = ds->start; - offset ++; -@@ -351,7 +351,7 @@ SETERROR: - return SetError(ds, -1, "Unexpected character found when decoding 'false'"); - } - --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_null ( struct DecoderState *ds) -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_null ( struct DecoderState *ds) - { - char *offset = ds->start; - offset ++; -@@ -371,7 +371,7 @@ SETERROR: - return SetError(ds, -1, "Unexpected character found when decoding 'null'"); - } - --FASTCALL_ATTR void FASTCALL_MSVC SkipWhitespace(struct DecoderState *ds) -+static FASTCALL_ATTR void FASTCALL_MSVC SkipWhitespace(struct DecoderState *ds) - { - char *offset = ds->start; - -@@ -422,7 +422,7 @@ static const JSUINT8 g_decoderLookup[256 - /* 0xf0 */ 4, 4, 4, 4, 4, 4, 4, 4, DS_UTFLENERROR, DS_UTFLENERROR, DS_UTFLENERROR, DS_UTFLENERROR, DS_UTFLENERROR, DS_UTFLENERROR, DS_UTFLENERROR, DS_UTFLENERROR, - }; - --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_string ( struct DecoderState *ds) -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_string ( struct DecoderState *ds) - { - JSUTF16 sur[2] = { 0 }; - int iSur = 0; -@@ -672,7 +672,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode - } - } - --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_array(struct DecoderState *ds) -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_array(struct DecoderState *ds) - { - JSOBJ itemValue; - JSOBJ newObj; -@@ -736,7 +736,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode - } - } - --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_object( struct DecoderState *ds) -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_object( struct DecoderState *ds) - { - JSOBJ itemName; - JSOBJ itemValue; -@@ -819,7 +819,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode - } - } - --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_any(struct DecoderState *ds) -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_any(struct DecoderState *ds) - { - for (;;) - { -Index: ujson-1.35/lib/ultrajsonenc.c -=================================================================== ---- ujson-1.35.orig/lib/ultrajsonenc.c -+++ ujson-1.35/lib/ultrajsonenc.c -@@ -112,7 +112,7 @@ static void SetError (JSOBJ obj, JSONObj - /* - FIXME: Keep track of how big these get across several encoder calls and try to make an estimate - That way we won't run our head into the wall each call */ --void Buffer_Realloc (JSONObjectEncoder *enc, size_t cbNeeded) -+static void Buffer_Realloc (JSONObjectEncoder *enc, size_t cbNeeded) - { - size_t curSize = enc->end - enc->start; - size_t newSize = curSize * 2; -@@ -148,7 +148,7 @@ void Buffer_Realloc (JSONObjectEncoder * - enc->end = enc->start + newSize; - } - --FASTCALL_ATTR INLINE_PREFIX void FASTCALL_MSVC Buffer_AppendShortHexUnchecked (char *outputOffset, unsigned short value) -+static FASTCALL_ATTR INLINE_PREFIX void FASTCALL_MSVC Buffer_AppendShortHexUnchecked (char *outputOffset, unsigned short value) - { - *(outputOffset++) = g_hexChars[(value & 0xf000) >> 12]; - *(outputOffset++) = g_hexChars[(value & 0x0f00) >> 8]; -@@ -156,7 +156,7 @@ FASTCALL_ATTR INLINE_PREFIX void FASTCAL - *(outputOffset++) = g_hexChars[(value & 0x000f) >> 0]; - } - --int Buffer_EscapeStringUnvalidated (JSONObjectEncoder *enc, const char *io, const char *end) -+static int Buffer_EscapeStringUnvalidated (JSONObjectEncoder *enc, const char *io, const char *end) - { - char *of = (char *) enc->offset; - -@@ -260,7 +260,7 @@ int Buffer_EscapeStringUnvalidated (JSON - } - } - --int Buffer_EscapeStringValidated (JSOBJ obj, JSONObjectEncoder *enc, const char *io, const char *end) -+static int Buffer_EscapeStringValidated (JSOBJ obj, JSONObjectEncoder *enc, const char *io, const char *end) - { - JSUTF32 ucs; - char *of = (char *) enc->offset; -@@ -498,19 +498,19 @@ int Buffer_EscapeStringValidated (JSOBJ - #define Buffer_AppendCharUnchecked(__enc, __chr) \ - *((__enc)->offset++) = __chr; \ - --FASTCALL_ATTR INLINE_PREFIX void FASTCALL_MSVC strreverse(char* begin, char* end) -+static FASTCALL_ATTR INLINE_PREFIX void FASTCALL_MSVC strreverse(char* begin, char* end) - { - char aux; - while (end > begin) - aux = *end, *end-- = *begin, *begin++ = aux; - } - --void Buffer_AppendIndentNewlineUnchecked(JSONObjectEncoder *enc) -+static void Buffer_AppendIndentNewlineUnchecked(JSONObjectEncoder *enc) - { - if (enc->indent > 0) Buffer_AppendCharUnchecked(enc, '\n'); - } - --void Buffer_AppendIndentUnchecked(JSONObjectEncoder *enc, JSINT32 value) -+static void Buffer_AppendIndentUnchecked(JSONObjectEncoder *enc, JSINT32 value) - { - int i; - if (enc->indent > 0) -@@ -519,7 +519,7 @@ void Buffer_AppendIndentUnchecked(JSONOb - Buffer_AppendCharUnchecked(enc, ' '); - } - --void Buffer_AppendIntUnchecked(JSONObjectEncoder *enc, JSINT32 value) -+static void Buffer_AppendIntUnchecked(JSONObjectEncoder *enc, JSINT32 value) - { - char* wstr; - JSUINT32 uvalue = (value < 0) ? -value : value; -@@ -535,7 +535,7 @@ void Buffer_AppendIntUnchecked(JSONObjec - enc->offset += (wstr - (enc->offset)); - } - --void Buffer_AppendLongUnchecked(JSONObjectEncoder *enc, JSINT64 value) -+static void Buffer_AppendLongUnchecked(JSONObjectEncoder *enc, JSINT64 value) - { - char* wstr; - JSUINT64 uvalue = (value < 0) ? -value : value; -@@ -551,7 +551,7 @@ void Buffer_AppendLongUnchecked(JSONObje - enc->offset += (wstr - (enc->offset)); - } - --void Buffer_AppendUnsignedLongUnchecked(JSONObjectEncoder *enc, JSUINT64 value) -+static void Buffer_AppendUnsignedLongUnchecked(JSONObjectEncoder *enc, JSUINT64 value) - { - char* wstr; - JSUINT64 uvalue = value; -@@ -566,7 +566,7 @@ void Buffer_AppendUnsignedLongUnchecked( - enc->offset += (wstr - (enc->offset)); - } - --int Buffer_AppendDoubleUnchecked(JSOBJ obj, JSONObjectEncoder *enc, double value) -+static int Buffer_AppendDoubleUnchecked(JSOBJ obj, JSONObjectEncoder *enc, double value) - { - /* if input is larger than thres_max, revert to exponential */ - const double thres_max = (double) 1e16 - 1; -@@ -714,7 +714,7 @@ Handle integration functions returning N - FIXME: - Perhaps implement recursion detection */ - --void encode(JSOBJ obj, JSONObjectEncoder *enc, const char *name, size_t cbName) -+static void encode(JSOBJ obj, JSONObjectEncoder *enc, const char *name, size_t cbName) - { - const char *value; - char *objName; -Index: ujson-1.35/python/JSONtoObj.c -=================================================================== ---- ujson-1.35.orig/python/JSONtoObj.c -+++ ujson-1.35/python/JSONtoObj.c -@@ -43,7 +43,7 @@ http://www.opensource.apple.com/source/t - //#define PRINTMARK() fprintf(stderr, "%s: MARK(%d)\n", __FILE__, __LINE__) - #define PRINTMARK() - --void Object_objectAddKey(void *prv, JSOBJ obj, JSOBJ name, JSOBJ value) -+static void Object_objectAddKey(void *prv, JSOBJ obj, JSOBJ name, JSOBJ value) - { - PyDict_SetItem (obj, name, value); - Py_DECREF( (PyObject *) name); -@@ -51,59 +51,59 @@ void Object_objectAddKey(void *prv, JSOB - return; - } - --void Object_arrayAddItem(void *prv, JSOBJ obj, JSOBJ value) -+static void Object_arrayAddItem(void *prv, JSOBJ obj, JSOBJ value) - { - PyList_Append(obj, value); - Py_DECREF( (PyObject *) value); - return; - } - --JSOBJ Object_newString(void *prv, wchar_t *start, wchar_t *end) -+static JSOBJ Object_newString(void *prv, wchar_t *start, wchar_t *end) - { - return PyUnicode_FromWideChar (start, (end - start)); - } - --JSOBJ Object_newTrue(void *prv) -+static JSOBJ Object_newTrue(void *prv) - { - Py_RETURN_TRUE; - } - --JSOBJ Object_newFalse(void *prv) -+static JSOBJ Object_newFalse(void *prv) - { - Py_RETURN_FALSE; - } - --JSOBJ Object_newNull(void *prv) -+static JSOBJ Object_newNull(void *prv) - { - Py_RETURN_NONE; - } - --JSOBJ Object_newObject(void *prv) -+static JSOBJ Object_newObject(void *prv) - { - return PyDict_New(); - } - --JSOBJ Object_newArray(void *prv) -+static JSOBJ Object_newArray(void *prv) - { - return PyList_New(0); - } - --JSOBJ Object_newInteger(void *prv, JSINT32 value) -+static JSOBJ Object_newInteger(void *prv, JSINT32 value) - { - return PyInt_FromLong( (long) value); - } - --JSOBJ Object_newLong(void *prv, JSINT64 value) -+static JSOBJ Object_newLong(void *prv, JSINT64 value) - { - return PyLong_FromLongLong (value); - } - --JSOBJ Object_newUnsignedLong(void *prv, JSUINT64 value) -+static JSOBJ Object_newUnsignedLong(void *prv, JSUINT64 value) - { - return PyLong_FromUnsignedLongLong (value); - } - --JSOBJ Object_newDouble(void *prv, double value) -+static JSOBJ Object_newDouble(void *prv, double value) - { - return PyFloat_FromDouble(value); - } -Index: ujson-1.35/python/objToJSON.c -=================================================================== ---- ujson-1.35.orig/python/objToJSON.c -+++ ujson-1.35/python/objToJSON.c -@@ -241,7 +241,7 @@ static int PyHasAttrStringPreserveErr(Py - return res; - } - --int Tuple_iterNext(JSOBJ obj, JSONTypeContext *tc) -+static int Tuple_iterNext(JSOBJ obj, JSONTypeContext *tc) - { - PyObject *item; - -@@ -257,21 +257,21 @@ int Tuple_iterNext(JSOBJ obj, JSONTypeCo - return 1; - } - --void Tuple_iterEnd(JSOBJ obj, JSONTypeContext *tc) -+static void Tuple_iterEnd(JSOBJ obj, JSONTypeContext *tc) - { - } - --JSOBJ Tuple_iterGetValue(JSOBJ obj, JSONTypeContext *tc) -+static JSOBJ Tuple_iterGetValue(JSOBJ obj, JSONTypeContext *tc) - { - return GET_TC(tc)->itemValue; - } - --char *Tuple_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen) -+static char *Tuple_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen) - { - return NULL; - } - --int Iter_iterNext(JSOBJ obj, JSONTypeContext *tc) -+static int Iter_iterNext(JSOBJ obj, JSONTypeContext *tc) - { - PyObject *item; - -@@ -297,7 +297,7 @@ int Iter_iterNext(JSOBJ obj, JSONTypeCon - return 1; - } - --void Iter_iterEnd(JSOBJ obj, JSONTypeContext *tc) -+static void Iter_iterEnd(JSOBJ obj, JSONTypeContext *tc) - { - if (GET_TC(tc)->itemValue) - { -@@ -312,17 +312,17 @@ void Iter_iterEnd(JSOBJ obj, JSONTypeCon - } - } - --JSOBJ Iter_iterGetValue(JSOBJ obj, JSONTypeContext *tc) -+static JSOBJ Iter_iterGetValue(JSOBJ obj, JSONTypeContext *tc) - { - return GET_TC(tc)->itemValue; - } - --char *Iter_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen) -+static char *Iter_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen) - { - return NULL; - } - --void Dir_iterEnd(JSOBJ obj, JSONTypeContext *tc) -+static void Dir_iterEnd(JSOBJ obj, JSONTypeContext *tc) - { - if (GET_TC(tc)->itemValue) - { -@@ -340,7 +340,7 @@ void Dir_iterEnd(JSOBJ obj, JSONTypeCont - PRINTMARK(); - } - --int Dir_iterNext(JSOBJ _obj, JSONTypeContext *tc) -+static int Dir_iterNext(JSOBJ _obj, JSONTypeContext *tc) - { - PyObject *obj = (PyObject *) _obj; - PyObject *itemValue = GET_TC(tc)->itemValue; -@@ -416,20 +416,20 @@ int Dir_iterNext(JSOBJ _obj, JSONTypeCon - return 1; - } - --JSOBJ Dir_iterGetValue(JSOBJ obj, JSONTypeContext *tc) -+static JSOBJ Dir_iterGetValue(JSOBJ obj, JSONTypeContext *tc) - { - PRINTMARK(); - return GET_TC(tc)->itemValue; - } - --char *Dir_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen) -+static char *Dir_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen) - { - PRINTMARK(); - *outLen = PyString_GET_SIZE(GET_TC(tc)->itemName); - return PyString_AS_STRING(GET_TC(tc)->itemName); - } - --int List_iterNext(JSOBJ obj, JSONTypeContext *tc) -+static int List_iterNext(JSOBJ obj, JSONTypeContext *tc) - { - if (GET_TC(tc)->index >= GET_TC(tc)->size) - { -@@ -442,16 +442,16 @@ int List_iterNext(JSOBJ obj, JSONTypeCon - return 1; - } - --void List_iterEnd(JSOBJ obj, JSONTypeContext *tc) -+static void List_iterEnd(JSOBJ obj, JSONTypeContext *tc) - { - } - --JSOBJ List_iterGetValue(JSOBJ obj, JSONTypeContext *tc) -+static JSOBJ List_iterGetValue(JSOBJ obj, JSONTypeContext *tc) - { - return GET_TC(tc)->itemValue; - } - --char *List_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen) -+static char *List_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen) - { - return NULL; - } -@@ -462,7 +462,7 @@ char *List_iterGetName(JSOBJ obj, JSONTy - // itemValue is borrowed from object (which is dict). No refCounting - //============================================================================= - --int Dict_iterNext(JSOBJ obj, JSONTypeContext *tc) -+static int Dict_iterNext(JSOBJ obj, JSONTypeContext *tc) - { - #if PY_MAJOR_VERSION >= 3 - PyObject* itemNameTmp; -@@ -514,7 +514,7 @@ int Dict_iterNext(JSOBJ obj, JSONTypeCon - return 1; - } - --void Dict_iterEnd(JSOBJ obj, JSONTypeContext *tc) -+static void Dict_iterEnd(JSOBJ obj, JSONTypeContext *tc) - { - if (GET_TC(tc)->itemName) - { -@@ -526,18 +526,18 @@ void Dict_iterEnd(JSOBJ obj, JSONTypeCon - PRINTMARK(); - } - --JSOBJ Dict_iterGetValue(JSOBJ obj, JSONTypeContext *tc) -+static JSOBJ Dict_iterGetValue(JSOBJ obj, JSONTypeContext *tc) - { - return GET_TC(tc)->itemValue; - } - --char *Dict_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen) -+static char *Dict_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen) - { - *outLen = PyString_GET_SIZE(GET_TC(tc)->itemName); - return PyString_AS_STRING(GET_TC(tc)->itemName); - } - --int SortedDict_iterNext(JSOBJ obj, JSONTypeContext *tc) -+static int SortedDict_iterNext(JSOBJ obj, JSONTypeContext *tc) - { - PyObject *items = NULL, *item = NULL, *key = NULL, *value = NULL; - Py_ssize_t i, nitems; -@@ -631,7 +631,7 @@ error: - return -1; - } - --void SortedDict_iterEnd(JSOBJ obj, JSONTypeContext *tc) -+static void SortedDict_iterEnd(JSOBJ obj, JSONTypeContext *tc) - { - GET_TC(tc)->itemName = NULL; - GET_TC(tc)->itemValue = NULL; -@@ -639,19 +639,19 @@ void SortedDict_iterEnd(JSOBJ obj, JSONT - PRINTMARK(); - } - --JSOBJ SortedDict_iterGetValue(JSOBJ obj, JSONTypeContext *tc) -+static JSOBJ SortedDict_iterGetValue(JSOBJ obj, JSONTypeContext *tc) - { - return GET_TC(tc)->itemValue; - } - --char *SortedDict_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen) -+static char *SortedDict_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen) - { - *outLen = PyString_GET_SIZE(GET_TC(tc)->itemName); - return PyString_AS_STRING(GET_TC(tc)->itemName); - } - - --void SetupDictIter(PyObject *dictObj, TypeContext *pc, JSONObjectEncoder *enc) -+static void SetupDictIter(PyObject *dictObj, TypeContext *pc, JSONObjectEncoder *enc) - { - pc->dictObj = dictObj; - if (enc->sortKeys) -@@ -672,7 +672,7 @@ void SetupDictIter(PyObject *dictObj, Ty - } - } - --void Object_beginTypeContext (JSOBJ _obj, JSONTypeContext *tc, JSONObjectEncoder *enc) -+static void Object_beginTypeContext (JSOBJ _obj, JSONTypeContext *tc, JSONObjectEncoder *enc) - { - PyObject *obj, *exc, *iter; - TypeContext *pc; -@@ -960,7 +960,7 @@ INVALID: - return; - } - --void Object_endTypeContext(JSOBJ obj, JSONTypeContext *tc) -+static void Object_endTypeContext(JSOBJ obj, JSONTypeContext *tc) - { - Py_XDECREF(GET_TC(tc)->newObj); - -@@ -968,33 +968,33 @@ void Object_endTypeContext(JSOBJ obj, JS - tc->prv = NULL; - } - --const char *Object_getStringValue(JSOBJ obj, JSONTypeContext *tc, size_t *_outLen) -+static const char *Object_getStringValue(JSOBJ obj, JSONTypeContext *tc, size_t *_outLen) - { - return GET_TC(tc)->PyTypeToJSON (obj, tc, NULL, _outLen); - } - --JSINT64 Object_getLongValue(JSOBJ obj, JSONTypeContext *tc) -+static JSINT64 Object_getLongValue(JSOBJ obj, JSONTypeContext *tc) - { - JSINT64 ret; - GET_TC(tc)->PyTypeToJSON (obj, tc, &ret, NULL); - return ret; - } - --JSUINT64 Object_getUnsignedLongValue(JSOBJ obj, JSONTypeContext *tc) -+static JSUINT64 Object_getUnsignedLongValue(JSOBJ obj, JSONTypeContext *tc) - { - JSUINT64 ret; - GET_TC(tc)->PyTypeToJSON (obj, tc, &ret, NULL); - return ret; - } - --JSINT32 Object_getIntValue(JSOBJ obj, JSONTypeContext *tc) -+static JSINT32 Object_getIntValue(JSOBJ obj, JSONTypeContext *tc) - { - JSINT32 ret; - GET_TC(tc)->PyTypeToJSON (obj, tc, &ret, NULL); - return ret; - } - --double Object_getDoubleValue(JSOBJ obj, JSONTypeContext *tc) -+static double Object_getDoubleValue(JSOBJ obj, JSONTypeContext *tc) - { - double ret; - GET_TC(tc)->PyTypeToJSON (obj, tc, &ret, NULL); -@@ -1006,22 +1006,22 @@ static void Object_releaseObject(JSOBJ _ - Py_DECREF( (PyObject *) _obj); - } - --int Object_iterNext(JSOBJ obj, JSONTypeContext *tc) -+static int Object_iterNext(JSOBJ obj, JSONTypeContext *tc) - { - return GET_TC(tc)->iterNext(obj, tc); - } - --void Object_iterEnd(JSOBJ obj, JSONTypeContext *tc) -+static void Object_iterEnd(JSOBJ obj, JSONTypeContext *tc) - { - GET_TC(tc)->iterEnd(obj, tc); - } - --JSOBJ Object_iterGetValue(JSOBJ obj, JSONTypeContext *tc) -+static JSOBJ Object_iterGetValue(JSOBJ obj, JSONTypeContext *tc) - { - return GET_TC(tc)->iterGetValue(obj, tc); - } - --char *Object_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen) -+static char *Object_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen) - { - return GET_TC(tc)->iterGetName(obj, tc, outLen); - } diff --git a/ujson-1.35.tar.gz b/ujson-1.35.tar.gz deleted file mode 100644 index 28a26c7..0000000 --- a/ujson-1.35.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f66073e5506e91d204ab0c614a148d5aa938bdbf104751be66f8ad7a222f5f86 -size 192027 diff --git a/ujson-2.0.1.tar.gz b/ujson-2.0.1.tar.gz new file mode 100644 index 0000000..c7f508c --- /dev/null +++ b/ujson-2.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a88069adf9f99acb301c9902c7e31f73cd928f63a03657805a9e79e3b391f44 +size 7127056