Hi ironpython,
Here's your Daily Digest of new issues for project "IronPython".
In today's digest:ISSUES
1. [New issue] ctypes: Compatibility issue with CPython
2. [New comment] ctypes: no support for Union
3. [New comment] ctypes: no support for Union
4. [New comment] ctypes.c_uint32 fails with TypeError when overflowed
----------------------------------------------
ISSUES
1. [New issue] ctypes: Compatibility issue with CPython
http://ironpython.codeplex.com/workitem/32048
User MarioVilas has proposed the issue:
"The following code works in CPython but not in IronPython:
>>> from ctypes import *
>>> c_char_p(byref(c_char()))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: expected char pointer, got NativeArgument
This example is contrived, but a real case scenario (which is how I found this)
is when setting the argtypes property in a Win32 API wrapper. In my code I have
something like this:
def GetVersionExA():
_GetVersionExA = windll.kernel32.GetVersionExA
_GetVersionExA.argtypes = [LPVOID]
_GetVersionExA.restype = bool
_GetVersionExA.errcheck = RaiseIfZero
Then when I try to call this function using a byref() argument I get the same
error message as above.
In general, it seems to be that IronPython is very strict about type checking
in situations where CPython is not (see also this ticket:
https://ironpython.codeplex.com/workitem/30390 )."-----------------
2. [New comment] ctypes: no support for Union
http://ironpython.codeplex.com/workitem/25106
User MarioVilas has commented on the issue:
"Also this seems to fail, may be related:
>>> ctypes.c_void_p(-1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: expected pointer, got int
In CPython it works properly by converting -1 to 0xFFFFFFFF in 32 bits,
0xFFFFFFFFFFFFFFFF in 64 bits."-----------------
3. [New comment] ctypes: no support for Union
http://ironpython.codeplex.com/workitem/25106
User MarioVilas has commented on the issue:
"Sorry, that was supposed to go in another ticket. I can't seem to delete the
comment now."-----------------
4. [New comment] ctypes.c_uint32 fails with TypeError when overflowed
http://ironpython.codeplex.com/workitem/30390
User MarioVilas has commented on the issue:
"Also this seems to fail, may be related:
>>> ctypes.c_void_p(-1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: expected pointer, got int
In CPython it works properly by converting -1 to 0xFFFFFFFF in 32 bits,
0xFFFFFFFFFFFFFFFF in 64 bits."
----------------------------------------------
----------------------------------------------
You are receiving this email because you subscribed to notifications on
CodePlex.
To report a bug, request a feature, or add a comment, visit IronPython Issue
Tracker. You can unsubscribe or change your issue notification settings on
CodePlex.com.
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
http://mail.python.org/mailman/listinfo/ironpython-users