Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make struct generated with py_class! public #46

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extensions/btree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ py_module_initializer!(btree, initbtree, PyInit_btree, |py, m| {

/// Newtype around PyObject that implements Ord using python value comparisons.
/// Python exceptions are converted into Rust panics.
struct OrdPyObject(PyObject);
pub struct OrdPyObject(PyObject);

impl PartialEq for OrdPyObject {
fn eq(&self, _other: &Self) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion src/py_class/py_class_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
$slots:tt { $( $imp:item )* } $members:tt;
} => {
struct $class { _unsafe_inner: $crate::PyObject }
pub struct $class { _unsafe_inner: $crate::PyObject }

pyobject_to_pyobject!($class);

Expand Down
2 changes: 1 addition & 1 deletion src/py_class/py_class_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ macro_rules! py_class_impl {
}
$slots:tt { $( $imp:item )* } $members:tt;
} => {
struct $class { _unsafe_inner: $crate::PyObject }
pub struct $class { _unsafe_inner: $crate::PyObject }

pyobject_to_pyobject!($class);

Expand Down
2 changes: 1 addition & 1 deletion tests/test_class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fn new_with_two_args() {
assert_eq!(*obj._data2(py), 20);
}

struct TestDropCall {
pub struct TestDropCall {
drop_called: Arc<AtomicBool>
}
impl Drop for TestDropCall {
Expand Down