You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python3 setup.py install
running install
running build
running build_ext
building 'cjson' extension
creating build
creating build/temp.macosx-10.14-x86_64-3.7
xcrun -sdk macosx clang -arch x86_64 -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Headers -DMODULE_VERSION=1.2.1 -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/include/python3.7m -c cjson.c -o build/temp.macosx-10.14-x86_64-3.7/cjson.o
cjson.c:167:18: warning: implicit declaration of function
'PyString_DecodeEscape' is invalid in C99
[-Wimplicit-function-declaration]
object = PyString_DecodeEscape(jsondata->ptr+1, len, NULL, 0, NULL);
^
cjson.c:167:16: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
object = PyString_DecodeEscape(jsondata->ptr+1, len, NULL, 0, NULL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:169:18: warning: implicit declaration of function
'PyString_FromStringAndSize' is invalid in C99
[-Wimplicit-function-declaration]
object = PyString_FromStringAndSize(jsondata->ptr+1, len);
^
cjson.c:169:16: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
object = PyString_FromStringAndSize(jsondata->ptr+1, len);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:185:39: warning: implicit declaration of function 'PyString_AsString' is
invalid in C99 [-Wimplicit-function-declaration]
reason ? PyString_AsString(reason) : "bad format");
^
cjson.c:185:37: warning: pointer/integer type mismatch in conditional expression
('int' and 'char *') [-Wconditional-type-mismatch]
reason ? PyString_AsString(reason) : "bad format");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
cjson.c:295:11: warning: implicit declaration of function
'PyString_FromStringAndSize' is invalid in C99
[-Wimplicit-function-declaration]
str = PyString_FromStringAndSize(jsondata->ptr, ptr - jsondata->ptr);
^
cjson.c:295:9: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
str = PyString_FromStringAndSize(jsondata->ptr, ptr - jsondata->ptr);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:300:42: error: too many arguments to function call, expected 1, have 2
object = PyFloat_FromString(str, NULL);
~~~~~~~~~~~~~~~~~~ ^~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include/stddef.h:105:16: note:
expanded from macro 'NULL'
define NULL ((void*)0)
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/include/python3.7m/floatobject.h:42:12: note:
'PyFloat_FromString' declared here
PyAPI_FUNC(PyObject ) PyFloat_FromString(PyObject);
^
cjson.c:302:18: warning: implicit declaration of function 'PyInt_FromString' is
invalid in C99 [-Wimplicit-function-declaration]
object = PyInt_FromString(PyString_AS_STRING(str), NULL, 10);
^
cjson.c:302:35: warning: implicit declaration of function 'PyString_AS_STRING'
is invalid in C99 [-Wimplicit-function-declaration]
object = PyInt_FromString(PyString_AS_STRING(str), NULL, 10);
^
cjson.c:302:16: warning: incompatible integer to pointer conversion assigning to
'PyObject ' (aka 'struct _object ') from 'int' [-Wint-conversion]
object = PyInt_FromString(PyString_AS_STRING(str), NULL, 10);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:593:14: error: unknown type name 'PyStringObject'
register PyStringObject op = (PyStringObject) string;
^
cjson.c:593:51: error: expected expression
register PyStringObject* op = (PyStringObject*) string;
^
cjson.c:593:36: error: use of undeclared identifier 'PyStringObject'
register PyStringObject* op = (PyStringObject*) string;
^
cjson.c:602:9: warning: implicit declaration of function
'PyString_FromStringAndSize' is invalid in C99
[-Wimplicit-function-declaration]
v = PyString_FromStringAndSize((char *)NULL, newsize);
^
cjson.c:602:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
v = PyString_FromStringAndSize((char *)NULL, newsize);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:614:13: warning: implicit declaration of function 'PyString_AS_STRING'
is invalid in C99 [-Wimplicit-function-declaration]
p = PyString_AS_STRING(v);
^
cjson.c:614:11: warning: incompatible integer to pointer conversion assigning to
'char ' from 'int' [-Wint-conversion]
p = PyString_AS_STRING(v);
^ ~~~~~~~~~~~~~~~~~~~~~
cjson.c:646:9: warning: implicit declaration of function '_PyString_Resize' is
invalid in C99 [-Wimplicit-function-declaration]
_PyString_Resize(&v, (int) (p - PyString_AS_STRING(v)));
^
cjson.c:697:12: warning: implicit declaration of function
'PyString_FromStringAndSize' is invalid in C99
[-Wimplicit-function-declaration]
repr = PyString_FromStringAndSize(NULL, 2 + expandsizesize + 1);
^
cjson.c:697:10: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object ') from 'int' [-Wint-conversion]
repr = PyString_FromStringAndSize(NULL, 2 + expandsizesize + 1);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:701:9: warning: implicit declaration of function 'PyString_AS_STRING' is
invalid in C99 [-Wimplicit-function-declaration]
p = PyString_AS_STRING(repr);
^
cjson.c:701:7: warning: incompatible integer to pointer conversion assigning to
'char *' from 'int' [-Wint-conversion]
p = PyString_AS_STRING(repr);
^ ~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:709:57: error: subscripted value is not an array, pointer, or vector
if ((ch == (Py_UNICODE) PyString_AS_STRING(repr)[0] || ch == '\')) {
~~~~~~~~~~~~~~~~~~~~~~~~^~
cjson.c:785:36: error: subscripted value is not an array, pointer, or vector
*p++ = PyString_AS_STRING(repr)[0];
~~~~~~~~~~~~~~~~~~~~~~~~^~
cjson.c:788:5: warning: implicit declaration of function '_PyString_Resize' is
invalid in C99 [-Wimplicit-function-declaration]
_PyString_Resize(&repr, p - PyString_AS_STRING(repr));
^
cjson.c:809:12: error: no member named 'ob_size' in 'PyTupleObject'
n = v->ob_size;
~ ^
cjson.c:811:16: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString("[]");
^
cjson.c:811:16: warning: incompatible integer to pointer conversion returning
'int' from a function with result type 'PyObject *'
(aka 'struct _object *') [-Wint-conversion]
return PyString_FromString("[]");
^~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:827:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString("[");
^ ~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:831:5: warning: implicit declaration of function 'PyString_ConcatAndDel'
is invalid in C99 [-Wimplicit-function-declaration]
PyString_ConcatAndDel(&s, temp);
^
cjson.c:836:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString("]");
^ ~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:846:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString(", ");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:849:14: warning: implicit declaration of function '_PyString_Join' is
invalid in C99 [-Wimplicit-function-declaration]
result = _PyString_Join(s, pieces);
^
cjson.c:849:12: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
result = _PyString_Join(s, pieces);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:883:12: error: no member named 'ob_size' in 'PyListObject'
if (v->ob_size == 0) {
~ ^
cjson.c:884:18: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
result = PyString_FromString("[]");
^
cjson.c:884:16: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
result = PyString_FromString("[]");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:894:24: error: no member named 'ob_size' in 'PyListObject'
for (i = 0; i < v->ob_size; ++i) {
~ ^
cjson.c:907:9: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
s = PyString_FromString("[");
^
cjson.c:907:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString("[");
^ ~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:911:5: warning: implicit declaration of function 'PyString_ConcatAndDel'
is invalid in C99 [-Wimplicit-function-declaration]
PyString_ConcatAndDel(&s, temp);
^
cjson.c:916:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString("]");
^ ~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:926:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString(", ");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:929:14: warning: implicit declaration of function '_PyString_Join' is
invalid in C99 [-Wimplicit-function-declaration]
result = _PyString_Join(s, pieces);
^
cjson.c:929:12: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
result = _PyString_Join(s, pieces);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:968:18: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
result = PyString_FromString("{}");
^
cjson.c:968:16: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
result = PyString_FromString("{}");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:976:13: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
colon = PyString_FromString(": ");
^
cjson.c:976:11: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
colon = PyString_FromString(": ");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:986:14: warning: implicit declaration of function 'PyString_Check' is
invalid in C99 [-Wimplicit-function-declaration]
if (!PyString_Check(key) && !PyUnicode_Check(key)) {
^
cjson.c:995:9: warning: implicit declaration of function 'PyString_Concat' is
invalid in C99 [-Wimplicit-function-declaration]
PyString_Concat(&s, colon);
^
cjson.c:996:9: warning: implicit declaration of function 'PyString_ConcatAndDel'
is invalid in C99 [-Wimplicit-function-declaration]
PyString_ConcatAndDel(&s, encode_object(value));
^
cjson.c:1008:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString("{");
^ ~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1012:5: warning: implicit declaration of function
'PyString_ConcatAndDel' is invalid in C99
[-Wimplicit-function-declaration]
PyString_ConcatAndDel(&s, temp);
^
cjson.c:1017:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString("}");
^ ~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1027:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString(", ");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1030:14: warning: implicit declaration of function '_PyString_Join' is
invalid in C99 [-Wimplicit-function-declaration]
result = _PyString_Join(s, pieces);
^
cjson.c:1030:12: warning: incompatible integer to pointer conversion assigning
to 'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
result = _PyString_Join(s, pieces);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1045:16: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString("true");
^
cjson.c:1045:16: warning: incompatible integer to pointer conversion returning
'int' from a function with result type 'PyObject *'
(aka 'struct _object *') [-Wint-conversion]
return PyString_FromString("true");
^~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1047:16: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString("false");
^
cjson.c:1047:16: warning: incompatible integer to pointer conversion returning
'int' from a function with result type 'PyObject *'
(aka 'struct _object *') [-Wint-conversion]
return PyString_FromString("false");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1049:16: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString("null");
^
cjson.c:1049:16: warning: incompatible integer to pointer conversion returning
'int' from a function with result type 'PyObject *'
(aka 'struct _object *') [-Wint-conversion]
return PyString_FromString("null");
^~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1050:16: warning: implicit declaration of function 'PyString_Check' is
invalid in C99 [-Wimplicit-function-declaration]
} else if (PyString_Check(object)) {
^
cjson.c:1057:20: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString("NaN");
^
cjson.c:1057:20: warning: incompatible integer to pointer conversion returning
'int' from a function with result type 'PyObject *'
(aka 'struct _object *') [-Wint-conversion]
return PyString_FromString("NaN");
^~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1060:24: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString("Infinity");
^
cjson.c:1060:24: warning: incompatible integer to pointer conversion returning
'int' from a function with result type 'PyObject *'
(aka 'struct _object *') [-Wint-conversion]
return PyString_FromString("Infinity");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1062:24: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString("-Infinity");
^
cjson.c:1062:24: warning: incompatible integer to pointer conversion returning
'int' from a function with result type 'PyObject *'
(aka 'struct _object *') [-Wint-conversion]
return PyString_FromString("-Infinity");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1067:16: warning: implicit declaration of function 'PyInt_Check' is
invalid in C99 [-Wimplicit-function-declaration]
} else if (PyInt_Check(object) || PyLong_Check(object)) {
^
cjson.c:1130:9: warning: implicit declaration of function
'PyString_AsStringAndSize' is invalid in C99
[-Wimplicit-function-declaration]
if (PyString_AsStringAndSize(str, &(jsondata.str), NULL) == -1) {
^
cjson.c:1136:35: warning: implicit declaration of function 'PyString_GET_SIZE'
is invalid in C99 [-Wimplicit-function-declaration]
jsondata.end = jsondata.str + PyString_GET_SIZE(str);
^
cjson.c:1187:9: warning: implicit declaration of function 'Py_InitModule3' is
invalid in C99 [-Wimplicit-function-declaration]
m = Py_InitModule3("cjson", cjson_methods, module_doc);
^
cjson.c:1187:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
m = Py_InitModule3("cjson", cjson_methods, module_doc);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1190:9: error: non-void function 'initcjson' should return a value
[-Wreturn-type]
return;
^
cjson.c:1194:9: error: non-void function 'initcjson' should return a value
[-Wreturn-type]
return;
^
cjson.c:1200:9: error: non-void function 'initcjson' should return a value
[-Wreturn-type]
return;
^
cjson.c:1206:9: error: non-void function 'initcjson' should return a value
[-Wreturn-type]
return;
^
69 warnings and 13 errors generated.
error: command 'xcrun' failed with exit status 1
The text was updated successfully, but these errors were encountered:
Here is what I get when I try to install it on Mac (I need it to be able to run BONSAI http://alpage.inria.fr/statgram/frdep/fr_stat_dep_bky.html) Can you help me install it? Thanks!
python3 setup.py install
running install
running build
running build_ext
building 'cjson' extension
creating build
creating build/temp.macosx-10.14-x86_64-3.7
xcrun -sdk macosx clang -arch x86_64 -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Headers -DMODULE_VERSION=1.2.1 -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/include/python3.7m -c cjson.c -o build/temp.macosx-10.14-x86_64-3.7/cjson.o
cjson.c:167:18: warning: implicit declaration of function
'PyString_DecodeEscape' is invalid in C99
[-Wimplicit-function-declaration]
object = PyString_DecodeEscape(jsondata->ptr+1, len, NULL, 0, NULL);
^
cjson.c:167:16: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
object = PyString_DecodeEscape(jsondata->ptr+1, len, NULL, 0, NULL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:169:18: warning: implicit declaration of function
'PyString_FromStringAndSize' is invalid in C99
[-Wimplicit-function-declaration]
object = PyString_FromStringAndSize(jsondata->ptr+1, len);
^
cjson.c:169:16: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
object = PyString_FromStringAndSize(jsondata->ptr+1, len);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:185:39: warning: implicit declaration of function 'PyString_AsString' is
invalid in C99 [-Wimplicit-function-declaration]
reason ? PyString_AsString(reason) : "bad format");
^
cjson.c:185:37: warning: pointer/integer type mismatch in conditional expression
('int' and 'char *') [-Wconditional-type-mismatch]
reason ? PyString_AsString(reason) : "bad format");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
cjson.c:295:11: warning: implicit declaration of function
'PyString_FromStringAndSize' is invalid in C99
[-Wimplicit-function-declaration]
str = PyString_FromStringAndSize(jsondata->ptr, ptr - jsondata->ptr);
^
cjson.c:295:9: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
str = PyString_FromStringAndSize(jsondata->ptr, ptr - jsondata->ptr);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:300:42: error: too many arguments to function call, expected 1, have 2
object = PyFloat_FromString(str, NULL);
~~~~~~~~~~~~~~~~~~ ^~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include/stddef.h:105:16: note:
expanded from macro 'NULL'
define NULL ((void*)0)
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/include/python3.7m/floatobject.h:42:12: note:
'PyFloat_FromString' declared here
PyAPI_FUNC(PyObject ) PyFloat_FromString(PyObject);
^
cjson.c:302:18: warning: implicit declaration of function 'PyInt_FromString' is
invalid in C99 [-Wimplicit-function-declaration]
object = PyInt_FromString(PyString_AS_STRING(str), NULL, 10);
^
cjson.c:302:35: warning: implicit declaration of function 'PyString_AS_STRING'
is invalid in C99 [-Wimplicit-function-declaration]
object = PyInt_FromString(PyString_AS_STRING(str), NULL, 10);
^
cjson.c:302:16: warning: incompatible integer to pointer conversion assigning to
'PyObject ' (aka 'struct _object ') from 'int' [-Wint-conversion]
object = PyInt_FromString(PyString_AS_STRING(str), NULL, 10);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:593:14: error: unknown type name 'PyStringObject'
register PyStringObject op = (PyStringObject) string;
^
cjson.c:593:51: error: expected expression
register PyStringObject* op = (PyStringObject*) string;
^
cjson.c:593:36: error: use of undeclared identifier 'PyStringObject'
register PyStringObject* op = (PyStringObject*) string;
^
cjson.c:602:9: warning: implicit declaration of function
'PyString_FromStringAndSize' is invalid in C99
[-Wimplicit-function-declaration]
v = PyString_FromStringAndSize((char *)NULL, newsize);
^
cjson.c:602:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
v = PyString_FromStringAndSize((char *)NULL, newsize);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:614:13: warning: implicit declaration of function 'PyString_AS_STRING'
is invalid in C99 [-Wimplicit-function-declaration]
p = PyString_AS_STRING(v);
^
cjson.c:614:11: warning: incompatible integer to pointer conversion assigning to
'char ' from 'int' [-Wint-conversion]
p = PyString_AS_STRING(v);
^ ~~~~~~~~~~~~~~~~~~~~~
cjson.c:646:9: warning: implicit declaration of function '_PyString_Resize' is
invalid in C99 [-Wimplicit-function-declaration]
_PyString_Resize(&v, (int) (p - PyString_AS_STRING(v)));
^
cjson.c:697:12: warning: implicit declaration of function
'PyString_FromStringAndSize' is invalid in C99
[-Wimplicit-function-declaration]
repr = PyString_FromStringAndSize(NULL, 2 + expandsizesize + 1);
^
cjson.c:697:10: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object ') from 'int' [-Wint-conversion]
repr = PyString_FromStringAndSize(NULL, 2 + expandsizesize + 1);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:701:9: warning: implicit declaration of function 'PyString_AS_STRING' is
invalid in C99 [-Wimplicit-function-declaration]
p = PyString_AS_STRING(repr);
^
cjson.c:701:7: warning: incompatible integer to pointer conversion assigning to
'char *' from 'int' [-Wint-conversion]
p = PyString_AS_STRING(repr);
^ ~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:709:57: error: subscripted value is not an array, pointer, or vector
if ((ch == (Py_UNICODE) PyString_AS_STRING(repr)[0] || ch == '\')) {
~~~~~~~~~~~~~~~~~~~~~~~~^~
cjson.c:785:36: error: subscripted value is not an array, pointer, or vector
*p++ = PyString_AS_STRING(repr)[0];
~~~~~~~~~~~~~~~~~~~~~~~~^~
cjson.c:788:5: warning: implicit declaration of function '_PyString_Resize' is
invalid in C99 [-Wimplicit-function-declaration]
_PyString_Resize(&repr, p - PyString_AS_STRING(repr));
^
cjson.c:809:12: error: no member named 'ob_size' in 'PyTupleObject'
n = v->ob_size;
~ ^
cjson.c:811:16: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString("[]");
^
cjson.c:811:16: warning: incompatible integer to pointer conversion returning
'int' from a function with result type 'PyObject *'
(aka 'struct _object *') [-Wint-conversion]
return PyString_FromString("[]");
^~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:827:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString("[");
^ ~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:831:5: warning: implicit declaration of function 'PyString_ConcatAndDel'
is invalid in C99 [-Wimplicit-function-declaration]
PyString_ConcatAndDel(&s, temp);
^
cjson.c:836:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString("]");
^ ~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:846:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString(", ");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:849:14: warning: implicit declaration of function '_PyString_Join' is
invalid in C99 [-Wimplicit-function-declaration]
result = _PyString_Join(s, pieces);
^
cjson.c:849:12: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
result = _PyString_Join(s, pieces);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:883:12: error: no member named 'ob_size' in 'PyListObject'
if (v->ob_size == 0) {
~ ^
cjson.c:884:18: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
result = PyString_FromString("[]");
^
cjson.c:884:16: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
result = PyString_FromString("[]");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:894:24: error: no member named 'ob_size' in 'PyListObject'
for (i = 0; i < v->ob_size; ++i) {
~ ^
cjson.c:907:9: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
s = PyString_FromString("[");
^
cjson.c:907:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString("[");
^ ~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:911:5: warning: implicit declaration of function 'PyString_ConcatAndDel'
is invalid in C99 [-Wimplicit-function-declaration]
PyString_ConcatAndDel(&s, temp);
^
cjson.c:916:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString("]");
^ ~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:926:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString(", ");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:929:14: warning: implicit declaration of function '_PyString_Join' is
invalid in C99 [-Wimplicit-function-declaration]
result = _PyString_Join(s, pieces);
^
cjson.c:929:12: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
result = _PyString_Join(s, pieces);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:968:18: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
result = PyString_FromString("{}");
^
cjson.c:968:16: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
result = PyString_FromString("{}");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:976:13: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
colon = PyString_FromString(": ");
^
cjson.c:976:11: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
colon = PyString_FromString(": ");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:986:14: warning: implicit declaration of function 'PyString_Check' is
invalid in C99 [-Wimplicit-function-declaration]
if (!PyString_Check(key) && !PyUnicode_Check(key)) {
^
cjson.c:995:9: warning: implicit declaration of function 'PyString_Concat' is
invalid in C99 [-Wimplicit-function-declaration]
PyString_Concat(&s, colon);
^
cjson.c:996:9: warning: implicit declaration of function 'PyString_ConcatAndDel'
is invalid in C99 [-Wimplicit-function-declaration]
PyString_ConcatAndDel(&s, encode_object(value));
^
cjson.c:1008:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString("{");
^ ~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1012:5: warning: implicit declaration of function
'PyString_ConcatAndDel' is invalid in C99
[-Wimplicit-function-declaration]
PyString_ConcatAndDel(&s, temp);
^
cjson.c:1017:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString("}");
^ ~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1027:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
s = PyString_FromString(", ");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1030:14: warning: implicit declaration of function '_PyString_Join' is
invalid in C99 [-Wimplicit-function-declaration]
result = _PyString_Join(s, pieces);
^
cjson.c:1030:12: warning: incompatible integer to pointer conversion assigning
to 'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
result = _PyString_Join(s, pieces);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1045:16: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString("true");
^
cjson.c:1045:16: warning: incompatible integer to pointer conversion returning
'int' from a function with result type 'PyObject *'
(aka 'struct _object *') [-Wint-conversion]
return PyString_FromString("true");
^~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1047:16: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString("false");
^
cjson.c:1047:16: warning: incompatible integer to pointer conversion returning
'int' from a function with result type 'PyObject *'
(aka 'struct _object *') [-Wint-conversion]
return PyString_FromString("false");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1049:16: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString("null");
^
cjson.c:1049:16: warning: incompatible integer to pointer conversion returning
'int' from a function with result type 'PyObject *'
(aka 'struct _object *') [-Wint-conversion]
return PyString_FromString("null");
^~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1050:16: warning: implicit declaration of function 'PyString_Check' is
invalid in C99 [-Wimplicit-function-declaration]
} else if (PyString_Check(object)) {
^
cjson.c:1057:20: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString("NaN");
^
cjson.c:1057:20: warning: incompatible integer to pointer conversion returning
'int' from a function with result type 'PyObject *'
(aka 'struct _object *') [-Wint-conversion]
return PyString_FromString("NaN");
^~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1060:24: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString("Infinity");
^
cjson.c:1060:24: warning: incompatible integer to pointer conversion returning
'int' from a function with result type 'PyObject *'
(aka 'struct _object *') [-Wint-conversion]
return PyString_FromString("Infinity");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1062:24: warning: implicit declaration of function 'PyString_FromString'
is invalid in C99 [-Wimplicit-function-declaration]
return PyString_FromString("-Infinity");
^
cjson.c:1062:24: warning: incompatible integer to pointer conversion returning
'int' from a function with result type 'PyObject *'
(aka 'struct _object *') [-Wint-conversion]
return PyString_FromString("-Infinity");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1067:16: warning: implicit declaration of function 'PyInt_Check' is
invalid in C99 [-Wimplicit-function-declaration]
} else if (PyInt_Check(object) || PyLong_Check(object)) {
^
cjson.c:1130:9: warning: implicit declaration of function
'PyString_AsStringAndSize' is invalid in C99
[-Wimplicit-function-declaration]
if (PyString_AsStringAndSize(str, &(jsondata.str), NULL) == -1) {
^
cjson.c:1136:35: warning: implicit declaration of function 'PyString_GET_SIZE'
is invalid in C99 [-Wimplicit-function-declaration]
jsondata.end = jsondata.str + PyString_GET_SIZE(str);
^
cjson.c:1187:9: warning: implicit declaration of function 'Py_InitModule3' is
invalid in C99 [-Wimplicit-function-declaration]
m = Py_InitModule3("cjson", cjson_methods, module_doc);
^
cjson.c:1187:7: warning: incompatible integer to pointer conversion assigning to
'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
m = Py_InitModule3("cjson", cjson_methods, module_doc);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cjson.c:1190:9: error: non-void function 'initcjson' should return a value
[-Wreturn-type]
return;
^
cjson.c:1194:9: error: non-void function 'initcjson' should return a value
[-Wreturn-type]
return;
^
cjson.c:1200:9: error: non-void function 'initcjson' should return a value
[-Wreturn-type]
return;
^
cjson.c:1206:9: error: non-void function 'initcjson' should return a value
[-Wreturn-type]
return;
^
69 warnings and 13 errors generated.
error: command 'xcrun' failed with exit status 1
The text was updated successfully, but these errors were encountered: