Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Commit

Permalink
Merge pull request #78 from capitalone/feature/py38compat
Browse files Browse the repository at this point in the history
Avoid compiler warnings about PyObject_GC_UnTrack
  • Loading branch information
KrishanBhasin committed May 27, 2020
2 parents b36ce85 + 6ac2fbe commit 53dbcb0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion giraffez/src/_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@
#endif

#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 6
#define _PyObject_GC_UNTRACK PyObject_GC_UnTrack
#define _PyObject_GC_UnTrack PyObject_GC_UnTrack
#else
#define _PyObject_GC_UnTrack _PyObject_GC_UNTRACK
#endif

#if defined(WIN32) || defined(WIN64)
Expand Down
2 changes: 1 addition & 1 deletion giraffez/src/convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ int _clz(uint32_t x) {

PyObject* teradata_number_from_pystring(PyObject *item, unsigned char **buf, uint16_t *packed_length) {
char *s;
int i, j, sign = 0, b, r, count = 0;
int i, sign = 0, b, r, count = 0;
PyObject *n, *nn = NULL, *str, *zero, *mask, *shift;
int8_t length = 0;
int16_t scale = 0;
Expand Down
2 changes: 1 addition & 1 deletion giraffez/src/errors.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static int TeradataError_clear(TeradataErrorObject *self) {
}

static void TeradataError_dealloc(TeradataErrorObject *self) {
_PyObject_GC_UNTRACK(self);
_PyObject_GC_UnTrack(self);
TeradataError_clear(self);
Py_TYPE(self)->tp_free((PyObject*)self);
}
Expand Down

0 comments on commit 53dbcb0

Please sign in to comment.