Skip to content

Commit

Permalink
Fixed a few compilation errors on the abi3 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Sep 6, 2020
1 parent e0f75f8 commit 4cd6d4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/class/number.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
use crate::callback::IntoPyCallbackOutput;
use crate::err::PyErr;
use crate::{ffi, FromPyObject, PyClass, PyObject};
#[cfg(Py_LIMITED_API)]
use std::os::raw::c_void;

#[cfg(Py_LIMITED_API)]
#[derive(Clone)]
Expand All @@ -26,6 +28,7 @@ pub struct PyNumberMethods {
pub nb_xor: Option<ffi::binaryfunc>,
pub nb_or: Option<ffi::binaryfunc>,
pub nb_int: Option<ffi::unaryfunc>,
#[allow(dead_code)]
pub nb_reserved: *mut c_void,
pub nb_float: Option<ffi::unaryfunc>,
pub nb_inplace_add: Option<ffi::binaryfunc>,
Expand Down
4 changes: 4 additions & 0 deletions src/class/sequence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ use crate::conversion::{FromPyObject, IntoPy};
use crate::err::PyErr;
use crate::{exceptions, ffi, PyAny, PyCell, PyClass, PyObject};
use std::os::raw::c_int;
#[cfg(Py_LIMITED_API)]
use std::os::raw::c_void;

#[cfg(Py_LIMITED_API)]
#[derive(Clone)]
Expand All @@ -16,8 +18,10 @@ pub struct PySequenceMethods {
pub sq_concat: Option<ffi::binaryfunc>,
pub sq_repeat: Option<ffi::ssizeargfunc>,
pub sq_item: Option<ffi::ssizeargfunc>,
#[allow(dead_code)]
pub was_sq_slice: *mut c_void,
pub sq_ass_item: Option<ffi::ssizeobjargproc>,
#[allow(dead_code)]
pub was_sq_ass_slice: *mut c_void,
pub sq_contains: Option<ffi::objobjproc>,
pub sq_inplace_concat: Option<ffi::binaryfunc>,
Expand Down

0 comments on commit 4cd6d4c

Please sign in to comment.