Fix segfault on Linux.

This commit is contained in:
Thomas Heller 2007-07-12 20:06:41 +00:00
parent 8750384dbc
commit f4f771fe0f
1 changed files with 4 additions and 4 deletions

View File

@ -118,10 +118,10 @@ class CFuncPtrTestCase(unittest.TestCase):
## b.value = s
## b = c_string(s)
self.failUnlessEqual(strtok(b, "\n"), "a")
self.failUnlessEqual(strtok(None, "\n"), "b")
self.failUnlessEqual(strtok(None, "\n"), "c")
self.failUnlessEqual(strtok(None, "\n"), None)
self.failUnlessEqual(strtok(b, b"\n"), "a")
self.failUnlessEqual(strtok(None, b"\n"), "b")
self.failUnlessEqual(strtok(None, b"\n"), "c")
self.failUnlessEqual(strtok(None, b"\n"), None)
if __name__ == '__main__':
unittest.main()