@@ -127,7 +127,6 @@ typedef struct __PyObjectEncoder {
127127 // pass-through to encode numpy data directly
128128 int npyType ;
129129 void * npyValue ;
130- TypeContext basicTypeContext ;
131130
132131 int datetimeIso ;
133132 NPY_DATETIMEUNIT datetimeUnit ;
@@ -2117,10 +2116,7 @@ void Object_endTypeContext(JSOBJ Py_UNUSED(obj), JSONTypeContext *tc) {
21172116
21182117 PyObject_Free (GET_TC (tc )-> cStr );
21192118 GET_TC (tc )-> cStr = NULL ;
2120- if (tc -> prv !=
2121- & (((PyObjectEncoder * )tc -> encoder )-> basicTypeContext )) { // NOLINT
2122- PyObject_Free (tc -> prv );
2123- }
2119+ PyObject_Free (tc -> prv );
21242120 tc -> prv = NULL ;
21252121 }
21262122}
@@ -2218,16 +2214,6 @@ PyObject *objToJSON(PyObject *Py_UNUSED(self), PyObject *args,
22182214 pyEncoder .datetimeUnit = NPY_FR_ms ;
22192215 pyEncoder .outputFormat = COLUMNS ;
22202216 pyEncoder .defaultHandler = 0 ;
2221- pyEncoder .basicTypeContext .newObj = NULL ;
2222- pyEncoder .basicTypeContext .dictObj = NULL ;
2223- pyEncoder .basicTypeContext .itemValue = NULL ;
2224- pyEncoder .basicTypeContext .itemName = NULL ;
2225- pyEncoder .basicTypeContext .attrList = NULL ;
2226- pyEncoder .basicTypeContext .iterator = NULL ;
2227- pyEncoder .basicTypeContext .cStr = NULL ;
2228- pyEncoder .basicTypeContext .npyarr = NULL ;
2229- pyEncoder .basicTypeContext .rowLabels = NULL ;
2230- pyEncoder .basicTypeContext .columnLabels = NULL ;
22312217
22322218 PRINTMARK ();
22332219
0 commit comments