From 9f96811a21bcd32a7e4abedcddbdd52e64747aaa Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 30 Sep 2004 21:46:03 +0000 Subject: [PATCH] EXPCL_PANDAEXPRESS, win32 fixes --- panda/src/express/memoryUsage.cxx | 6 ++++++ panda/src/express/pointerToArray.I | 2 +- panda/src/express/pointerToVoid.h | 2 +- panda/src/express/weakPointerToVoid.h | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/panda/src/express/memoryUsage.cxx b/panda/src/express/memoryUsage.cxx index 938a1099e1..36aba6354d 100644 --- a/panda/src/express/memoryUsage.cxx +++ b/panda/src/express/memoryUsage.cxx @@ -749,7 +749,13 @@ ns_get_interpreter_size() { //////////////////////////////////////////////////////////////////// size_t MemoryUsage:: ns_get_total_size() { +#if defined(WIN32_VC) && defined(_DEBUG) return _total_size; +#else + // If we aren't tracking _total_size, report _cpp_size as the next + // best thing. + return _cpp_size; +#endif } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/express/pointerToArray.I b/panda/src/express/pointerToArray.I index 362634b364..2eabdb93ef 100644 --- a/panda/src/express/pointerToArray.I +++ b/panda/src/express/pointerToArray.I @@ -752,7 +752,7 @@ v() const { nassertd(_void_ptr != NULL) { ((ConstPointerToArray *)this)->reassign(new RefCountObj >); } - return *_ptr; + return *(To *)_void_ptr; } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/express/pointerToVoid.h b/panda/src/express/pointerToVoid.h index 2b58ef6640..853a03e05f 100644 --- a/panda/src/express/pointerToVoid.h +++ b/panda/src/express/pointerToVoid.h @@ -33,7 +33,7 @@ // // This is the base class for PointerToBase. //////////////////////////////////////////////////////////////////// -class PointerToVoid { +class EXPCL_PANDAEXPRESS PointerToVoid { protected: INLINE PointerToVoid(); INLINE ~PointerToVoid(); diff --git a/panda/src/express/weakPointerToVoid.h b/panda/src/express/weakPointerToVoid.h index 23e0db0117..1766bebcf0 100644 --- a/panda/src/express/weakPointerToVoid.h +++ b/panda/src/express/weakPointerToVoid.h @@ -28,7 +28,7 @@ // pointers. It needs an additional flag to indicate // that the pointer has been deleted. //////////////////////////////////////////////////////////////////// -class WeakPointerToVoid : public PointerToVoid { +class EXPCL_PANDAEXPRESS WeakPointerToVoid : public PointerToVoid { protected: INLINE WeakPointerToVoid();