Changeset 703 for trunk


Ignore:
Timestamp:
Jan 8, 2016, 2:16:26 PM (4 years ago)
Author:
cito
Message:

One more cast to avoid a compiler warning with MSVC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/module/pgmodule.c

    r702 r703  
    19041904
    19051905        to_length = 2*from_length + 1;
    1906         if (to_length < (size_t)from_length) /* overflow */
     1906        if ((Py_ssize_t)to_length < from_length) /* overflow */
    19071907        {
    19081908                to_length = from_length;
     
    29392939        if (buffer)
    29402940        {
    2941                 res = nbytes ? PQputCopyData(self->pgcnx->cnx, buffer, nbytes) : 1;
     2941                res = nbytes ? PQputCopyData(self->pgcnx->cnx, buffer, (int)nbytes) : 1;
    29422942        }
    29432943        else
     
    41744174
    41754175        to_length = 2*from_length + 1;
    4176         if (to_length < (size_t)from_length) /* overflow */
     4176        if ((Py_ssize_t)to_length < from_length) /* overflow */
    41774177        {
    41784178                to_length = from_length;
Note: See TracChangeset for help on using the changeset viewer.