<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=012414904-25052004>Dear
all,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=012414904-25052004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=012414904-25052004>I am currently using
pyrex to wrap a C DLL that requires the use of __stdcall calling conventions for
any callback functions. To illustrate my point:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=012414904-25052004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=012414904-25052004>cdef void
comperr_callback(PPBORCA_COMPERR pCompErr, void *f):<BR> test
= {}<BR> test['level'] = pCompErr.iLevel<BR>
test['line'] = pCompErr.iLineNumber<BR> test['col'] =
pCompErr.iColumnNumber<BR> if pCompErr.lpszMessageNumber !=
NULL:<BR> test['msg number'] =
<LPSTR>pCompErr.lpszMessageNumber<BR>
else:<BR> test['msg number'] =
''<BR> if pCompErr.lpszMessageText !=
NULL:<BR> test['msg text'] =
<LPSTR>pCompErr.lpszMessageText<BR>
else:<BR> test['msg text'] =
''<BR> (<object>f)(test)<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=012414904-25052004>this callback
requires the use of the __stdcall convention. The only solution I have
been able to come up with is to edit the pyrex-generated c file to add the
__stdcall directive to the function declarations. Is there any way to make
Pyrex include this directive in the generated file?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=012414904-25052004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=012414904-25052004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=012414904-25052004>Regards,</DIV></SPAN></FONT>
<DIV><B><FONT face=Arial size=2></FONT></B> </DIV>
<DIV><B><FONT face=Arial size=2>Grant McDonald</FONT></B>
<BR></DIV></BODY></HTML>