STINNER Victor added the comment:
> testfun(objid(), c_wchar_p('test'))
I'm not sure that the objid object lives until testfun() is called. It would be
safer to write:
o = objid()
testfun(o, c_wchar_p('test')))
o = None
--
nosy: +haypo
___
Python t
New submission from Андрей Парамонов:
To reproduce:
0) Compile attached testlib.c
1) Run the following code:
from __future__ import print_function
from __future__ import unicode_literals
from ctypes import *
testlib = windll.LoadLibrary('testlib')
testfun = testlib.test
class objid(Structure