summaryrefslogtreecommitdiff
path: root/src/pyfstream.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-25 04:35:19 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-25 05:01:39 -0400
commit588f2ef2f51d7bdf209820bfb244034863601939 (patch)
tree7a473de7c117bf71bb802398823826ca4dfbfdca /src/pyfstream.h
parentdc66840dd745863c06ad6513f9f66d589bcc29d8 (diff)
downloadledger-588f2ef2f51d7bdf209820bfb244034863601939.tar.gz
ledger-588f2ef2f51d7bdf209820bfb244034863601939.tar.bz2
ledger-588f2ef2f51d7bdf209820bfb244034863601939.zip
Fixed many compiler warnings from g++ 4.4
Diffstat (limited to 'src/pyfstream.h')
-rw-r--r--src/pyfstream.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/pyfstream.h b/src/pyfstream.h
index 5e39d38d..3da37523 100644
--- a/src/pyfstream.h
+++ b/src/pyfstream.h
@@ -109,9 +109,9 @@ protected:
* - at most, pbSize characters in putback area plus
* - at most, bufSize characters in ordinary read buffer
*/
- static const int pbSize = 4; // size of putback area
- static const int bufSize = 1024; // size of the data buffer
- char buffer[bufSize + pbSize]; // data buffer
+ static const size_t pbSize = 4; // size of putback area
+ static const size_t bufSize = 1024; // size of the data buffer
+ char buffer[bufSize + pbSize]; // data buffer
public:
/* constructor
@@ -147,7 +147,7 @@ protected:
* - use number of characters read
* - but at most size of putback area
*/
- int numPutback;
+ size_t numPutback;
numPutback = gptr() - eback();
if (numPutback > pbSize) {
numPutback = pbSize;
@@ -160,14 +160,13 @@ protected:
numPutback);
// read at most bufSize new characters
- int num;
PyObject *line = PyFile_GetLine(reinterpret_cast<PyObject *>(fo), bufSize);
if (! line || ! PyString_Check(line)) {
// ERROR or EOF
return EOF;
}
- num = PyString_Size(line);
+ Py_ssize_t num = PyString_Size(line);
if (num == 0)
return EOF;