Skip to content

Commit

Permalink
Better doc comment for PyObject
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin committed Oct 31, 2018
1 parent 8b27f1e commit 264f642
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ use crate::python::{IntoPyPointer, Python, ToPyPointer};
use crate::pythonrun;
use crate::types::{PyDict, PyObjectRef, PyTuple};

/// Safe wrapper around unsafe `*mut ffi::PyObject` pointer.
/// A python object
///
/// The python object's lifetime is managed by python's garbage
/// collector.
///
/// Technically, it is a safe wrapper around the unsafe `*mut ffi::PyObject` pointer.
#[derive(Debug)]
#[repr(transparent)]
pub struct PyObject(*mut ffi::PyObject);
Expand Down Expand Up @@ -285,6 +290,7 @@ impl IntoPyPointer for PyObject {
}

impl PartialEq for PyObject {
/// Checks for identity, not python's `__eq__`
#[inline]
fn eq(&self, o: &PyObject) -> bool {
self.0 == o.0
Expand Down

0 comments on commit 264f642

Please sign in to comment.