Skip to content

Instantly share code, notes, and snippets.

@robertwb
Created August 16, 2016 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertwb/c6d163e292341ced503422a0eb38ff5f to your computer and use it in GitHub Desktop.
Save robertwb/c6d163e292341ced503422a0eb38ff5f to your computer and use it in GitHub Desktop.
Attachment stdcall.hg for http://trac.cython.org/ticket/12
# HG changeset patch
# User jek-cythonhg@kleckner.net
# Date 1211502710 25200
# Node ID 6461cde2de73bb328ea4edb8df8ceca0c153dd02
# Parent b266823a2719a91b42f07e9df5494f0c10e25fad
Changed #define of __stdcall to prevent overrides
Changed #define of __stdcall to prevent override on MS_WINDOWS
and if it is already defined (to prevent noise with cywgin).
diff -r b266823a2719 -r 6461cde2de73 Cython/Compiler/ModuleNode.py
--- a/Cython/Compiler/ModuleNode.py Thu May 22 21:10:20 2008 +0200
+++ b/Cython/Compiler/ModuleNode.py Thu May 22 17:31:50 2008 -0700
@@ -419,8 +419,10 @@ class ModuleNode(Nodes.Node, Nodes.Block
code.putln(" #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)")
code.putln("#endif")
- code.putln("#ifndef __stdcall")
+ code.putln("#ifndef MS_WINDOWS")
+ code.putln(" #ifndef __stdcall")
code.putln(" #define __stdcall")
+ code.putln(" #endif")
code.putln("#endif")
code.putln("#ifndef __cdecl")
code.putln(" #define __cdecl")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment