Kaydet (Commit) 97a7b7fe authored tarafından Thomas Heller's avatar Thomas Heller

oops - the function is exported as 'my_free', not 'free'.

üst 748f6fbf
...@@ -46,12 +46,12 @@ class SlicesTestCase(unittest.TestCase): ...@@ -46,12 +46,12 @@ class SlicesTestCase(unittest.TestCase):
import operator import operator
self.assertRaises(TypeError, operator.setslice, self.assertRaises(TypeError, operator.setslice,
res, 0, 5, u"abcde") res, 0, 5, u"abcde")
dll.free(res) dll.my_free(res)
dll.my_strdup.restype = POINTER(c_byte) dll.my_strdup.restype = POINTER(c_byte)
res = dll.my_strdup(s) res = dll.my_strdup(s)
self.failUnlessEqual(res[:len(s)-1], range(ord("a"), ord("z")+1)) self.failUnlessEqual(res[:len(s)-1], range(ord("a"), ord("z")+1))
dll.free(res) dll.my_free(res)
def test_char_array(self): def test_char_array(self):
s = "abcdefghijklmnopqrstuvwxyz\0" s = "abcdefghijklmnopqrstuvwxyz\0"
...@@ -78,7 +78,7 @@ class SlicesTestCase(unittest.TestCase): ...@@ -78,7 +78,7 @@ class SlicesTestCase(unittest.TestCase):
import operator import operator
self.assertRaises(TypeError, operator.setslice, self.assertRaises(TypeError, operator.setslice,
res, 0, 5, u"abcde") res, 0, 5, u"abcde")
dll.free(res) dll.my_free(res)
if sizeof(c_wchar) == sizeof(c_short): if sizeof(c_wchar) == sizeof(c_short):
dll.my_wcsdup.restype = POINTER(c_short) dll.my_wcsdup.restype = POINTER(c_short)
...@@ -90,7 +90,7 @@ class SlicesTestCase(unittest.TestCase): ...@@ -90,7 +90,7 @@ class SlicesTestCase(unittest.TestCase):
return return
res = dll.my_wcsdup(s) res = dll.my_wcsdup(s)
self.failUnlessEqual(res[:len(s)-1], range(ord("a"), ord("z")+1)) self.failUnlessEqual(res[:len(s)-1], range(ord("a"), ord("z")+1))
dll.free(res) dll.my_free(res)
################################################################ ################################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment