Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/ujson/, dev-python/ujson/files/
Date: Fri, 26 Feb 2021 14:35:24
Message-Id: 1614349616.38de7b4564f19a1a466c23ed06b962d6e3bd8d69.mgorny@gentoo
1 commit: 38de7b4564f19a1a466c23ed06b962d6e3bd8d69
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 26 14:02:08 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 26 14:26:56 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38de7b45
7
8 dev-python/ujson: Remove old
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/ujson/Manifest | 2 -
13 .../ujson-1.35-fix-for-overflowing-long.patch | 84 ---
14 .../ujson-1.35-fix-ordering-of-orderdict.patch | 122 -----
15 .../files/ujson-1.35-sort_keys-segfault.patch | 73 ---
16 .../ujson-1.35-standard-handling-of-none.patch | 77 ---
17 .../files/ujson-1.35-test-depricationwarning.patch | 11 -
18 .../ujson-1.35-use-static-where-possible.patch | 591 ---------------------
19 dev-python/ujson/ujson-1.35-r1.ebuild | 37 --
20 dev-python/ujson/ujson-4.0.1.ebuild | 24 -
21 9 files changed, 1021 deletions(-)
22
23 diff --git a/dev-python/ujson/Manifest b/dev-python/ujson/Manifest
24 index 2c3d579d337..90f2344aa4a 100644
25 --- a/dev-python/ujson/Manifest
26 +++ b/dev-python/ujson/Manifest
27 @@ -1,3 +1 @@
28 -DIST ujson-1.35.tar.gz 192027 BLAKE2B 320058e7142f2264bee8b02a411bedb3b32d1c2fc86157eb47272f75cb401e6c75ce7d9e3dba5092cd1db99dbded8804347d4c7be11eaedb47bc8b4b8125fbd3 SHA512 931d8f574fc4920c9ded48369774666060e951f40982606ce9f1d9de3420004042af7d797075a54d92a2b25c4f313572a5e1a30f3bc8ce387ef8f3881193eee7
29 -DIST ujson-4.0.1.tar.gz 7128868 BLAKE2B 159496bfa2b7efff744c1f725c5a8c362c6baac20518d440e5827ec8af1a9a77b4e060126d9b35b39baae079f7092e64d49d0cd23a637174a4bca261203939d6 SHA512 11fb28166afab30e29d71070c91cfb78245eed704a769bf6fb0871c267135fac3fa1042c4ac875dcb870f8a00615e6bcc8fdcd0168edd5ccbae6437605b4df0d
30 DIST ujson-4.0.2.tar.gz 7129106 BLAKE2B 8ebf68c6bac65100baeee4f95f175ada09ba48b9efe1876b7b1ff2c3cf87d1a50d8300a981fd97eac73e4c5a70af1b7fddcd468aa6067aac8a2e44133f397057 SHA512 ece12d4407cb7cdb647597ff7fc32e4390fc4c790c59e764da5c5644e5dec470c48cb6a6aaa18429cb713643e5205c5d26b2d2d2195bc90f3a171615d3dbd80d
31
32 diff --git a/dev-python/ujson/files/ujson-1.35-fix-for-overflowing-long.patch b/dev-python/ujson/files/ujson-1.35-fix-for-overflowing-long.patch
33 deleted file mode 100644
34 index 98659ce1722..00000000000
35 --- a/dev-python/ujson/files/ujson-1.35-fix-for-overflowing-long.patch
36 +++ /dev/null
37 @@ -1,84 +0,0 @@
38 -commit 409c6d4006fdea27e746ea397124f98c92a41a92
39 -Author: Joakim Hamren <joakim.hamren@×××××.com>
40 -Date: Sat Feb 4 04:21:05 2017 +0100
41 -
42 - Fix for overflowing long causing invalid json
43 -
44 - This was caused by checking for "__json__" using PyObject_HasAttrString
45 - which clears the error set by a previous long overflow. Thus this was dependent
46 - on the order of processing of dict items, which explains why it was
47 - seemingly random as the dict items are likely ordered by a hash of
48 - the key.
49 -
50 - This fixes GH224 and GH240.
51 -
52 -diff --git a/python/objToJSON.c b/python/objToJSON.c
53 -index 8133fb5..adea2f6 100644
54 ---- a/python/objToJSON.c
55 -+++ b/python/objToJSON.c
56 -@@ -226,6 +226,21 @@ static void *PyDateToINT64(JSOBJ _obj, JSONTypeContext *tc, void *outValue, size
57 - return NULL;
58 - }
59 -
60 -+static int PyHasAttrStringPreserveErr(PyObject *obj, const char *attr)
61 -+{
62 -+ int res;
63 -+ PyObject *excType = NULL, *excValue, *excTraceback;
64 -+
65 -+ if (!PyErr_Occurred())
66 -+ return PyObject_HasAttrString(obj, "__json__");
67 -+
68 -+ PyErr_Fetch(&excType, &excValue, &excTraceback);
69 -+ res = PyObject_HasAttrString(obj, "__json__");
70 -+ PyErr_Restore(excType, excValue, excTraceback);
71 -+
72 -+ return res;
73 -+}
74 -+
75 - static int Tuple_iterNext(JSOBJ obj, JSONTypeContext *tc)
76 - {
77 - PyObject *item;
78 -@@ -471,21 +486,21 @@ static int Dict_iterNext(JSOBJ obj, JSONTypeContext *tc)
79 - GET_TC(tc)->itemName = PyUnicode_AsUTF8String (GET_TC(tc)->itemName);
80 - }
81 - else
82 -- if (!PyString_Check(GET_TC(tc)->itemName))
83 -- {
84 -- GET_TC(tc)->itemName = PyObject_Str(GET_TC(tc)->itemName);
85 -+ if (!PyString_Check(GET_TC(tc)->itemName))
86 -+ {
87 -+ GET_TC(tc)->itemName = PyObject_Str(GET_TC(tc)->itemName);
88 - #if PY_MAJOR_VERSION >= 3
89 -- itemNameTmp = GET_TC(tc)->itemName;
90 -- GET_TC(tc)->itemName = PyUnicode_AsUTF8String (GET_TC(tc)->itemName);
91 -- Py_DECREF(itemNameTmp);
92 -+ itemNameTmp = GET_TC(tc)->itemName;
93 -+ GET_TC(tc)->itemName = PyUnicode_AsUTF8String (GET_TC(tc)->itemName);
94 -+ Py_DECREF(itemNameTmp);
95 - #endif
96 -- }
97 -- else
98 -- {
99 -- Py_INCREF(GET_TC(tc)->itemName);
100 -- }
101 -- PRINTMARK();
102 -- return 1;
103 -+ }
104 -+ else
105 -+ {
106 -+ Py_INCREF(GET_TC(tc)->itemName);
107 -+ }
108 -+ PRINTMARK();
109 -+ return 1;
110 - }
111 -
112 - static void Dict_iterEnd(JSOBJ obj, JSONTypeContext *tc)
113 -@@ -728,7 +743,7 @@ static void Object_beginTypeContext (JSOBJ _obj, JSONTypeContext *tc, JSONObject
114 - return;
115 - }
116 - else
117 -- if (PyString_Check(obj) && !PyObject_HasAttrString(obj, "__json__"))
118 -+ if (PyString_Check(obj) && !PyHasAttrStringPreserveErr(obj, "__json__"))
119 - {
120 - PRINTMARK();
121 - pc->PyTypeToJSON = PyStringToUTF8; tc->type = JT_UTF8;
122
123 diff --git a/dev-python/ujson/files/ujson-1.35-fix-ordering-of-orderdict.patch b/dev-python/ujson/files/ujson-1.35-fix-ordering-of-orderdict.patch
124 deleted file mode 100644
125 index 37270d41e3b..00000000000
126 --- a/dev-python/ujson/files/ujson-1.35-fix-ordering-of-orderdict.patch
127 +++ /dev/null
128 @@ -1,122 +0,0 @@
129 -commit c9f8318bd823ae9d44797b6b881a2b3e22cdbade
130 -Author: Joakim Hamren <joakim.hamren@×××××.com>
131 -Date: Tue Feb 7 02:02:38 2017 +0100
132 -
133 - Fix for incorrect order when using OrderedDict
134 -
135 -diff --git a/python/objToJSON.c b/python/objToJSON.c
136 -index abe6588..9e6a390 100644
137 ---- a/python/objToJSON.c
138 -+++ b/python/objToJSON.c
139 -@@ -253,8 +253,13 @@ static int Dict_iterNext(JSOBJ obj, JSONTypeContext *tc)
140 - GET_TC(tc)->itemName = NULL;
141 - }
142 -
143 -+ if (!(GET_TC(tc)->itemName = PyIter_Next(GET_TC(tc)->iterator)))
144 -+ {
145 -+ PRINTMARK();
146 -+ return 0;
147 -+ }
148 -
149 -- if (!PyDict_Next ( (PyObject *)GET_TC(tc)->dictObj, &GET_TC(tc)->index, &GET_TC(tc)->itemName, &GET_TC(tc)->itemValue))
150 -+ if (!(GET_TC(tc)->itemValue = PyObject_GetItem(GET_TC(tc)->dictObj, GET_TC(tc)->itemName)))
151 - {
152 - PRINTMARK();
153 - return 0;
154 -@@ -295,6 +300,7 @@ static void Dict_iterEnd(JSOBJ obj, JSONTypeContext *tc)
155 - Py_DECREF(GET_TC(tc)->itemName);
156 - GET_TC(tc)->itemName = NULL;
157 - }
158 -+ Py_CLEAR(GET_TC(tc)->iterator);
159 - Py_DECREF(GET_TC(tc)->dictObj);
160 - PRINTMARK();
161 - }
162 -@@ -425,20 +431,23 @@ static char *SortedDict_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outL
163 -
164 - static void SetupDictIter(PyObject *dictObj, TypeContext *pc, JSONObjectEncoder *enc)
165 - {
166 -- if (enc->sortKeys) {
167 -+ pc->dictObj = dictObj;
168 -+ if (enc->sortKeys)
169 -+ {
170 - pc->iterEnd = SortedDict_iterEnd;
171 - pc->iterNext = SortedDict_iterNext;
172 - pc->iterGetValue = SortedDict_iterGetValue;
173 - pc->iterGetName = SortedDict_iterGetName;
174 -+ pc->index = 0;
175 - }
176 -- else {
177 -+ else
178 -+ {
179 - pc->iterEnd = Dict_iterEnd;
180 - pc->iterNext = Dict_iterNext;
181 - pc->iterGetValue = Dict_iterGetValue;
182 - pc->iterGetName = Dict_iterGetName;
183 -+ pc->iterator = PyObject_GetIter(dictObj);
184 - }
185 -- pc->dictObj = dictObj;
186 -- pc->index = 0;
187 - }
188 -
189 - static void Object_beginTypeContext (JSOBJ _obj, JSONTypeContext *tc, JSONObjectEncoder *enc)
190 -@@ -446,7 +455,8 @@ static void Object_beginTypeContext (JSOBJ _obj, JSONTypeContext *tc, JSONObject
191 - PyObject *obj, *objRepr, *exc;
192 - TypeContext *pc;
193 - PRINTMARK();
194 -- if (!_obj) {
195 -+ if (!_obj)
196 -+ {
197 - tc->type = JT_INVALID;
198 - return;
199 - }
200 -diff --git a/tests/tests.py b/tests/tests.py
201 -index cd928e6..b7e46af 100644
202 ---- a/tests/tests.py
203 -+++ b/tests/tests.py
204 -@@ -10,6 +10,8 @@ import json
205 - import math
206 - import time
207 - import pytz
208 -+from collections import OrderedDict
209 -+
210 - if six.PY2:
211 - import unittest2 as unittest
212 - else:
213 -@@ -383,6 +385,10 @@ class UltraJSONTests(unittest.TestCase):
214 - input = -float('inf')
215 - self.assertRaises(OverflowError, ujson.encode, input)
216 -
217 -+ def test_encodeOrderedDict(self):
218 -+ input = OrderedDict([(1, 1), (0, 0), (8, 8), (2, 2)])
219 -+ self.assertEqual('{"1":1,"0":0,"8":8,"2":2}', ujson.encode(input))
220 -+
221 - def test_decodeJibberish(self):
222 - input = "fdsa sda v9sa fdsa"
223 - self.assertRaises(ValueError, ujson.decode, input)
224 -@@ -668,7 +674,7 @@ class UltraJSONTests(unittest.TestCase):
225 - d = {u'key': JSONTest()}
226 - output = ujson.encode(d)
227 - dec = ujson.decode(output)
228 -- self.assertEquals(dec, {u'key': output_text})
229 -+ self.assertEqual(dec, {u'key': output_text})
230 -
231 - def test_object_with_json_unicode(self):
232 - # If __json__ returns a string, then that string
233 -@@ -681,7 +687,7 @@ class UltraJSONTests(unittest.TestCase):
234 - d = {u'key': JSONTest()}
235 - output = ujson.encode(d)
236 - dec = ujson.decode(output)
237 -- self.assertEquals(dec, {u'key': output_text})
238 -+ self.assertEqual(dec, {u'key': output_text})
239 -
240 - def test_object_with_complex_json(self):
241 - # If __json__ returns a string, then that string
242 -@@ -694,7 +700,7 @@ class UltraJSONTests(unittest.TestCase):
243 - d = {u'key': JSONTest()}
244 - output = ujson.encode(d)
245 - dec = ujson.decode(output)
246 -- self.assertEquals(dec, {u'key': obj})
247 -+ self.assertEqual(dec, {u'key': obj})
248 -
249 - def test_object_with_json_type_error(self):
250 - # __json__ must return a string, otherwise it should raise an error.
251
252 diff --git a/dev-python/ujson/files/ujson-1.35-sort_keys-segfault.patch b/dev-python/ujson/files/ujson-1.35-sort_keys-segfault.patch
253 deleted file mode 100644
254 index 7239bca3e23..00000000000
255 --- a/dev-python/ujson/files/ujson-1.35-sort_keys-segfault.patch
256 +++ /dev/null
257 @@ -1,73 +0,0 @@
258 -commit 870ee48fe109c289033cd0b7543b6f5ea4e6f128
259 -Author: Joakim Hamren <joakim.hamren@×××××.com>
260 -Date: Sat Feb 4 01:07:52 2017 +0100
261 -
262 - Fixes for sort_keys bug and a typo.
263 -
264 - - Fixed segfault when using sort_keys=True on dict with unorderable keys (GH247)
265 -
266 - - Fixed refcount becoming negative when using sort_keys=True (GH243)
267 -
268 - - Fixed compile error when defining JSON_NO_EXTRA_WHITESPACE
269 - caused by a wrongly named variable. (GH245)
270 -
271 -diff --git a/lib/ultrajsonenc.c b/lib/ultrajsonenc.c
272 -index cb10024..1bfa8f4 100644
273 ---- a/lib/ultrajsonenc.c
274 -+++ b/lib/ultrajsonenc.c
275 -@@ -717,7 +717,7 @@ static void encode(JSOBJ obj, JSONObjectEncoder *enc, const char *name, size_t c
276 - {
277 - const char *value;
278 - char *objName;
279 -- int count;
280 -+ int count, res;
281 - JSOBJ iterObj;
282 - size_t szlen;
283 - JSONTypeContext tc;
284 -@@ -796,7 +796,7 @@ static void encode(JSOBJ obj, JSONObjectEncoder *enc, const char *name, size_t c
285 - {
286 - Buffer_AppendCharUnchecked (enc, ',');
287 - #ifndef JSON_NO_EXTRA_WHITESPACE
288 -- Buffer_AppendCharUnchecked (buffer, ' ');
289 -+ Buffer_AppendCharUnchecked (enc, ' ');
290 - #endif
291 - Buffer_AppendIndentNewlineUnchecked (enc);
292 - }
293 -@@ -823,8 +823,16 @@ static void encode(JSOBJ obj, JSONObjectEncoder *enc, const char *name, size_t c
294 - Buffer_AppendCharUnchecked (enc, '{');
295 - Buffer_AppendIndentNewlineUnchecked (enc);
296 -
297 -- while (enc->iterNext(obj, &tc))
298 -+ while ((res = enc->iterNext(obj, &tc)))
299 - {
300 -+ if(res < 0)
301 -+ {
302 -+ enc->iterEnd(obj, &tc);
303 -+ enc->endTypeContext(obj, &tc);
304 -+ enc->level--;
305 -+ return;
306 -+ }
307 -+
308 - if (count > 0)
309 - {
310 - Buffer_AppendCharUnchecked (enc, ',');
311 -diff --git a/python/objToJSON.c b/python/objToJSON.c
312 -index 1960d40..8133fb5 100644
313 ---- a/python/objToJSON.c
314 -+++ b/python/objToJSON.c
315 -@@ -537,6 +537,7 @@ static int SortedDict_iterNext(JSOBJ obj, JSONTypeContext *tc)
316 - // Sort the list.
317 - if (PyList_Sort(items) < 0)
318 - {
319 -+ PyErr_SetString(PyExc_ValueError, "unorderable keys");
320 - goto error;
321 - }
322 -
323 -@@ -607,7 +608,6 @@ static void SortedDict_iterEnd(JSOBJ obj, JSONTypeContext *tc)
324 - {
325 - GET_TC(tc)->itemName = NULL;
326 - GET_TC(tc)->itemValue = NULL;
327 -- Py_DECREF(GET_TC(tc)->newObj);
328 - Py_DECREF(GET_TC(tc)->dictObj);
329 - PRINTMARK();
330 - }
331
332 diff --git a/dev-python/ujson/files/ujson-1.35-standard-handling-of-none.patch b/dev-python/ujson/files/ujson-1.35-standard-handling-of-none.patch
333 deleted file mode 100644
334 index e2b7b9103f4..00000000000
335 --- a/dev-python/ujson/files/ujson-1.35-standard-handling-of-none.patch
336 +++ /dev/null
337 @@ -1,77 +0,0 @@
338 -commit ac4637fbc4e72bd59f221d9bba19127820d21023
339 -Author: Joakim Hamren <joakim.hamren@×××××.com>
340 -Date: Sat Feb 4 16:36:14 2017 +0100
341 -
342 - Following std json handling of None dict key
343 -
344 - Previously a None dict item key would be outputted in JSON as "None".
345 - To better align with the standard json module this was changed to output
346 - "null". There's no proper representation of null object keys in JSON so
347 - this is implementation specific but it seems more natural to follow
348 - suit when it can be done without a significant performance hit.
349 -
350 - Added and used branch prediction macros (LIKELY/UNLIKELY) as well.
351 -
352 -diff --git a/lib/ultrajson.h b/lib/ultrajson.h
353 -index 6c1dbc1..ca82a29 100644
354 ---- a/lib/ultrajson.h
355 -+++ b/lib/ultrajson.h
356 -@@ -117,6 +117,14 @@ typedef uint32_t JSUINT32;
357 -
358 - #define INLINE_PREFIX inline
359 -
360 -+#ifdef __GNUC__
361 -+#define LIKELY(x) __builtin_expect(!!(x), 1)
362 -+#define UNLIKELY(x) __builtin_expect(!!(x), 0)
363 -+#else
364 -+#define LIKELY(x) (x)
365 -+#define UNLIKELY(x) (x)
366 -+#endif
367 -+
368 - typedef uint8_t JSUINT8;
369 - typedef uint16_t JSUTF16;
370 - typedef uint32_t JSUTF32;
371 -diff --git a/python/objToJSON.c b/python/objToJSON.c
372 -index adea2f6..41d4289 100644
373 ---- a/python/objToJSON.c
374 -+++ b/python/objToJSON.c
375 -@@ -488,6 +488,12 @@ static int Dict_iterNext(JSOBJ obj, JSONTypeContext *tc)
376 - else
377 - if (!PyString_Check(GET_TC(tc)->itemName))
378 - {
379 -+ if (UNLIKELY(GET_TC(tc)->itemName == Py_None))
380 -+ {
381 -+ GET_TC(tc)->itemName = PyString_FromString("null");
382 -+ return 1;
383 -+ }
384 -+
385 - GET_TC(tc)->itemName = PyObject_Str(GET_TC(tc)->itemName);
386 - #if PY_MAJOR_VERSION >= 3
387 - itemNameTmp = GET_TC(tc)->itemName;
388 -@@ -743,7 +749,7 @@ static void Object_beginTypeContext (JSOBJ _obj, JSONTypeContext *tc, JSONObject
389 - return;
390 - }
391 - else
392 -- if (PyString_Check(obj) && !PyHasAttrStringPreserveErr(obj, "__json__"))
393 -+ if (PyString_Check(obj) && LIKELY(!PyHasAttrStringPreserveErr(obj, "__json__")))
394 - {
395 - PRINTMARK();
396 - pc->PyTypeToJSON = PyStringToUTF8; tc->type = JT_UTF8;
397 -@@ -837,7 +843,7 @@ ISITERABLE:
398 - }
399 - */
400 -
401 -- if (PyObject_HasAttrString(obj, "toDict"))
402 -+ if (UNLIKELY(PyObject_HasAttrString(obj, "toDict")))
403 - {
404 - PyObject* toDictFunc = PyObject_GetAttrString(obj, "toDict");
405 - PyObject* tuple = PyTuple_New(0);
406 -@@ -863,7 +869,7 @@ ISITERABLE:
407 - return;
408 - }
409 - else
410 -- if (PyObject_HasAttrString(obj, "__json__"))
411 -+ if (UNLIKELY(PyObject_HasAttrString(obj, "__json__")))
412 - {
413 - PyObject* toJSONFunc = PyObject_GetAttrString(obj, "__json__");
414 - PyObject* tuple = PyTuple_New(0);
415
416 diff --git a/dev-python/ujson/files/ujson-1.35-test-depricationwarning.patch b/dev-python/ujson/files/ujson-1.35-test-depricationwarning.patch
417 deleted file mode 100644
418 index 6ce987581c4..00000000000
419 --- a/dev-python/ujson/files/ujson-1.35-test-depricationwarning.patch
420 +++ /dev/null
421 @@ -1,11 +0,0 @@
422 ---- ujson-1.35.orig/tests/tests.py 2017-04-14 18:14:36.298345782 -0700
423 -+++ ujson-1.35/tests/tests.py 2017-04-14 18:14:47.899947795 -0700
424 -@@ -702,7 +702,7 @@
425 -
426 - output = ujson.encode(ObjectTest())
427 - dec = ujson.decode(output)
428 -- self.assertEquals(dec, {})
429 -+ self.assertEqual(dec, {})
430 -
431 - def test_toDict(self):
432 - d = {"key": 31337}
433
434 diff --git a/dev-python/ujson/files/ujson-1.35-use-static-where-possible.patch b/dev-python/ujson/files/ujson-1.35-use-static-where-possible.patch
435 deleted file mode 100644
436 index 7ce5d44e0e7..00000000000
437 --- a/dev-python/ujson/files/ujson-1.35-use-static-where-possible.patch
438 +++ /dev/null
439 @@ -1,591 +0,0 @@
440 -commit 6cf6c7ff25c883349e8e9e5468e61498358e2e91
441 -Author: WGH <wgh@××××××.ru>
442 -Date: Sat Aug 27 17:34:22 2016 +0300
443 -
444 - added "static" to C functions, where possible
445 -
446 - 1. It reduces clutter in symbol table.
447 - 2. It fixes issues with C99 inline semantics for functions
448 - marked as inline (#237, #180, #222), which manifests
449 - when compiled with GCC>=5.
450 -
451 -diff --git a/lib/ultrajsondec.c b/lib/ultrajsondec.c
452 -index 21a732e..19efc60 100644
453 ---- a/lib/ultrajsondec.c
454 -+++ b/lib/ultrajsondec.c
455 -@@ -66,7 +66,7 @@ struct DecoderState
456 - JSONObjectDecoder *dec;
457 - };
458 -
459 --JSOBJ FASTCALL_MSVC decode_any( struct DecoderState *ds) FASTCALL_ATTR;
460 -+static JSOBJ FASTCALL_MSVC decode_any( struct DecoderState *ds) FASTCALL_ATTR;
461 - typedef JSOBJ (*PFN_DECODER)( struct DecoderState *ds);
462 -
463 - static JSOBJ SetError( struct DecoderState *ds, int offset, const char *message)
464 -@@ -76,13 +76,13 @@ static JSOBJ SetError( struct DecoderState *ds, int offset, const char *message)
465 - return NULL;
466 - }
467 -
468 --double createDouble(double intNeg, double intValue, double frcValue, int frcDecimalCount)
469 -+static double createDouble(double intNeg, double intValue, double frcValue, int frcDecimalCount)
470 - {
471 - 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};
472 - return (intValue + (frcValue * g_pow10[frcDecimalCount])) * intNeg;
473 - }
474 -
475 --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decodePreciseFloat(struct DecoderState *ds)
476 -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decodePreciseFloat(struct DecoderState *ds)
477 - {
478 - char *end;
479 - double value;
480 -@@ -99,7 +99,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decodePreciseFloat(struct DecoderState *ds)
481 - return ds->dec->newDouble(ds->prv, value);
482 - }
483 -
484 --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_numeric (struct DecoderState *ds)
485 -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_numeric (struct DecoderState *ds)
486 - {
487 - int intNeg = 1;
488 - int mantSize = 0;
489 -@@ -309,7 +309,7 @@ BREAK_EXP_LOOP:
490 - return ds->dec->newDouble (ds->prv, createDouble( (double) intNeg, (double) intValue , frcValue, decimalCount) * pow(10.0, expValue * expNeg));
491 - }
492 -
493 --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_true ( struct DecoderState *ds)
494 -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_true ( struct DecoderState *ds)
495 - {
496 - char *offset = ds->start;
497 - offset ++;
498 -@@ -329,7 +329,7 @@ SETERROR:
499 - return SetError(ds, -1, "Unexpected character found when decoding 'true'");
500 - }
501 -
502 --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_false ( struct DecoderState *ds)
503 -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_false ( struct DecoderState *ds)
504 - {
505 - char *offset = ds->start;
506 - offset ++;
507 -@@ -351,7 +351,7 @@ SETERROR:
508 - return SetError(ds, -1, "Unexpected character found when decoding 'false'");
509 - }
510 -
511 --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_null ( struct DecoderState *ds)
512 -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_null ( struct DecoderState *ds)
513 - {
514 - char *offset = ds->start;
515 - offset ++;
516 -@@ -371,7 +371,7 @@ SETERROR:
517 - return SetError(ds, -1, "Unexpected character found when decoding 'null'");
518 - }
519 -
520 --FASTCALL_ATTR void FASTCALL_MSVC SkipWhitespace(struct DecoderState *ds)
521 -+static FASTCALL_ATTR void FASTCALL_MSVC SkipWhitespace(struct DecoderState *ds)
522 - {
523 - char *offset = ds->start;
524 -
525 -@@ -422,7 +422,7 @@ static const JSUINT8 g_decoderLookup[256] =
526 - /* 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,
527 - };
528 -
529 --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_string ( struct DecoderState *ds)
530 -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_string ( struct DecoderState *ds)
531 - {
532 - JSUTF16 sur[2] = { 0 };
533 - int iSur = 0;
534 -@@ -672,7 +672,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_string ( struct DecoderState *ds)
535 - }
536 - }
537 -
538 --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_array(struct DecoderState *ds)
539 -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_array(struct DecoderState *ds)
540 - {
541 - JSOBJ itemValue;
542 - JSOBJ newObj;
543 -@@ -736,7 +736,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_array(struct DecoderState *ds)
544 - }
545 - }
546 -
547 --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_object( struct DecoderState *ds)
548 -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_object( struct DecoderState *ds)
549 - {
550 - JSOBJ itemName;
551 - JSOBJ itemValue;
552 -@@ -819,7 +819,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_object( struct DecoderState *ds)
553 - }
554 - }
555 -
556 --FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_any(struct DecoderState *ds)
557 -+static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_any(struct DecoderState *ds)
558 - {
559 - for (;;)
560 - {
561 -diff --git a/lib/ultrajsonenc.c b/lib/ultrajsonenc.c
562 -index 6c1b120..f330171 100644
563 ---- a/lib/ultrajsonenc.c
564 -+++ b/lib/ultrajsonenc.c
565 -@@ -112,7 +112,7 @@ static void SetError (JSOBJ obj, JSONObjectEncoder *enc, const char *message)
566 - /*
567 - FIXME: Keep track of how big these get across several encoder calls and try to make an estimate
568 - That way we won't run our head into the wall each call */
569 --void Buffer_Realloc (JSONObjectEncoder *enc, size_t cbNeeded)
570 -+static void Buffer_Realloc (JSONObjectEncoder *enc, size_t cbNeeded)
571 - {
572 - size_t curSize = enc->end - enc->start;
573 - size_t newSize = curSize * 2;
574 -@@ -148,7 +148,7 @@ void Buffer_Realloc (JSONObjectEncoder *enc, size_t cbNeeded)
575 - enc->end = enc->start + newSize;
576 - }
577 -
578 --FASTCALL_ATTR INLINE_PREFIX void FASTCALL_MSVC Buffer_AppendShortHexUnchecked (char *outputOffset, unsigned short value)
579 -+static FASTCALL_ATTR INLINE_PREFIX void FASTCALL_MSVC Buffer_AppendShortHexUnchecked (char *outputOffset, unsigned short value)
580 - {
581 - *(outputOffset++) = g_hexChars[(value & 0xf000) >> 12];
582 - *(outputOffset++) = g_hexChars[(value & 0x0f00) >> 8];
583 -@@ -156,7 +156,7 @@ FASTCALL_ATTR INLINE_PREFIX void FASTCALL_MSVC Buffer_AppendShortHexUnchecked (c
584 - *(outputOffset++) = g_hexChars[(value & 0x000f) >> 0];
585 - }
586 -
587 --int Buffer_EscapeStringUnvalidated (JSONObjectEncoder *enc, const char *io, const char *end)
588 -+static int Buffer_EscapeStringUnvalidated (JSONObjectEncoder *enc, const char *io, const char *end)
589 - {
590 - char *of = (char *) enc->offset;
591 -
592 -@@ -260,7 +260,7 @@ int Buffer_EscapeStringUnvalidated (JSONObjectEncoder *enc, const char *io, cons
593 - }
594 - }
595 -
596 --int Buffer_EscapeStringValidated (JSOBJ obj, JSONObjectEncoder *enc, const char *io, const char *end)
597 -+static int Buffer_EscapeStringValidated (JSOBJ obj, JSONObjectEncoder *enc, const char *io, const char *end)
598 - {
599 - JSUTF32 ucs;
600 - char *of = (char *) enc->offset;
601 -@@ -498,19 +498,19 @@ int Buffer_EscapeStringValidated (JSOBJ obj, JSONObjectEncoder *enc, const char
602 - #define Buffer_AppendCharUnchecked(__enc, __chr) \
603 - *((__enc)->offset++) = __chr; \
604 -
605 --FASTCALL_ATTR INLINE_PREFIX void FASTCALL_MSVC strreverse(char* begin, char* end)
606 -+static FASTCALL_ATTR INLINE_PREFIX void FASTCALL_MSVC strreverse(char* begin, char* end)
607 - {
608 - char aux;
609 - while (end > begin)
610 - aux = *end, *end-- = *begin, *begin++ = aux;
611 - }
612 -
613 --void Buffer_AppendIndentNewlineUnchecked(JSONObjectEncoder *enc)
614 -+static void Buffer_AppendIndentNewlineUnchecked(JSONObjectEncoder *enc)
615 - {
616 - if (enc->indent > 0) Buffer_AppendCharUnchecked(enc, '\n');
617 - }
618 -
619 --void Buffer_AppendIndentUnchecked(JSONObjectEncoder *enc, JSINT32 value)
620 -+static void Buffer_AppendIndentUnchecked(JSONObjectEncoder *enc, JSINT32 value)
621 - {
622 - int i;
623 - if (enc->indent > 0)
624 -@@ -519,7 +519,7 @@ void Buffer_AppendIndentUnchecked(JSONObjectEncoder *enc, JSINT32 value)
625 - Buffer_AppendCharUnchecked(enc, ' ');
626 - }
627 -
628 --void Buffer_AppendIntUnchecked(JSONObjectEncoder *enc, JSINT32 value)
629 -+static void Buffer_AppendIntUnchecked(JSONObjectEncoder *enc, JSINT32 value)
630 - {
631 - char* wstr;
632 - JSUINT32 uvalue = (value < 0) ? -value : value;
633 -@@ -535,7 +535,7 @@ void Buffer_AppendIntUnchecked(JSONObjectEncoder *enc, JSINT32 value)
634 - enc->offset += (wstr - (enc->offset));
635 - }
636 -
637 --void Buffer_AppendLongUnchecked(JSONObjectEncoder *enc, JSINT64 value)
638 -+static void Buffer_AppendLongUnchecked(JSONObjectEncoder *enc, JSINT64 value)
639 - {
640 - char* wstr;
641 - JSUINT64 uvalue = (value < 0) ? -value : value;
642 -@@ -551,7 +551,7 @@ void Buffer_AppendLongUnchecked(JSONObjectEncoder *enc, JSINT64 value)
643 - enc->offset += (wstr - (enc->offset));
644 - }
645 -
646 --void Buffer_AppendUnsignedLongUnchecked(JSONObjectEncoder *enc, JSUINT64 value)
647 -+static void Buffer_AppendUnsignedLongUnchecked(JSONObjectEncoder *enc, JSUINT64 value)
648 - {
649 - char* wstr;
650 - JSUINT64 uvalue = value;
651 -@@ -566,7 +566,7 @@ void Buffer_AppendUnsignedLongUnchecked(JSONObjectEncoder *enc, JSUINT64 value)
652 - enc->offset += (wstr - (enc->offset));
653 - }
654 -
655 --int Buffer_AppendDoubleUnchecked(JSOBJ obj, JSONObjectEncoder *enc, double value)
656 -+static int Buffer_AppendDoubleUnchecked(JSOBJ obj, JSONObjectEncoder *enc, double value)
657 - {
658 - /* if input is larger than thres_max, revert to exponential */
659 - const double thres_max = (double) 1e16 - 1;
660 -@@ -714,7 +714,7 @@ Handle integration functions returning NULL here */
661 - FIXME:
662 - Perhaps implement recursion detection */
663 -
664 --void encode(JSOBJ obj, JSONObjectEncoder *enc, const char *name, size_t cbName)
665 -+static void encode(JSOBJ obj, JSONObjectEncoder *enc, const char *name, size_t cbName)
666 - {
667 - const char *value;
668 - char *objName;
669 -diff --git a/python/JSONtoObj.c b/python/JSONtoObj.c
670 -index 79d9f1a..6cef088 100644
671 ---- a/python/JSONtoObj.c
672 -+++ b/python/JSONtoObj.c
673 -@@ -43,7 +43,7 @@ http://www.opensource.apple.com/source/tcl/tcl-14/tcl/license.terms
674 - //#define PRINTMARK() fprintf(stderr, "%s: MARK(%d)\n", __FILE__, __LINE__)
675 - #define PRINTMARK()
676 -
677 --void Object_objectAddKey(void *prv, JSOBJ obj, JSOBJ name, JSOBJ value)
678 -+static void Object_objectAddKey(void *prv, JSOBJ obj, JSOBJ name, JSOBJ value)
679 - {
680 - PyDict_SetItem (obj, name, value);
681 - Py_DECREF( (PyObject *) name);
682 -@@ -51,59 +51,59 @@ void Object_objectAddKey(void *prv, JSOBJ obj, JSOBJ name, JSOBJ value)
683 - return;
684 - }
685 -
686 --void Object_arrayAddItem(void *prv, JSOBJ obj, JSOBJ value)
687 -+static void Object_arrayAddItem(void *prv, JSOBJ obj, JSOBJ value)
688 - {
689 - PyList_Append(obj, value);
690 - Py_DECREF( (PyObject *) value);
691 - return;
692 - }
693 -
694 --JSOBJ Object_newString(void *prv, wchar_t *start, wchar_t *end)
695 -+static JSOBJ Object_newString(void *prv, wchar_t *start, wchar_t *end)
696 - {
697 - return PyUnicode_FromWideChar (start, (end - start));
698 - }
699 -
700 --JSOBJ Object_newTrue(void *prv)
701 -+static JSOBJ Object_newTrue(void *prv)
702 - {
703 - Py_RETURN_TRUE;
704 - }
705 -
706 --JSOBJ Object_newFalse(void *prv)
707 -+static JSOBJ Object_newFalse(void *prv)
708 - {
709 - Py_RETURN_FALSE;
710 - }
711 -
712 --JSOBJ Object_newNull(void *prv)
713 -+static JSOBJ Object_newNull(void *prv)
714 - {
715 - Py_RETURN_NONE;
716 - }
717 -
718 --JSOBJ Object_newObject(void *prv)
719 -+static JSOBJ Object_newObject(void *prv)
720 - {
721 - return PyDict_New();
722 - }
723 -
724 --JSOBJ Object_newArray(void *prv)
725 -+static JSOBJ Object_newArray(void *prv)
726 - {
727 - return PyList_New(0);
728 - }
729 -
730 --JSOBJ Object_newInteger(void *prv, JSINT32 value)
731 -+static JSOBJ Object_newInteger(void *prv, JSINT32 value)
732 - {
733 - return PyInt_FromLong( (long) value);
734 - }
735 -
736 --JSOBJ Object_newLong(void *prv, JSINT64 value)
737 -+static JSOBJ Object_newLong(void *prv, JSINT64 value)
738 - {
739 - return PyLong_FromLongLong (value);
740 - }
741 -
742 --JSOBJ Object_newUnsignedLong(void *prv, JSUINT64 value)
743 -+static JSOBJ Object_newUnsignedLong(void *prv, JSUINT64 value)
744 - {
745 - return PyLong_FromUnsignedLongLong (value);
746 - }
747 -
748 --JSOBJ Object_newDouble(void *prv, double value)
749 -+static JSOBJ Object_newDouble(void *prv, double value)
750 - {
751 - return PyFloat_FromDouble(value);
752 - }
753 -diff --git a/python/objToJSON.c b/python/objToJSON.c
754 -index 04a4575..1960d40 100644
755 ---- a/python/objToJSON.c
756 -+++ b/python/objToJSON.c
757 -@@ -226,7 +226,7 @@ static void *PyDateToINT64(JSOBJ _obj, JSONTypeContext *tc, void *outValue, size
758 - return NULL;
759 - }
760 -
761 --int Tuple_iterNext(JSOBJ obj, JSONTypeContext *tc)
762 -+static int Tuple_iterNext(JSOBJ obj, JSONTypeContext *tc)
763 - {
764 - PyObject *item;
765 -
766 -@@ -242,21 +242,21 @@ int Tuple_iterNext(JSOBJ obj, JSONTypeContext *tc)
767 - return 1;
768 - }
769 -
770 --void Tuple_iterEnd(JSOBJ obj, JSONTypeContext *tc)
771 -+static void Tuple_iterEnd(JSOBJ obj, JSONTypeContext *tc)
772 - {
773 - }
774 -
775 --JSOBJ Tuple_iterGetValue(JSOBJ obj, JSONTypeContext *tc)
776 -+static JSOBJ Tuple_iterGetValue(JSOBJ obj, JSONTypeContext *tc)
777 - {
778 - return GET_TC(tc)->itemValue;
779 - }
780 -
781 --char *Tuple_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
782 -+static char *Tuple_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
783 - {
784 - return NULL;
785 - }
786 -
787 --int Iter_iterNext(JSOBJ obj, JSONTypeContext *tc)
788 -+static int Iter_iterNext(JSOBJ obj, JSONTypeContext *tc)
789 - {
790 - PyObject *item;
791 -
792 -@@ -282,7 +282,7 @@ int Iter_iterNext(JSOBJ obj, JSONTypeContext *tc)
793 - return 1;
794 - }
795 -
796 --void Iter_iterEnd(JSOBJ obj, JSONTypeContext *tc)
797 -+static void Iter_iterEnd(JSOBJ obj, JSONTypeContext *tc)
798 - {
799 - if (GET_TC(tc)->itemValue)
800 - {
801 -@@ -297,17 +297,17 @@ void Iter_iterEnd(JSOBJ obj, JSONTypeContext *tc)
802 - }
803 - }
804 -
805 --JSOBJ Iter_iterGetValue(JSOBJ obj, JSONTypeContext *tc)
806 -+static JSOBJ Iter_iterGetValue(JSOBJ obj, JSONTypeContext *tc)
807 - {
808 - return GET_TC(tc)->itemValue;
809 - }
810 -
811 --char *Iter_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
812 -+static char *Iter_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
813 - {
814 - return NULL;
815 - }
816 -
817 --void Dir_iterEnd(JSOBJ obj, JSONTypeContext *tc)
818 -+static void Dir_iterEnd(JSOBJ obj, JSONTypeContext *tc)
819 - {
820 - if (GET_TC(tc)->itemValue)
821 - {
822 -@@ -325,7 +325,7 @@ void Dir_iterEnd(JSOBJ obj, JSONTypeContext *tc)
823 - PRINTMARK();
824 - }
825 -
826 --int Dir_iterNext(JSOBJ _obj, JSONTypeContext *tc)
827 -+static int Dir_iterNext(JSOBJ _obj, JSONTypeContext *tc)
828 - {
829 - PyObject *obj = (PyObject *) _obj;
830 - PyObject *itemValue = GET_TC(tc)->itemValue;
831 -@@ -401,20 +401,20 @@ int Dir_iterNext(JSOBJ _obj, JSONTypeContext *tc)
832 - return 1;
833 - }
834 -
835 --JSOBJ Dir_iterGetValue(JSOBJ obj, JSONTypeContext *tc)
836 -+static JSOBJ Dir_iterGetValue(JSOBJ obj, JSONTypeContext *tc)
837 - {
838 - PRINTMARK();
839 - return GET_TC(tc)->itemValue;
840 - }
841 -
842 --char *Dir_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
843 -+static char *Dir_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
844 - {
845 - PRINTMARK();
846 - *outLen = PyString_GET_SIZE(GET_TC(tc)->itemName);
847 - return PyString_AS_STRING(GET_TC(tc)->itemName);
848 - }
849 -
850 --int List_iterNext(JSOBJ obj, JSONTypeContext *tc)
851 -+static int List_iterNext(JSOBJ obj, JSONTypeContext *tc)
852 - {
853 - if (GET_TC(tc)->index >= GET_TC(tc)->size)
854 - {
855 -@@ -427,16 +427,16 @@ int List_iterNext(JSOBJ obj, JSONTypeContext *tc)
856 - return 1;
857 - }
858 -
859 --void List_iterEnd(JSOBJ obj, JSONTypeContext *tc)
860 -+static void List_iterEnd(JSOBJ obj, JSONTypeContext *tc)
861 - {
862 - }
863 -
864 --JSOBJ List_iterGetValue(JSOBJ obj, JSONTypeContext *tc)
865 -+static JSOBJ List_iterGetValue(JSOBJ obj, JSONTypeContext *tc)
866 - {
867 - return GET_TC(tc)->itemValue;
868 - }
869 -
870 --char *List_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
871 -+static char *List_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
872 - {
873 - return NULL;
874 - }
875 -@@ -447,7 +447,7 @@ char *List_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
876 - // itemValue is borrowed from object (which is dict). No refCounting
877 - //=============================================================================
878 -
879 --int Dict_iterNext(JSOBJ obj, JSONTypeContext *tc)
880 -+static int Dict_iterNext(JSOBJ obj, JSONTypeContext *tc)
881 - {
882 - #if PY_MAJOR_VERSION >= 3
883 - PyObject* itemNameTmp;
884 -@@ -488,7 +488,7 @@ int Dict_iterNext(JSOBJ obj, JSONTypeContext *tc)
885 - return 1;
886 - }
887 -
888 --void Dict_iterEnd(JSOBJ obj, JSONTypeContext *tc)
889 -+static void Dict_iterEnd(JSOBJ obj, JSONTypeContext *tc)
890 - {
891 - if (GET_TC(tc)->itemName)
892 - {
893 -@@ -499,18 +499,18 @@ void Dict_iterEnd(JSOBJ obj, JSONTypeContext *tc)
894 - PRINTMARK();
895 - }
896 -
897 --JSOBJ Dict_iterGetValue(JSOBJ obj, JSONTypeContext *tc)
898 -+static JSOBJ Dict_iterGetValue(JSOBJ obj, JSONTypeContext *tc)
899 - {
900 - return GET_TC(tc)->itemValue;
901 - }
902 -
903 --char *Dict_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
904 -+static char *Dict_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
905 - {
906 - *outLen = PyString_GET_SIZE(GET_TC(tc)->itemName);
907 - return PyString_AS_STRING(GET_TC(tc)->itemName);
908 - }
909 -
910 --int SortedDict_iterNext(JSOBJ obj, JSONTypeContext *tc)
911 -+static int SortedDict_iterNext(JSOBJ obj, JSONTypeContext *tc)
912 - {
913 - PyObject *items = NULL, *item = NULL, *key = NULL, *value = NULL;
914 - Py_ssize_t i, nitems;
915 -@@ -603,7 +603,7 @@ error:
916 - return -1;
917 - }
918 -
919 --void SortedDict_iterEnd(JSOBJ obj, JSONTypeContext *tc)
920 -+static void SortedDict_iterEnd(JSOBJ obj, JSONTypeContext *tc)
921 - {
922 - GET_TC(tc)->itemName = NULL;
923 - GET_TC(tc)->itemValue = NULL;
924 -@@ -612,19 +612,19 @@ void SortedDict_iterEnd(JSOBJ obj, JSONTypeContext *tc)
925 - PRINTMARK();
926 - }
927 -
928 --JSOBJ SortedDict_iterGetValue(JSOBJ obj, JSONTypeContext *tc)
929 -+static JSOBJ SortedDict_iterGetValue(JSOBJ obj, JSONTypeContext *tc)
930 - {
931 - return GET_TC(tc)->itemValue;
932 - }
933 -
934 --char *SortedDict_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
935 -+static char *SortedDict_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
936 - {
937 - *outLen = PyString_GET_SIZE(GET_TC(tc)->itemName);
938 - return PyString_AS_STRING(GET_TC(tc)->itemName);
939 - }
940 -
941 -
942 --void SetupDictIter(PyObject *dictObj, TypeContext *pc, JSONObjectEncoder *enc)
943 -+static void SetupDictIter(PyObject *dictObj, TypeContext *pc, JSONObjectEncoder *enc)
944 - {
945 - if (enc->sortKeys) {
946 - pc->iterEnd = SortedDict_iterEnd;
947 -@@ -642,7 +642,7 @@ void SetupDictIter(PyObject *dictObj, TypeContext *pc, JSONObjectEncoder *enc)
948 - pc->index = 0;
949 - }
950 -
951 --void Object_beginTypeContext (JSOBJ _obj, JSONTypeContext *tc, JSONObjectEncoder *enc)
952 -+static void Object_beginTypeContext (JSOBJ _obj, JSONTypeContext *tc, JSONObjectEncoder *enc)
953 - {
954 - PyObject *obj, *exc, *iter;
955 - TypeContext *pc;
956 -@@ -929,7 +929,7 @@ INVALID:
957 - return;
958 - }
959 -
960 --void Object_endTypeContext(JSOBJ obj, JSONTypeContext *tc)
961 -+static void Object_endTypeContext(JSOBJ obj, JSONTypeContext *tc)
962 - {
963 - Py_XDECREF(GET_TC(tc)->newObj);
964 -
965 -@@ -937,33 +937,33 @@ void Object_endTypeContext(JSOBJ obj, JSONTypeContext *tc)
966 - tc->prv = NULL;
967 - }
968 -
969 --const char *Object_getStringValue(JSOBJ obj, JSONTypeContext *tc, size_t *_outLen)
970 -+static const char *Object_getStringValue(JSOBJ obj, JSONTypeContext *tc, size_t *_outLen)
971 - {
972 - return GET_TC(tc)->PyTypeToJSON (obj, tc, NULL, _outLen);
973 - }
974 -
975 --JSINT64 Object_getLongValue(JSOBJ obj, JSONTypeContext *tc)
976 -+static JSINT64 Object_getLongValue(JSOBJ obj, JSONTypeContext *tc)
977 - {
978 - JSINT64 ret;
979 - GET_TC(tc)->PyTypeToJSON (obj, tc, &ret, NULL);
980 - return ret;
981 - }
982 -
983 --JSUINT64 Object_getUnsignedLongValue(JSOBJ obj, JSONTypeContext *tc)
984 -+static JSUINT64 Object_getUnsignedLongValue(JSOBJ obj, JSONTypeContext *tc)
985 - {
986 - JSUINT64 ret;
987 - GET_TC(tc)->PyTypeToJSON (obj, tc, &ret, NULL);
988 - return ret;
989 - }
990 -
991 --JSINT32 Object_getIntValue(JSOBJ obj, JSONTypeContext *tc)
992 -+static JSINT32 Object_getIntValue(JSOBJ obj, JSONTypeContext *tc)
993 - {
994 - JSINT32 ret;
995 - GET_TC(tc)->PyTypeToJSON (obj, tc, &ret, NULL);
996 - return ret;
997 - }
998 -
999 --double Object_getDoubleValue(JSOBJ obj, JSONTypeContext *tc)
1000 -+static double Object_getDoubleValue(JSOBJ obj, JSONTypeContext *tc)
1001 - {
1002 - double ret;
1003 - GET_TC(tc)->PyTypeToJSON (obj, tc, &ret, NULL);
1004 -@@ -975,22 +975,22 @@ static void Object_releaseObject(JSOBJ _obj)
1005 - Py_DECREF( (PyObject *) _obj);
1006 - }
1007 -
1008 --int Object_iterNext(JSOBJ obj, JSONTypeContext *tc)
1009 -+static int Object_iterNext(JSOBJ obj, JSONTypeContext *tc)
1010 - {
1011 - return GET_TC(tc)->iterNext(obj, tc);
1012 - }
1013 -
1014 --void Object_iterEnd(JSOBJ obj, JSONTypeContext *tc)
1015 -+static void Object_iterEnd(JSOBJ obj, JSONTypeContext *tc)
1016 - {
1017 - GET_TC(tc)->iterEnd(obj, tc);
1018 - }
1019 -
1020 --JSOBJ Object_iterGetValue(JSOBJ obj, JSONTypeContext *tc)
1021 -+static JSOBJ Object_iterGetValue(JSOBJ obj, JSONTypeContext *tc)
1022 - {
1023 - return GET_TC(tc)->iterGetValue(obj, tc);
1024 - }
1025 -
1026 --char *Object_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
1027 -+static char *Object_iterGetName(JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
1028 - {
1029 - return GET_TC(tc)->iterGetName(obj, tc, outLen);
1030 - }
1031
1032 diff --git a/dev-python/ujson/ujson-1.35-r1.ebuild b/dev-python/ujson/ujson-1.35-r1.ebuild
1033 deleted file mode 100644
1034 index 389113fbc47..00000000000
1035 --- a/dev-python/ujson/ujson-1.35-r1.ebuild
1036 +++ /dev/null
1037 @@ -1,37 +0,0 @@
1038 -# Copyright 1999-2020 Gentoo Authors
1039 -# Distributed under the terms of the GNU General Public License v2
1040 -
1041 -EAPI=7
1042 -PYTHON_COMPAT=( python3_{7,8,9} pypy3 )
1043 -
1044 -inherit distutils-r1
1045 -
1046 -DESCRIPTION="Ultra fast JSON encoder and decoder for Python"
1047 -HOMEPAGE="https://pypi.org/project/ujson/"
1048 -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
1049 -
1050 -LICENSE="BSD"
1051 -SLOT="0"
1052 -KEYWORDS="amd64 ~arm ~arm64 x86 ~amd64-linux ~x86-linux"
1053 -IUSE="test"
1054 -RESTRICT="!test? ( test )"
1055 -
1056 -DEPEND="
1057 - dev-python/setuptools[${PYTHON_USEDEP}]
1058 - test? (
1059 - dev-python/pytz[${PYTHON_USEDEP}]
1060 - )
1061 -"
1062 -
1063 -PATCHES=(
1064 - "${FILESDIR}/${P}-sort_keys-segfault.patch"
1065 - "${FILESDIR}/${P}-use-static-where-possible.patch"
1066 - "${FILESDIR}/${P}-fix-for-overflowing-long.patch"
1067 - "${FILESDIR}/${P}-standard-handling-of-none.patch"
1068 - "${FILESDIR}/${P}-fix-ordering-of-orderdict.patch"
1069 - "${FILESDIR}/${P}-test-depricationwarning.patch"
1070 -)
1071 -
1072 -python_test() {
1073 - "${PYTHON}" tests/tests.py || die
1074 -}
1075
1076 diff --git a/dev-python/ujson/ujson-4.0.1.ebuild b/dev-python/ujson/ujson-4.0.1.ebuild
1077 deleted file mode 100644
1078 index b6555cc8fa7..00000000000
1079 --- a/dev-python/ujson/ujson-4.0.1.ebuild
1080 +++ /dev/null
1081 @@ -1,24 +0,0 @@
1082 -# Copyright 1999-2020 Gentoo Authors
1083 -# Distributed under the terms of the GNU General Public License v2
1084 -
1085 -EAPI=7
1086 -PYTHON_COMPAT=( python3_{7..9} pypy3 )
1087 -
1088 -inherit distutils-r1
1089 -
1090 -DESCRIPTION="Ultra fast JSON encoder and decoder for Python"
1091 -HOMEPAGE="https://pypi.org/project/ujson/"
1092 -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
1093 -
1094 -LICENSE="BSD"
1095 -SLOT="0"
1096 -KEYWORDS="amd64 arm arm64 x86 ~amd64-linux ~x86-linux"
1097 -IUSE="test"
1098 -RESTRICT="!test? ( test )"
1099 -
1100 -DEPEND="
1101 - dev-python/setuptools_scm[${PYTHON_USEDEP}]
1102 - test? ( dev-python/pytz[${PYTHON_USEDEP}] )
1103 -"
1104 -
1105 -distutils_enable_tests pytest