diff options
author | John Wiegley <johnw@newartisans.com> | 2009-10-25 21:27:56 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-10-25 21:27:56 -0400 |
commit | 9dadaebfeb461ba795124281018d0f7eac200cf4 (patch) | |
tree | 941243868b1dcacd68cbd52a2f96e40bf70a5d3b /src/pyfstream.h | |
parent | f35bc939c96c3a3bf09c5881d638b5ba60449c03 (diff) | |
parent | e696bfd913a10edd19f9e35eb1aee2c97b11e7f6 (diff) | |
download | fork-ledger-9dadaebfeb461ba795124281018d0f7eac200cf4.tar.gz fork-ledger-9dadaebfeb461ba795124281018d0f7eac200cf4.tar.bz2 fork-ledger-9dadaebfeb461ba795124281018d0f7eac200cf4.zip |
Merge branch 'next'
Diffstat (limited to 'src/pyfstream.h')
-rw-r--r-- | src/pyfstream.h | 11 |
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; |