Skip to content

Commit 277c82e

Browse files
authored
Build _ctypes_test as a shared module (fixes #721) (#747)
1 parent 51d355f commit 277c82e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

cpython-unix/extension-modules.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ _ctypes:
145145
- dl
146146

147147
_ctypes_test:
148+
build-mode: shared
148149
sources:
149150
- _ctypes/_ctypes_test.c
150151
links:

src/validation.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,10 @@ const _DEPENDENCY_PACKAGE_SYMBOLS_BUNDLED: &[&str] = &[
649649
"TkBindInit",
650650
"TkCreateFrame",
651651
"Tk_FreeGC",
652+
// _ctypes_test module
653+
"my_free",
654+
"mystrdup",
655+
"top",
652656
];
653657

654658
const PYTHON_EXPORTED_SYMBOLS: &[&str] = &[
@@ -872,7 +876,7 @@ const GLOBAL_EXTENSIONS_WINDOWS_PRE_3_13: &[&str] = &["_msi"];
872876
const GLOBAL_EXTENSIONS_WINDOWS_NO_STATIC: &[&str] = &["_testinternalcapi", "_tkinter"];
873877

874878
/// Extension modules that should be built as shared libraries.
875-
const SHARED_LIBRARY_EXTENSIONS: &[&str] = &["_crypt", "_tkinter"];
879+
const SHARED_LIBRARY_EXTENSIONS: &[&str] = &["_crypt", "_ctypes_test", "_tkinter"];
876880

877881
const PYTHON_VERIFICATIONS: &str = include_str!("verify_distribution.py");
878882

0 commit comments

Comments
 (0)