devel/py-jcc: unbreak with clang 4.0

jcc/sources/JArray.cpp:315:66: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
        PyList_Type.tp_as_sequence->sq_inplace_concat(list, arg) < 0)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
jcc/sources/JArray.cpp:330:64: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
        PyList_Type.tp_as_sequence->sq_inplace_repeat(list, n) < 0)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~

Reported by:	antoine (via exp-run)
This commit is contained in:
Jan Beich 2017-02-01 05:29:46 +00:00
parent 11b1ad8d78
commit 9138b51d23
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=432989
2 changed files with 21 additions and 0 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= jcc
PORTVERSION= 2.22
PORTREVISION= 1
CATEGORIES= devel java python
MASTER_SITES= CHEESESHOP/source/J/JCC
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

View File

@ -0,0 +1,20 @@
--- jcc/sources/JArray.cpp.orig 2014-02-05 23:36:44 UTC
+++ jcc/sources/JArray.cpp
@@ -312,7 +312,7 @@ static PyObject *seq_concat(U *self, PyO
PyObject *list = toSequence<U>(self);
if (list != NULL &&
- PyList_Type.tp_as_sequence->sq_inplace_concat(list, arg) < 0)
+ PyList_Type.tp_as_sequence->sq_inplace_concat(list, arg) == NULL)
{
Py_DECREF(list);
return NULL;
@@ -327,7 +327,7 @@ static PyObject *seq_repeat(U *self, Py_
PyObject *list = toSequence<U>(self);
if (list != NULL &&
- PyList_Type.tp_as_sequence->sq_inplace_repeat(list, n) < 0)
+ PyList_Type.tp_as_sequence->sq_inplace_repeat(list, n) == NULL)
{
Py_DECREF(list);
return NULL;