diff --git a/newtypes.cpp b/newtypes.cpp index a389d5da..e0efddfc 100644 --- a/newtypes.cpp +++ b/newtypes.cpp @@ -518,13 +518,17 @@ bool add_capability_number(TypeObjectBase::Capability capability, PyNumberMethod bool add_capability_buffer(TypeObjectBase::Capability capability, PyBufferProcs*& dest) { + (void)dest; // suppress unused argument warning + (void)capability; // likwise +#if 0 switch(capability) { // nothing defined yet - default: return false; } +#endif + return false; } } // anonymous namespace diff --git a/newtypes.h b/newtypes.h index f9710159..80f4dade 100644 --- a/newtypes.h +++ b/newtypes.h @@ -319,7 +319,7 @@ namespace detail { typedef std::vector Storage; public: - static const int offset = offsetof(counted_pod, m_data); + enum { offset = PY_OFFSETOF(counted_pod, m_data) }; static shared_pod_manager& instance(); ~shared_pod_manager();