Skip to content

Commit

Permalink
Replace deprecated wrap_pyfunction with bound equivalent
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperJappie08 committed Mar 25, 2024
1 parent b4007bd commit 6f2aaf1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/types/weakref/callableproxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl PyWeakCallableProxy {
/// );
/// assert_eq!(py.eval_bound("counter", None, None)?.extract::<u32>()?, 0);
///
/// let weakref2 = PyWeakCallableProxy::new_bound_with(&foo, wrap_pyfunction!(callback, py)?)?;
/// let weakref2 = PyWeakCallableProxy::new_bound_with(&foo, wrap_pyfunction_bound!(callback, py)?)?;
/// assert!(!weakref.is(&weakref2)); // Not the same weakref
/// assert!(weakref.eq(&weakref2)?); // But Equal, since they point to the same object
///
Expand Down
2 changes: 1 addition & 1 deletion src/types/weakref/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl PyWeakProxy {
/// );
/// assert_eq!(py.eval_bound("counter", None, None)?.extract::<u32>()?, 0);
///
/// let weakref2 = PyWeakProxy::new_bound_with(&foo, wrap_pyfunction!(callback, py)?)?;
/// let weakref2 = PyWeakProxy::new_bound_with(&foo, wrap_pyfunction_bound!(callback, py)?)?;
/// assert!(!weakref.is(&weakref2)); // Not the same weakref
/// assert!(weakref.eq(&weakref2)?); // But Equal, since they point to the same object
///
Expand Down
2 changes: 1 addition & 1 deletion src/types/weakref/reference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl PyWeakRef {
/// );
/// assert_eq!(py.eval_bound("counter", None, None)?.extract::<u32>()?, 0);
///
/// let weakref2 = PyWeakRef::new_bound_with(&foo, wrap_pyfunction!(callback, py)?)?;
/// let weakref2 = PyWeakRef::new_bound_with(&foo, wrap_pyfunction_bound!(callback, py)?)?;
/// assert!(!weakref.is(&weakref2)); // Not the same weakref
/// assert!(weakref.eq(&weakref2)?); // But Equal, since they point to the same object
///
Expand Down

0 comments on commit 6f2aaf1

Please sign in to comment.