Permalink
Browse files

Fixes #8

  • Loading branch information...
1 parent d4b701a commit ff11e158310f5d14a4e0c6df3dc9fc12d9575981 @klbostee committed Aug 21, 2009
Showing with 6 additions and 4 deletions.
  1. +4 −2 fastb.c
  2. +2 −2 tests/testio.py
View
6 fastb.c
@@ -75,8 +75,10 @@ _fastb_read_long(FILE *stream) {
(((long long) c[1] & 255) << 48) +
(((long long) c[2] & 255) << 40) +
(((long long) c[3] & 255) << 32) +
- ((c[4] & 255) << 24) + ((c[5] & 255) << 16) +
- ((c[6] & 255) << 8) + ((c[7] & 255) );
+ (((long long) c[4] & 255) << 24) +
+ (((long long) c[5] & 255) << 16) +
+ (((long long) c[6] & 255) << 8) +
+ (((long long) c[7] & 255) );
}
static inline int
View
4 tests/testio.py
@@ -19,7 +19,7 @@ def testio(self):
file.close()
file = open("test.bin", "rb")
input = typedbytes.Input(file)
- for (index, record) in enumerate(input):
+ for (index, record) in enumerate(input.reads()):
self.assertEqual(objects[index], record)
file.close()
os.remove("test.bin")
@@ -32,7 +32,7 @@ def testpairio(self):
file.close()
file = open("test.bin", "rb")
input = typedbytes.PairedInput(file)
- for index, record in input:
+ for index, record in input.reads():
self.assertEqual(objects[index], record)
file.close()
os.remove("test.bin")

0 comments on commit ff11e15

Please sign in to comment.