@@ -127,7 +127,6 @@ typedef struct __PyObjectEncoder {
127
127
// pass-through to encode numpy data directly
128
128
int npyType ;
129
129
void * npyValue ;
130
- TypeContext basicTypeContext ;
131
130
132
131
int datetimeIso ;
133
132
NPY_DATETIMEUNIT datetimeUnit ;
@@ -2117,10 +2116,7 @@ void Object_endTypeContext(JSOBJ Py_UNUSED(obj), JSONTypeContext *tc) {
2117
2116
2118
2117
PyObject_Free (GET_TC (tc )-> cStr );
2119
2118
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 );
2124
2120
tc -> prv = NULL ;
2125
2121
}
2126
2122
}
@@ -2218,16 +2214,6 @@ PyObject *objToJSON(PyObject *Py_UNUSED(self), PyObject *args,
2218
2214
pyEncoder .datetimeUnit = NPY_FR_ms ;
2219
2215
pyEncoder .outputFormat = COLUMNS ;
2220
2216
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 ;
2231
2217
2232
2218
PRINTMARK ();
2233
2219
0 commit comments