On 26/08/15 23:32, David Naylor wrote:
Please find attached for a patch that adds support for:
	ctypes.CDLL(name, handle=X)

The patch includes tests for the pypy and rpython changes.  I am not sure 
about the policy regarding changes to the python libraries and thus did not 
add a unit test there (the standard tests are lacking one for handle support 
anyway).  

I have translation tested the change and the previous fix I submitted now 
works on pypy :-D.  

Regards
Hi David. Thanks for the contributions. It would be more convenient if you would submit pull requests, or even better would be to do this work on the pypy/pypy repo on a branch. In the meantime, I have commited this set of changes on https://bitbucket.org/mattip/pypy and given you a write bit there, so if you do not want to fork on your own you may feel free to use that repo.

Unfortunately the patch causes a segfault in testing on ubuntu 14.04, in the test_handle test you added, I'm pretty sure handle=-2 will not work on linux.

Also, it would be good to find a work-around so we do not modify upstream stdlib in lib-python/2.7, perhaps the handle-as-int could be dealt with later on in _ctypes, or however cpython deals with the issue?

Matti
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to