Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 57e4e0f

Browse files
committed
Add Cython patch for Cygwin
1 parent df03447 commit 57e4e0f

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

build/pkgs/cython/package-version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.25.2.p1
1+
0.25.2.p2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Patch for https://github.com/cython/cython/pull/1687
2+
Only needed for Cygwin systems
3+
4+
commit 632f18f2710eaf6ee2b3a3aaa0749c7886299e64
5+
Author: Jeroen Demeyer <[email protected]>
6+
Date: Thu Apr 27 17:13:39 2017 +0200
7+
8+
Do not use special dll linkage for "cdef public" functions
9+
10+
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
11+
index 6356e78..76fe4e5 100644
12+
--- a/Cython/Compiler/ModuleNode.py
13+
+++ b/Cython/Compiler/ModuleNode.py
14+
@@ -214,8 +214,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
15+
def generate_public_declaration(self, entry, h_code, i_code):
16+
h_code.putln("%s %s;" % (
17+
Naming.extern_c_macro,
18+
- entry.type.declaration_code(
19+
- entry.cname, dll_linkage="DL_IMPORT")))
20+
+ entry.type.declaration_code(entry.cname)))
21+
if i_code:
22+
i_code.putln("cdef extern %s" % (
23+
entry.type.declaration_code(entry.cname, pyrex=1)))
24+
@@ -2849,7 +2848,7 @@ def generate_cfunction_declaration(entry, env, code, definition):
25+
dll_linkage = "DL_IMPORT"
26+
elif entry.visibility == 'public':
27+
storage_class = Naming.extern_c_macro
28+
- dll_linkage = "DL_EXPORT"
29+
+ dll_linkage = None
30+
elif entry.visibility == 'private':
31+
storage_class = "static"
32+
dll_linkage = None

0 commit comments

Comments
 (0)