mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-01-31 17:34:08 +03:00
Stricter types usage in several PyArg_ParseTuple calls
This commit is contained in:
parent
0e832b97ea
commit
531084d561
|
@ -701,8 +701,8 @@ psyco_conn_get_parameter_status(connectionObject *self, PyObject *args)
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_conn_lobject(connectionObject *self, PyObject *args, PyObject *keywds)
|
psyco_conn_lobject(connectionObject *self, PyObject *args, PyObject *keywds)
|
||||||
{
|
{
|
||||||
Oid oid=InvalidOid, new_oid=InvalidOid;
|
int oid = (int)InvalidOid, new_oid = (int)InvalidOid;
|
||||||
char *new_file = NULL;
|
const char *new_file = NULL;
|
||||||
const char *smode = "";
|
const char *smode = "";
|
||||||
PyObject *factory = (PyObject *)&lobjectType;
|
PyObject *factory = (PyObject *)&lobjectType;
|
||||||
PyObject *obj;
|
PyObject *obj;
|
||||||
|
|
|
@ -373,7 +373,7 @@ lobject_dealloc(PyObject* obj)
|
||||||
static int
|
static int
|
||||||
lobject_init(PyObject *obj, PyObject *args, PyObject *kwds)
|
lobject_init(PyObject *obj, PyObject *args, PyObject *kwds)
|
||||||
{
|
{
|
||||||
Oid oid=InvalidOid, new_oid=InvalidOid;
|
int oid = (int)InvalidOid, new_oid = (int)InvalidOid;
|
||||||
const char *smode = "";
|
const char *smode = "";
|
||||||
const char *new_file = NULL;
|
const char *new_file = NULL;
|
||||||
PyObject *conn;
|
PyObject *conn;
|
||||||
|
@ -383,7 +383,7 @@ lobject_init(PyObject *obj, PyObject *args, PyObject *kwds)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return lobject_setup((lobjectObject *)obj,
|
return lobject_setup((lobjectObject *)obj,
|
||||||
(connectionObject *)conn, oid, smode, new_oid, new_file);
|
(connectionObject *)conn, (Oid)oid, smode, (Oid)new_oid, new_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
|
|
@ -468,7 +468,7 @@ typecast_repr(PyObject *self)
|
||||||
static PyObject *
|
static PyObject *
|
||||||
typecast_call(PyObject *obj, PyObject *args, PyObject *kwargs)
|
typecast_call(PyObject *obj, PyObject *args, PyObject *kwargs)
|
||||||
{
|
{
|
||||||
char *string;
|
const char *string;
|
||||||
Py_ssize_t length;
|
Py_ssize_t length;
|
||||||
PyObject *cursor;
|
PyObject *cursor;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user