[Python-Dev] Fwd: Removal of GIL through refcounting removal.

Victor Stinner victor.stinner at haypocalc.com
Fri Oct 31 14:32:22 CET 2008


Le Friday 31 October 2008 14:13:01 Christian Heimes, vous avez écrit :
> ctypes is also missing utilities to write code that works on 32 and
> 64bit platforms. Without a tool like
> http://pypi.python.org/pypi/ctypes_configure it's very hard and tedious
> to avoid and fix segfaults.

I wrote some ctypes binding and some ctypes tools are missing. The most 
important lacks are:
 - get_errno()
 - size_t and <stdint.h> types

You may be interrested by my modules:

get errno value:
http://python-ptrace.hachoir.org/trac/browser/trunk/ptrace/ctypes_errno.py
(ctypes_support has a get_errno function)

open the C library:
http://python-ptrace.hachoir.org/trac/browser/trunk/ptrace/ctypes_libc.py
(ok, code is trivial, it's not critical to integrate it to ctypes)

*size_t* and <stdint.h> types!
http://python-ptrace.hachoir.org/trac/browser/trunk/ptrace/ctypes_stdint.py
(my module is incomplete, some types are missing)

Some functions to ease ctypes development:
http://python-ptrace.hachoir.org/trac/browser/trunk/ptrace/ctypes_tools.py
 - bytes2type() and bytes2array() are useful to convert a bytes array
   to a ctypes object

Should I open issues?

-- 
Victor Stinner aka haypo
http://www.haypocalc.com/blog/


More information about the Python-Dev mailing list