Merge branch 'master' of github.com:PyO3/PyO3

This commit is contained in:
Nikolay Kim 2017-06-11 22:24:05 -07:00
commit 52df3a4323
1 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ impl PyType {
}
/// Check whether `self` is subclass of type `T` like Python `issubclass` function
pub fn is_subclass<T>(self, py: Python) -> PyResult<bool>
pub fn is_subclass<T>(&self, py: Python) -> PyResult<bool>
where T: PyTypeObject
{
let result = unsafe {
@ -58,7 +58,7 @@ impl PyType {
}
// Check whether `obj` is an instance of `self`
pub fn is_instance<T: ToPyPointer>(self, py: Python, obj: &T) -> PyResult<bool> {
pub fn is_instance<T: ToPyPointer>(&self, py: Python, obj: &T) -> PyResult<bool> {
let result = unsafe {
ffi::PyObject_IsInstance(obj.as_ptr(), self.as_ptr())
};