From 7aa5e4ae355ebf67503c10d3d636b9b2fd79997b Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 17 Nov 2000 20:25:15 +0000 Subject: [PATCH] MSVC compatibility [SVN r8247] --- newtypes.cpp | 6 +++++- newtypes.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) 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();