Re: ctypes.c_void_p(-1) might not be C return (void *) -1

2006-09-29 Thread Thomas Heller
[EMAIL PROTECTED] schrieb: I've started a wiki page where I already added an entry about the above question. Do you think the entry would have answered your question? http://starship.python.net/crew/theller/moin.cgi/CodeSnippets As concise as I now can imagine, yes thank you. I see the

ctypes.c_void_p(-1) might not be C return (void *) -1

2006-09-28 Thread p . lavarre
Subject: Python CTypes translation of (pv != NULL) And so then the next related Faq is: Q: How should I test for ((void *) -1)? A: (pv == 0x) works often. (ctypes.cast(pv, ctypes.c_void_p).value == 0x) works better. ((void *) -1) appears often in 32-bit Windows, behind the

Re: ctypes.c_void_p(-1) might not be C return (void *) -1

2006-09-28 Thread Thomas Heller
[EMAIL PROTECTED] schrieb: Subject: Python CTypes translation of (pv != NULL) I've started a wiki page where I already added an entry about the above question. Do you think the entry would have answered your question? http://starship.python.net/crew/theller/moin.cgi/CodeSnippets (My wiki

Re: ctypes.c_void_p(-1) might not be C return (void *) -1

2006-09-28 Thread p . lavarre
I've started a wiki page where I already added an entry about the above question. Do you think the entry would have answered your question? http://starship.python.net/crew/theller/moin.cgi/CodeSnippets As concise as I now can imagine, yes thank you. I see the main point leads: The truth