Changeset 910 for trunk


Ignore:
Timestamp:
Apr 29, 2017, 6:12:18 AM (2 years ago)
Author:
cito
Message:

Cleaner handling of oid parameter in getlo() method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pgmodule.c

    r909 r910  
    31003100connGetLO(connObject *self, PyObject *args)
    31013101{
    3102         int                     lo_oid;
     3102        int                     oid;
     3103        Oid                     lo_oid;
    31033104
    31043105        /* checks validity */
     
    31073108
    31083109        /* gets arguments */
    3109         if (!PyArg_ParseTuple(args, "i", &lo_oid))
     3110        if (!PyArg_ParseTuple(args, "i", &oid))
    31103111        {
    31113112                PyErr_SetString(PyExc_TypeError,
     
    31143115        }
    31153116
    3116         if (!lo_oid)
     3117        lo_oid = (Oid)oid;
     3118        if (lo_oid == 0)
    31173119        {
    31183120                PyErr_SetString(PyExc_ValueError, "The object oid can't be null");
Note: See TracChangeset for help on using the changeset viewer.