merge master
This commit is contained in:
commit
bd7a0feb8c
|
@ -284,7 +284,7 @@ fn wrap_fn(item: &mut syn::Item) -> Option<Box<syn::Block>> {
|
|||
}.as_method_def();
|
||||
|
||||
unsafe {
|
||||
let func = PyObject::from_owned_ptr_or_panic(
|
||||
let func = pyo3::PyObject::from_owned_ptr_or_panic(
|
||||
py, pyo3::ffi::PyCFunction_New(
|
||||
&def as *const _ as *mut _, std::ptr::null_mut()));
|
||||
std::mem::forget(def);
|
||||
|
|
|
@ -20,8 +20,6 @@ use conversion::{FromPyObject, IntoPyObject};
|
|||
use callback::{PyObjectCallbackConverter, HashConverter, BoolCallbackConverter};
|
||||
use class::methods::PyMethodDef;
|
||||
|
||||
// classmethod
|
||||
// staticmethod
|
||||
// __instancecheck__
|
||||
// __subclasscheck__
|
||||
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
//! also exposed as Python exceptions.
|
||||
//!
|
||||
//! # Example
|
||||
//! ```
|
||||
//!
|
||||
//! ```rust
|
||||
//! extern crate pyo3;
|
||||
//!
|
||||
//! use pyo3::{Python, PyDict, PyResult};
|
||||
|
@ -72,8 +73,10 @@
|
|||
//!
|
||||
//!
|
||||
//! # Example
|
||||
//! ```
|
||||
//!
|
||||
//! ```rust
|
||||
//! #![feature(proc_macro)]
|
||||
//!
|
||||
//! extern crate pyo3;
|
||||
//! use pyo3::{py, Python, PyResult, PyObject, PyModule, PyString};
|
||||
//!
|
||||
|
|
Loading…
Reference in New Issue