Author: cito
Date: Fri Jan 8 14:16:26 2016
New Revision: 703
Log:
One more cast to avoid a compiler warning with MSVC.
Modified:
trunk/module/pgmodule.c
Modified: trunk/module/pgmodule.c
==============================================================================
--- trunk/module/pgmodule.c Fri Jan 8 13:52:38 2016 (r702)
+++ trunk/module/pgmodule.c Fri Jan 8 14:16:26 2016 (r703)
@@ -1903,7 +1903,7 @@
}
to_length = 2*from_length + 1;
- if (to_length < (size_t)from_length) /* overflow */
+ if ((Py_ssize_t)to_length < from_length) /* overflow */
{
to_length = from_length;
from_length = (from_length - 1)/2;
@@ -2938,7 +2938,7 @@
if (buffer)
{
- res = nbytes ? PQputCopyData(self->pgcnx->cnx, buffer, nbytes)
: 1;
+ res = nbytes ? PQputCopyData(self->pgcnx->cnx, buffer,
(int)nbytes) : 1;
}
else
{
@@ -4173,7 +4173,7 @@
}
to_length = 2*from_length + 1;
- if (to_length < (size_t)from_length) /* overflow */
+ if ((Py_ssize_t)to_length < from_length) /* overflow */
{
to_length = from_length;
from_length = (from_length - 1)/2;
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql