Skip to content

Commit a50af89

Browse files
Jonathan EliashivJonathan Eliashiv
Jonathan Eliashiv
authored and
Jonathan Eliashiv
committed
messed up on types, sorry, my cpp is rusty
1 parent e6c3ff8 commit a50af89

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/_libs/src/ujson/python/objToJSON.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ static char *NpyDateTimeToIsoCallback(JSOBJ Py_UNUSED(unused),
343343
NPY_DATETIMEUNIT base = ((PyObjectEncoder *)tc->encoder)->datetimeUnit;
344344
int local = ((PyObjectEncoder *)tc->encoder)->local;
345345
int utc = ((PyObjectEncoder *)tc->encoder)->utc;
346-
int timezone_obj = ((PyObjectEncoder *)tc->encoder)->timezone_obj;
346+
PyObject *timezone_obj = ((PyObjectEncoder *)tc->encoder)->timezone_obj;
347347
return int64ToIso(GET_TC(tc)->longValue, base, len, local, utc, timezone_obj);
348348
}
349349

@@ -364,7 +364,7 @@ static char *PyDateTimeToIsoCallback(JSOBJ obj, JSONTypeContext *tc,
364364
NPY_DATETIMEUNIT base = ((PyObjectEncoder *)tc->encoder)->datetimeUnit;
365365
int local = ((PyObjectEncoder *)tc->encoder)->local;
366366
int utc = ((PyObjectEncoder *)tc->encoder)->utc;
367-
int timezone_obj = ((PyObjectEncoder *)tc->encoder)->timezone_obj;
367+
PyObject *timezone_obj = ((PyObjectEncoder *)tc->encoder)->timezone_obj;
368368
return PyDateTimeToIso(obj, base, len, local, utc, timezone_obj);
369369
}
370370

@@ -2138,7 +2138,7 @@ PyObject *objToJSON(PyObject *Py_UNUSED(self), PyObject *args,
21382138
/* Otherwise assume it's a Python TZInfo, or acts like one */
21392139
else {
21402140
pyEncoder.local = 1;
2141-
pyEncoder.timezone_obj = &timezone_obj;
2141+
pyEncoder.timezone_obj = timezone_obj;
21422142
}
21432143
}
21442144
}

0 commit comments

Comments
 (0)