<html><head><style type="text/css" media="screen">Body{font-family: Verdana;font-size:.75em;}h4{font-size:.9em;}a{color: #3a62a6;}.digest .toc {margin-bottom: 15px; padding-bottom:8px; border-bottom: 1px solid #ccc;}.digest .tocItem {margin-bottom: 15px;}.tocItem a{color:#000;text-decoration: none;}.tocItem a:hover{color: #3a62a6;text-decoration: underline;}.topic{padding-bottom: 8px;margin-bottom: 20px; border-bottom: 1px solid #ccc;}.topicHeader{margin-bottom:10px;}.topicTitle{font-weight: bold;}.replies p{margin:0;padding:0;}.replies hr{width: 15%;text-align: left;margin: 0 auto 5px 0;border: none 0;border-top: 1px solid #ccc;height: 1px;}.reply{margin-bottom: 6px;padding-bottom: 4px;}.anchorMarker{color: #3a62a6;}.footer{color: gray;}</style></head><body><div class="digest"><p>Hi ironpython,</p><p>Here's your Daily Digest of new issues for project "<a href="http://ironpython.codeplex.com/">IronPython</a>".</p><p>In today's digest:</p><h4>ISSUES</h4><div class="toc"><div class="tocItem"><a href="#toc_issue_1">1. <span class="tocTitle">[New issue] ctypes: Compatibility issue with CPython</span> <span class="anchorMarker">↓</span></a></div><div class="tocItem"><a href="#toc_issue_2">2. <span class="tocTitle">[New comment] ctypes: no support for Union</span> <span class="anchorMarker">↓</span></a></div><div class="tocItem"><a href="#toc_issue_3">3. <span class="tocTitle">[New comment] ctypes: no support for Union</span> <span class="anchorMarker">↓</span></a></div><div class="tocItem"><a href="#toc_issue_4">4. <span class="tocTitle">[New comment] ctypes.c_uint32 fails with TypeError when overflowed</span> <span class="anchorMarker">↓</span></a></div></div><h4>ISSUES</h4><div class="topic"><a name="toc_issue_1"></a><div class="topicHeader"><span class="topicTitle">1. [New issue] ctypes: Compatibility issue with CPython</span> <a href="http://ironpython.codeplex.com/workitem/32048">view online</a></div><p>User MarioVilas has proposed the issue:</p><p>"The following code works in CPython but not in IronPython:<br /><br />>>> from ctypes import *<br />>>> c_char_p(byref(c_char()))<br />Traceback (most recent call last):<br /> File "<stdin>", line 1, in <module><br />TypeError: expected char pointer, got NativeArgument<br /><br />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:<br /><br />def GetVersionExA():<br /> _GetVersionExA = windll.kernel32.GetVersionExA<br /> _GetVersionExA.argtypes = [LPVOID]<br /> _GetVersionExA.restype = bool<br /> _GetVersionExA.errcheck = RaiseIfZero<br /><br />Then when I try to call this function using a byref() argument I get the same error message as above.<br /><br />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 )."</p></div><div class="topic"><a name="toc_issue_2"></a><div class="topicHeader"><span class="topicTitle">2. [New comment] ctypes: no support for Union</span> <a href="http://ironpython.codeplex.com/workitem/25106">view online</a></div><p>User MarioVilas has commented on the issue:</p><p>"Also this seems to fail, may be related:<br /><br />>>> ctypes.c_void_p(-1)<br />Traceback (most recent call last):<br /> File "<stdin>", line 1, in <module><br />TypeError: expected pointer, got int<br /><br />In CPython it works properly by converting -1 to 0xFFFFFFFF in 32 bits, 0xFFFFFFFFFFFFFFFF in 64 bits."</p></div><div class="topic"><a name="toc_issue_3"></a><div class="topicHeader"><span class="topicTitle">3. [New comment] ctypes: no support for Union</span> <a href="http://ironpython.codeplex.com/workitem/25106">view online</a></div><p>User MarioVilas has commented on the issue:</p><p>"Sorry, that was supposed to go in another ticket. I can't seem to delete the comment now."</p></div><div class="topic"><a name="toc_issue_4"></a><div class="topicHeader"><span class="topicTitle">4. [New comment] ctypes.c_uint32 fails with TypeError when overflowed</span> <a href="http://ironpython.codeplex.com/workitem/30390">view online</a></div><p>User MarioVilas has commented on the issue:</p><p>"Also this seems to fail, may be related:<br /><br />>>> ctypes.c_void_p(-1)<br />Traceback (most recent call last):<br /> File "<stdin>", line 1, in <module><br />TypeError: expected pointer, got int<br /><br />In CPython it works properly by converting -1 to 0xFFFFFFFF in 32 bits, 0xFFFFFFFFFFFFFFFF in 64 bits."</p></div><div class="footer"><p>You are receiving this email because you subscribed to notifications on CodePlex.</p><p>To report a bug, request a feature, or add a comment, visit <a href="http://ironpython.codeplex.com/workitem/list/basic">IronPython Issue Tracker</a>. You can <a href="https://ironpython.codeplex.com/subscriptions/workitem/project/edit">unsubscribe or change your issue notification settings</a> on CodePlex.com.</p></div></div></body></html>