8000 Remove compiler warnings for 32-bit Linux · PyGreSQL/PyGreSQL@18a1ceb · GitHub
[go: up one dir, main page]

Skip to content

Commit 18a1ceb

Browse files
committed
Remove compiler warnings for 32-bit Linux
1 parent f96cee9 commit 18a1ceb

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

pgconn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ _conn_non_query_result(int status, PGresult* result, PGconn *cnx)
193193
}
194194
/* for a single insert, return the oid */
195195
PQclear(result);
196-
return PyInt_FromLong(oid);
196+
return PyInt_FromLong((long) oid);
197197
}
198198
case PGRES_COPY_OUT: /* no data will be received */
199199
case PGRES_COPY_IN:

pglarge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ large_getattr(largeObject *self, PyObject *nameobj)
8585
/* large object oid */
8686
if (!strcmp(name, "oid")) {
8787
if (_check_lo_obj(self, 0))
88-
return PyInt_FromLong(self->lo_oid);
88+
return PyInt_FromLong((long) self->lo_oid);
8989
PyErr_Clear();
9090
Py_INCREF(Py_None);
9191
return Py_None;

pgquery.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ _query_build_field_info(PGresult *res, int col_num) {
348348
info = PyTuple_New(4);
349349
if (info) {
350350
PyTuple_SET_ITEM(info, 0, PyStr_FromString(PQfname(res, col_num)));
351-
PyTuple_SET_ITEM(info, 1, PyInt_FromLong(PQftype(res, col_num)));
351+
PyTuple_SET_ITEM(info, 1, PyInt_FromLong((long) PQftype(res, col_num)));
352352
PyTuple_SET_ITEM(info, 2, PyInt_FromLong(PQfsize(res, col_num)));
353353
PyTuple_SET_ITEM(info, 3, PyInt_FromLong(PQfmod(res, col_num)));
354354
}

pgsource.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ source_oidstatus(sourceObject *self, PyObject *noargs)
272272
return Py_None;
273273
}
274274

275-
return PyInt_FromLong(oid);
275+
return PyInt_FromLong((long) oid);
276276
}
277277

278278
/* Fetch rows from last result. */
@@ -671,7 +671,7 @@ _source_buildinfo(sourceObject *self, int num)
671671
PyTuple_SET_ITEM(result, 1,
672672
PyStr_FromString(PQfname(self->result, num)));
673673
PyTuple_SET_ITEM(result, 2,
674-
PyInt_FromLong(PQftype(self->result, num)));
674+
PyInt_FromLong((long) PQftype(self->result, num)));
675675
PyTuple_SET_ITEM(result, 3,
676676
PyInt_FromLong(PQfsize(self->result, num)));
677677
PyTuple_SET_ITEM(result, 4,

0 commit comments

Comments
 (0)
2F5F
0