mirror of
https://github.com/python/cpython.git
synced 2026-01-23 15:48:53 +00:00
oops - the function is exported as 'my_free', not 'free'.
This commit is contained in:
parent
748f6fbf2c
commit
97a7b7fef3
1 changed files with 4 additions and 4 deletions
|
|
@ -46,12 +46,12 @@ def test_char_ptr(self):
|
|||
import operator
|
||||
self.assertRaises(TypeError, operator.setslice,
|
||||
res, 0, 5, u"abcde")
|
||||
dll.free(res)
|
||||
dll.my_free(res)
|
||||
|
||||
dll.my_strdup.restype = POINTER(c_byte)
|
||||
res = dll.my_strdup(s)
|
||||
self.failUnlessEqual(res[:len(s)-1], range(ord("a"), ord("z")+1))
|
||||
dll.free(res)
|
||||
dll.my_free(res)
|
||||
|
||||
def test_char_array(self):
|
||||
s = "abcdefghijklmnopqrstuvwxyz\0"
|
||||
|
|
@ -78,7 +78,7 @@ def test_wchar_ptr(self):
|
|||
import operator
|
||||
self.assertRaises(TypeError, operator.setslice,
|
||||
res, 0, 5, u"abcde")
|
||||
dll.free(res)
|
||||
dll.my_free(res)
|
||||
|
||||
if sizeof(c_wchar) == sizeof(c_short):
|
||||
dll.my_wcsdup.restype = POINTER(c_short)
|
||||
|
|
@ -90,7 +90,7 @@ def test_wchar_ptr(self):
|
|||
return
|
||||
res = dll.my_wcsdup(s)
|
||||
self.failUnlessEqual(res[:len(s)-1], range(ord("a"), ord("z")+1))
|
||||
dll.free(res)
|
||||
dll.my_free(res)
|
||||
|
||||
################################################################
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue