From 9e3e5c8c5622b5746f78e22978bac797b7c2e791 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Fri, 31 Jan 2020 08:02:53 +0000 Subject: [PATCH 1/3] Remove generic pointer --- pandas/_libs/src/ujson/python/objToJSON.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/_libs/src/ujson/python/objToJSON.c b/pandas/_libs/src/ujson/python/objToJSON.c index 62c2870c198c4..55dfaf1874210 100644 --- a/pandas/_libs/src/ujson/python/objToJSON.c +++ b/pandas/_libs/src/ujson/python/objToJSON.c @@ -147,7 +147,7 @@ enum PANDAS_FORMAT { SPLIT, RECORDS, INDEX, COLUMNS, VALUES }; int PdBlock_iterNext(JSOBJ, JSONTypeContext *); -void *initObjToJSON(void) { +void initObjToJSON(void) { PyObject *mod_pandas; PyObject *mod_nattype; PyObject *mod_decimal = PyImport_ImportModule("decimal"); From a0a49e993f27b0ce9bbee2d16b8b6ff84c71d213 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sat, 1 Feb 2020 11:53:38 +0000 Subject: [PATCH 2/3] Return NULL --- pandas/_libs/src/ujson/python/objToJSON.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandas/_libs/src/ujson/python/objToJSON.c b/pandas/_libs/src/ujson/python/objToJSON.c index 55dfaf1874210..da85196550c9f 100644 --- a/pandas/_libs/src/ujson/python/objToJSON.c +++ b/pandas/_libs/src/ujson/python/objToJSON.c @@ -147,7 +147,7 @@ enum PANDAS_FORMAT { SPLIT, RECORDS, INDEX, COLUMNS, VALUES }; int PdBlock_iterNext(JSOBJ, JSONTypeContext *); -void initObjToJSON(void) { +void *initObjToJSON(void) { PyObject *mod_pandas; PyObject *mod_nattype; PyObject *mod_decimal = PyImport_ImportModule("decimal"); @@ -177,6 +177,8 @@ void initObjToJSON(void) { /* Initialise numpy API */ import_array(); + // GH 31463 + return NULL; } static TypeContext *createTypeContext(void) { From 5e3a8f5d598dd7d30bfd3356fa0524e20701b55a Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sun, 2 Feb 2020 16:13:01 +0000 Subject: [PATCH 3/3] Add whatsnew --- doc/source/whatsnew/v1.0.1.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v1.0.1.rst b/doc/source/whatsnew/v1.0.1.rst index b84448e3bf896..9b3d496827d3f 100644 --- a/doc/source/whatsnew/v1.0.1.rst +++ b/doc/source/whatsnew/v1.0.1.rst @@ -123,7 +123,7 @@ ExtensionArray Other ^^^^^ -- +- Regression fixed in objTOJSON.c fix return-type warning (:issue:`31463`) - .. ---------------------------------------------------------------------------