From d26809122e60fe6a4a59ed13cac06f21da34c270 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sun, 8 May 2016 01:04:07 +0200 Subject: [PATCH] Fix build with python 3. --- src/py_class/slots.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/py_class/slots.rs b/src/py_class/slots.rs index 1eadbc37..be4dd452 100644 --- a/src/py_class/slots.rs +++ b/src/py_class/slots.rs @@ -18,7 +18,7 @@ use ffi; use std::{mem, isize, ptr}; -use libc::{c_char, c_int, c_long}; +use libc::{c_char, c_int}; use python::{Python, PythonObject}; use conversion::ToPyObject; use objects::PyObject; @@ -69,11 +69,11 @@ macro_rules! py_class_type_object_flags { } #[cfg(feature="python27-sys")] -pub const TPFLAGS_DEFAULT : c_long = ffi::Py_TPFLAGS_DEFAULT - | ffi::Py_TPFLAGS_CHECKTYPES; +pub const TPFLAGS_DEFAULT : ::libc::c_long = ffi::Py_TPFLAGS_DEFAULT + | ffi::Py_TPFLAGS_CHECKTYPES; #[cfg(feature="python3-sys")] -pub const TPFLAGS_DEFAULT : c_long = ffi::Py_TPFLAGS_DEFAULT; +pub const TPFLAGS_DEFAULT : ::libc::c_ulong = ffi::Py_TPFLAGS_DEFAULT; #[macro_export] #[doc(hidden)]