Skip to content

Commit 34d8d35

Browse files
committed
Merge branch 'Jeff17Robbins-master'
2 parents 5f2e2e2 + 627cac0 commit 34d8d35

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

AUTHORS.md

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
- Ivan Cronyn ([@cronan](https://github.com/cronan))
3535
- Jan Krivanek ([@jakrivan](https://github.com/jakrivan))
3636
- Jeff Reback ([@jreback](https://github.com/jreback))
37+
- Jeff Robbins ([@jeff17robbins](https://github.com/jeff17robbins))
3738
- Joe Frayne ([@jfrayne](https://github.com/jfrayne))
3839
- Joe Lidbetter ([@jmlidbetter](https://github.com/jmlidbetter))
3940
- Joe Savage ([@s4v4g3](https://github.com/s4v4g3))

src/runtime/interop38.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
// Auto-generated by geninterop.py.
3-
// DO NOT MODIFIY BY HAND.
3+
// DO NOT MODIFY BY HAND.
44

55

66
#if PYTHON38
@@ -84,6 +84,7 @@ public static int magic()
8484
public static int tp_version_tag = 0;
8585
public static int tp_finalize = 0;
8686
public static int tp_vectorcall = 0;
87+
public static int tp_print = 0;
8788
public static int am_await = 0;
8889
public static int am_aiter = 0;
8990
public static int am_anext = 0;
@@ -149,4 +150,3 @@ public static int magic()
149150
}
150151

151152
#endif
152-

tools/geninterop/geninterop.py

+13-1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ def visit(self, node):
7676
self.visit_struct(node)
7777
elif isinstance(node, c_ast.Decl):
7878
self.visit_decl(node)
79+
elif isinstance(node, c_ast.FuncDecl):
80+
self.visit_funcdecl(node)
7981
elif isinstance(node, c_ast.PtrDecl):
8082
self.visit_ptrdecl(node)
8183
elif isinstance(node, c_ast.IdentifierType):
@@ -110,6 +112,9 @@ def visit_struct(self, struct):
110112
def visit_decl(self, decl):
111113
self.visit(decl.type)
112114

115+
def visit_funcdecl(self, funcdecl):
116+
self.visit(funcdecl.type)
117+
113118
def visit_ptrdecl(self, ptrdecl):
114119
self.__ptr_decl_depth += 1
115120
self.visit(ptrdecl.type)
@@ -177,6 +182,13 @@ def preprocess_python_headers():
177182
"-D", "_POSIX_THREADS"
178183
]
179184

185+
if os.name == 'nt':
186+
defines.extend([
187+
"-D", "__inline=inline",
188+
"-D", "__ptr32=",
189+
"-D", "__declspec(x)=",
190+
])
191+
180192
if hasattr(sys, "abiflags"):
181193
if "d" in sys.abiflags:
182194
defines.extend(("-D", "PYTHON_WITH_PYDEBUG"))
@@ -216,7 +228,7 @@ def gen_interop_code(members):
216228
defines_str = " && ".join(defines)
217229
class_definition = """
218230
// Auto-generated by %s.
219-
// DO NOT MODIFIY BY HAND.
231+
// DO NOT MODIFY BY HAND.
220232
221233
222234
#if %s

0 commit comments

Comments
 (0)