pyo3-build-config: fix build

This commit is contained in:
David Hewitt 2021-05-21 23:05:36 +01:00
parent 6def8fe714
commit 284ad1f98a
1 changed files with 1 additions and 2 deletions

View File

@ -133,8 +133,7 @@ fn impl_proto_methods(
let mut maybe_buffer_methods = None;
#[cfg(not(Py_3_9))]
if proto.name == "Buffer" {
if cfg!(not(Py_3_9)) && proto.name == "Buffer" {
maybe_buffer_methods = Some(quote! {
impl pyo3::class::impl_::PyBufferProtocolProcs<#ty>
for pyo3::class::impl_::PyClassImplCollector<#ty>