Skip to content

Commit

Permalink
Merge pull request #222 from ijl/pymodinit2
Browse files Browse the repository at this point in the history
Fix pymodinit for python2
  • Loading branch information
konstin authored Sep 14, 2018
2 parents 0bd5d9d + 5ef95f9 commit f8adb45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyo3-derive-backend/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub fn py2_init(fnname: &syn::Ident, name: &syn::Ident, doc: syn::Lit) -> TokenS
pub unsafe extern "C" fn #cb_name() {
// initialize python
::pyo3::init_once();
::pyo3::ffi::PyEval_InitThreads_if_with_thread();
::pyo3::PyEval_InitThreads_if_with_thread();

let _name = concat!(stringify!(#name), "\0").as_ptr() as *const _;
let _pool = ::pyo3::GILPool::new();
Expand Down

0 comments on commit f8adb45

Please sign in to comment.