Stricter types usage in several PyArg_ParseTuple calls

This commit is contained in:
Daniele Varrazzo 2012-03-04 18:01:08 +00:00
parent 0e832b97ea
commit 531084d561
3 changed files with 5 additions and 5 deletions

View File

@ -701,8 +701,8 @@ psyco_conn_get_parameter_status(connectionObject *self, PyObject *args)
static PyObject *
psyco_conn_lobject(connectionObject *self, PyObject *args, PyObject *keywds)
{
Oid oid=InvalidOid, new_oid=InvalidOid;
char *new_file = NULL;
int oid = (int)InvalidOid, new_oid = (int)InvalidOid;
const char *new_file = NULL;
const char *smode = "";
PyObject *factory = (PyObject *)&lobjectType;
PyObject *obj;

View File

@ -373,7 +373,7 @@ lobject_dealloc(PyObject* obj)
static int
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 *new_file = NULL;
PyObject *conn;
@ -383,7 +383,7 @@ lobject_init(PyObject *obj, PyObject *args, PyObject *kwds)
return -1;
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 *

View File

@ -468,7 +468,7 @@ typecast_repr(PyObject *self)
static PyObject *
typecast_call(PyObject *obj, PyObject *args, PyObject *kwargs)
{
char *string;
const char *string;
Py_ssize_t length;
PyObject *cursor;