compilation/linking fixes for DLL build in release mode

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-03-24 01:56:00 +00:00
parent f7b5f357d4
commit 9be2e3416d
27 changed files with 465 additions and 310 deletions

View File

@@ -113,7 +113,7 @@ public:
long style = 0);
// empty but ensures that dtor of all derived classes is virtual
virtual ~wxConfigBase() { }
virtual ~wxConfigBase();
// path management
// set current path: if the first character is '/', it's the absolute path,
@@ -226,6 +226,7 @@ public:
// misc accessors
wxString GetAppName() const { return m_appName; }
wxString GetVendorName() const { return m_vendorName; }
// Used wxIniConfig to set members in constructor
void SetAppName(const wxString& appName) { m_appName = appName; }
void SetVendorName(const wxString& vendorName) { m_vendorName = vendorName; }

View File

@@ -250,7 +250,7 @@ private:
// wxDataObject directly.
// ----------------------------------------------------------------------------
WX_DECLARE_LIST(wxDataObjectSimple, wxSimpleDataObjectList);
WX_DECLARE_EXPORTED_LIST(wxDataObjectSimple, wxSimpleDataObjectList);
class WXDLLEXPORT wxDataObjectComposite : public wxDataObject
{

View File

@@ -1245,7 +1245,7 @@ private:
#include "wx/dynarray.h"
WX_DECLARE_OBJARRAY(wxDateTime, wxDateTimeArray);
WX_DECLARE_EXPORTED_OBJARRAY(wxDateTime, wxDateTimeArray);
// ----------------------------------------------------------------------------
// wxDateTimeHolidayAuthority: an object of this class will decide whether a

View File

@@ -40,19 +40,19 @@
const long wxDateTime::TIME_T_FACTOR = 1000l;
#endif // wxDEFINE_TIME_CONSTANTS
bool wxDateTime::IsInStdRange() const
inline bool wxDateTime::IsInStdRange() const
{
return m_time >= 0l && (m_time / TIME_T_FACTOR) < LONG_MAX;
}
/* static */
wxDateTime wxDateTime::Now()
inline wxDateTime wxDateTime::Now()
{
return wxDateTime(*GetTmNow());
}
/* static */
wxDateTime wxDateTime::Today()
inline wxDateTime wxDateTime::Today()
{
struct tm *tm = GetTmNow();
tm->tm_hour =
@@ -63,7 +63,7 @@ wxDateTime wxDateTime::Today()
}
#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400))
wxDateTime& wxDateTime::Set(time_t timet)
inline wxDateTime& wxDateTime::Set(time_t timet)
{
// assign first to avoid long multiplication overflow!
m_time = timet;
@@ -73,56 +73,56 @@ wxDateTime& wxDateTime::Set(time_t timet)
}
#endif
wxDateTime& wxDateTime::SetToCurrent()
inline wxDateTime& wxDateTime::SetToCurrent()
{
*this = Now();
return *this;
}
#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400))
wxDateTime::wxDateTime(time_t timet)
inline wxDateTime::wxDateTime(time_t timet)
{
Set(timet);
}
#endif
wxDateTime::wxDateTime(const struct tm& tm)
inline wxDateTime::wxDateTime(const struct tm& tm)
{
Set(tm);
}
wxDateTime::wxDateTime(const Tm& tm)
inline wxDateTime::wxDateTime(const Tm& tm)
{
Set(tm);
}
wxDateTime::wxDateTime(double jdn)
inline wxDateTime::wxDateTime(double jdn)
{
Set(jdn);
}
wxDateTime& wxDateTime::Set(const Tm& tm)
inline wxDateTime& wxDateTime::Set(const Tm& tm)
{
wxASSERT_MSG( tm.IsValid(), _T("invalid broken down date/time") );
return Set(tm.mday, (Month)tm.mon, tm.year, tm.hour, tm.min, tm.sec);
}
wxDateTime::wxDateTime(wxDateTime_t hour,
wxDateTime_t minute,
wxDateTime_t second,
wxDateTime_t millisec)
inline wxDateTime::wxDateTime(wxDateTime_t hour,
wxDateTime_t minute,
wxDateTime_t second,
wxDateTime_t millisec)
{
Set(hour, minute, second, millisec);
}
wxDateTime::wxDateTime(wxDateTime_t day,
Month month,
int year,
wxDateTime_t hour,
wxDateTime_t minute,
wxDateTime_t second,
wxDateTime_t millisec)
inline wxDateTime::wxDateTime(wxDateTime_t day,
Month month,
int year,
wxDateTime_t hour,
wxDateTime_t minute,
wxDateTime_t second,
wxDateTime_t millisec)
{
Set(day, month, year, hour, minute, second, millisec);
}
@@ -131,14 +131,14 @@ wxDateTime::wxDateTime(wxDateTime_t day,
// wxDateTime accessors
// ----------------------------------------------------------------------------
wxLongLong wxDateTime::GetValue() const
inline wxLongLong wxDateTime::GetValue() const
{
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
return m_time;
}
time_t wxDateTime::GetTicks() const
inline time_t wxDateTime::GetTicks() const
{
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
if ( !IsInStdRange() )
@@ -149,60 +149,61 @@ time_t wxDateTime::GetTicks() const
return (time_t)((m_time / (long)TIME_T_FACTOR).GetLo());
}
bool wxDateTime::SetToLastWeekDay(WeekDay weekday,
Month month,
int year)
inline bool wxDateTime::SetToLastWeekDay(WeekDay weekday,
Month month,
int year)
{
return SetToWeekDay(weekday, -1, month, year);
}
wxDateTime wxDateTime::GetWeekDayInSameWeek(WeekDay weekday) const
inline wxDateTime wxDateTime::GetWeekDayInSameWeek(WeekDay weekday) const
{
MODIFY_AND_RETURN( SetToWeekDayInSameWeek(weekday) );
}
wxDateTime wxDateTime::GetNextWeekDay(WeekDay weekday) const
inline wxDateTime wxDateTime::GetNextWeekDay(WeekDay weekday) const
{
MODIFY_AND_RETURN( SetToNextWeekDay(weekday) );
}
wxDateTime wxDateTime::GetPrevWeekDay(WeekDay weekday) const
inline wxDateTime wxDateTime::GetPrevWeekDay(WeekDay weekday) const
{
MODIFY_AND_RETURN( SetToPrevWeekDay(weekday) );
}
wxDateTime wxDateTime::GetWeekDay(WeekDay weekday,
int n,
Month month,
int year) const
inline wxDateTime wxDateTime::GetWeekDay(WeekDay weekday,
int n,
Month month,
int year) const
{
wxDateTime dt(*this);
return dt.SetToWeekDay(weekday, n, month, year) ? dt : wxInvalidDateTime;
}
wxDateTime wxDateTime::GetLastWeekDay(WeekDay weekday,
Month month,
int year)
inline wxDateTime wxDateTime::GetLastWeekDay(WeekDay weekday,
Month month,
int year)
{
wxDateTime dt(*this);
return dt.SetToLastWeekDay(weekday, month, year) ? dt : wxInvalidDateTime;
}
wxDateTime wxDateTime::GetWeek(wxDateTime_t numWeek, WeekDay weekday) const
inline wxDateTime wxDateTime::GetWeek(wxDateTime_t numWeek,
WeekDay weekday) const
{
wxDateTime dt(*this);
return dt.SetToTheWeek(numWeek, weekday) ? dt : wxInvalidDateTime;
}
wxDateTime wxDateTime::GetLastMonthDay(Month month, int year) const
inline wxDateTime wxDateTime::GetLastMonthDay(Month month, int year) const
{
MODIFY_AND_RETURN( SetToLastMonthDay(month, year) );
}
wxDateTime wxDateTime::GetYearDay(wxDateTime_t yday) const
inline wxDateTime wxDateTime::GetYearDay(wxDateTime_t yday) const
{
MODIFY_AND_RETURN( SetToYearDay(yday) );
}
@@ -211,46 +212,47 @@ wxDateTime wxDateTime::GetYearDay(wxDateTime_t yday) const
// wxDateTime comparison
// ----------------------------------------------------------------------------
bool wxDateTime::IsEqualTo(const wxDateTime& datetime) const
inline bool wxDateTime::IsEqualTo(const wxDateTime& datetime) const
{
wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
return m_time == datetime.m_time;
}
bool wxDateTime::IsEarlierThan(const wxDateTime& datetime) const
inline bool wxDateTime::IsEarlierThan(const wxDateTime& datetime) const
{
wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
return m_time < datetime.m_time;
}
bool wxDateTime::IsLaterThan(const wxDateTime& datetime) const
inline bool wxDateTime::IsLaterThan(const wxDateTime& datetime) const
{
wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
return m_time > datetime.m_time;
}
bool wxDateTime::IsStrictlyBetween(const wxDateTime& t1,
const wxDateTime& t2) const
inline bool wxDateTime::IsStrictlyBetween(const wxDateTime& t1,
const wxDateTime& t2) const
{
// no need for assert, will be checked by the functions we call
return IsLaterThan(t1) && IsEarlierThan(t2);
}
bool wxDateTime::IsBetween(const wxDateTime& t1, const wxDateTime& t2) const
inline bool wxDateTime::IsBetween(const wxDateTime& t1,
const wxDateTime& t2) const
{
// no need for assert, will be checked by the functions we call
return IsEqualTo(t1) || IsEqualTo(t2) || IsStrictlyBetween(t1, t2);
}
bool wxDateTime::IsSameDate(const wxDateTime& dt) const
inline bool wxDateTime::IsSameDate(const wxDateTime& dt) const
{
return (m_time - dt.m_time).Abs() < MILLISECONDS_PER_DAY;
}
bool wxDateTime::IsSameTime(const wxDateTime& dt) const
inline bool wxDateTime::IsSameTime(const wxDateTime& dt) const
{
// notice that we can't do something like this:
//
@@ -266,7 +268,8 @@ bool wxDateTime::IsSameTime(const wxDateTime& dt) const
tm1.msec == tm2.msec;
}
bool wxDateTime::IsEqualUpTo(const wxDateTime& dt, const wxTimeSpan& ts) const
inline bool wxDateTime::IsEqualUpTo(const wxDateTime& dt,
const wxTimeSpan& ts) const
{
return IsBetween(dt.Substract(ts), dt.Add(ts));
}
@@ -275,14 +278,14 @@ bool wxDateTime::IsEqualUpTo(const wxDateTime& dt, const wxTimeSpan& ts) const
// wxDateTime arithmetics
// ----------------------------------------------------------------------------
wxDateTime wxDateTime::Add(const wxTimeSpan& diff) const
inline wxDateTime wxDateTime::Add(const wxTimeSpan& diff) const
{
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
return wxDateTime(m_time + diff.GetValue());
}
wxDateTime& wxDateTime::Add(const wxTimeSpan& diff)
inline wxDateTime& wxDateTime::Add(const wxTimeSpan& diff)
{
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
@@ -291,19 +294,19 @@ wxDateTime& wxDateTime::Add(const wxTimeSpan& diff)
return *this;
}
wxDateTime& wxDateTime::operator+=(const wxTimeSpan& diff)
inline wxDateTime& wxDateTime::operator+=(const wxTimeSpan& diff)
{
return Add(diff);
}
wxDateTime wxDateTime::Substract(const wxTimeSpan& diff) const
inline wxDateTime wxDateTime::Substract(const wxTimeSpan& diff) const
{
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
return wxDateTime(m_time - diff.GetValue());
}
wxDateTime& wxDateTime::Substract(const wxTimeSpan& diff)
inline wxDateTime& wxDateTime::Substract(const wxTimeSpan& diff)
{
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
@@ -312,39 +315,39 @@ wxDateTime& wxDateTime::Substract(const wxTimeSpan& diff)
return *this;
}
wxDateTime& wxDateTime::operator-=(const wxTimeSpan& diff)
inline wxDateTime& wxDateTime::operator-=(const wxTimeSpan& diff)
{
return Substract(diff);
}
wxTimeSpan wxDateTime::Substract(const wxDateTime& datetime) const
inline wxTimeSpan wxDateTime::Substract(const wxDateTime& datetime) const
{
wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
return wxTimeSpan(datetime.GetValue() - GetValue());
}
wxDateTime wxDateTime::Add(const wxDateSpan& diff) const
inline wxDateTime wxDateTime::Add(const wxDateSpan& diff) const
{
return wxDateTime(*this).Add(diff);
}
wxDateTime& wxDateTime::Substract(const wxDateSpan& diff)
inline wxDateTime& wxDateTime::Substract(const wxDateSpan& diff)
{
return Add(diff.Negate());
}
wxDateTime wxDateTime::Substract(const wxDateSpan& diff) const
inline wxDateTime wxDateTime::Substract(const wxDateSpan& diff) const
{
return wxDateTime(*this).Substract(diff);
}
wxDateTime& wxDateTime::operator-=(const wxDateSpan& diff)
inline wxDateTime& wxDateTime::operator-=(const wxDateSpan& diff)
{
return Substract(diff);
}
wxDateTime& wxDateTime::operator+=(const wxDateSpan& diff)
inline wxDateTime& wxDateTime::operator+=(const wxDateSpan& diff)
{
return Add(diff);
}
@@ -353,8 +356,8 @@ wxDateTime& wxDateTime::operator+=(const wxDateSpan& diff)
// wxDateTime and timezones
// ----------------------------------------------------------------------------
wxDateTime wxDateTime::ToTimezone(const wxDateTime::TimeZone& tz,
bool noDST) const
inline wxDateTime wxDateTime::ToTimezone(const wxDateTime::TimeZone& tz,
bool noDST) const
{
MODIFY_AND_RETURN( MakeTimezone(tz, noDST) );
}
@@ -363,7 +366,10 @@ wxDateTime wxDateTime::ToTimezone(const wxDateTime::TimeZone& tz,
// wxTimeSpan construction
// ----------------------------------------------------------------------------
wxTimeSpan::wxTimeSpan(long hours, long minutes, long seconds, long milliseconds)
inline wxTimeSpan::wxTimeSpan(long hours,
long minutes,
long seconds,
long milliseconds)
{
// assign first to avoid precision loss
m_diff = hours;
@@ -379,27 +385,27 @@ wxTimeSpan::wxTimeSpan(long hours, long minutes, long seconds, long milliseconds
// wxTimeSpan accessors
// ----------------------------------------------------------------------------
wxLongLong wxTimeSpan::GetSeconds() const
inline wxLongLong wxTimeSpan::GetSeconds() const
{
return m_diff / 1000l;
}
int wxTimeSpan::GetMinutes() const
inline int wxTimeSpan::GetMinutes() const
{
return (GetSeconds() / 60l).GetLo();
}
int wxTimeSpan::GetHours() const
inline int wxTimeSpan::GetHours() const
{
return GetMinutes() / 60;
}
int wxTimeSpan::GetDays() const
inline int wxTimeSpan::GetDays() const
{
return GetHours() / 24;
}
int wxTimeSpan::GetWeeks() const
inline int wxTimeSpan::GetWeeks() const
{
return GetDays() / 7;
}
@@ -408,53 +414,53 @@ int wxTimeSpan::GetWeeks() const
// wxTimeSpan arithmetics
// ----------------------------------------------------------------------------
wxTimeSpan wxTimeSpan::Add(const wxTimeSpan& diff) const
inline wxTimeSpan wxTimeSpan::Add(const wxTimeSpan& diff) const
{
return wxTimeSpan(m_diff + diff.GetValue());
}
wxTimeSpan& wxTimeSpan::Add(const wxTimeSpan& diff)
inline wxTimeSpan& wxTimeSpan::Add(const wxTimeSpan& diff)
{
m_diff += diff.GetValue();
return *this;
}
wxTimeSpan wxTimeSpan::Substract(const wxTimeSpan& diff) const
inline wxTimeSpan wxTimeSpan::Substract(const wxTimeSpan& diff) const
{
return wxTimeSpan(m_diff - diff.GetValue());
}
wxTimeSpan& wxTimeSpan::Substract(const wxTimeSpan& diff)
inline wxTimeSpan& wxTimeSpan::Substract(const wxTimeSpan& diff)
{
m_diff -= diff.GetValue();
return *this;
}
wxTimeSpan& wxTimeSpan::Multiply(int n)
inline wxTimeSpan& wxTimeSpan::Multiply(int n)
{
m_diff *= (long)n;
return *this;
}
wxTimeSpan wxTimeSpan::Multiply(int n) const
inline wxTimeSpan wxTimeSpan::Multiply(int n) const
{
return wxTimeSpan(m_diff * (long)n);
}
wxTimeSpan wxTimeSpan::Abs() const
inline wxTimeSpan wxTimeSpan::Abs() const
{
return wxTimeSpan(GetValue().Abs());
}
bool wxTimeSpan::IsEqualTo(const wxTimeSpan& ts) const
inline bool wxTimeSpan::IsEqualTo(const wxTimeSpan& ts) const
{
return GetValue() == ts.GetValue();
}
bool wxTimeSpan::IsLongerThan(const wxTimeSpan& ts) const
inline bool wxTimeSpan::IsLongerThan(const wxTimeSpan& ts) const
{
return GetValue().Abs() > ts.GetValue().Abs();
}
@@ -463,8 +469,7 @@ bool wxTimeSpan::IsLongerThan(const wxTimeSpan& ts) const
// wxDateSpan
// ----------------------------------------------------------------------------
wxDateSpan&
wxDateSpan::operator+=(const wxDateSpan& other)
inline wxDateSpan& wxDateSpan::operator+=(const wxDateSpan& other)
{
m_years += other.m_years;
m_months += other.m_months;
@@ -474,7 +479,7 @@ wxDateSpan::operator+=(const wxDateSpan& other)
return *this;
}
wxDateSpan& wxDateSpan::Multiply(int factor)
inline wxDateSpan& wxDateSpan::Multiply(int factor)
{
m_years *= factor;
m_months *= factor;
@@ -484,17 +489,17 @@ wxDateSpan& wxDateSpan::Multiply(int factor)
return *this;
}
wxDateSpan wxDateSpan::Multiply(int factor) const
inline wxDateSpan wxDateSpan::Multiply(int factor) const
{
return wxDateSpan(*this).Multiply(factor);
}
wxDateSpan wxDateSpan::Negate() const
inline wxDateSpan wxDateSpan::Negate() const
{
return wxDateSpan(-m_years, -m_months, -m_weeks, -m_days);
}
wxDateSpan& wxDateSpan::Neg()
inline wxDateSpan& wxDateSpan::Neg()
{
m_years = -m_years;
m_months = -m_months;

View File

@@ -121,7 +121,7 @@ private:
*m_pPrev; // previous one
};
class wxFileConfig : public wxConfigBase
class WXDLLEXPORT wxFileConfig : public wxConfigBase
{
public:
// construct the "standard" full name for global (system-wide) and

View File

@@ -200,8 +200,8 @@ private:
// defines a new type safe hash table which stores the elements of type eltype
// in lists of class listclass
#define WX_DECLARE_HASH(eltype, listclass, hashclass) \
class WXDLLEXPORT hashclass : public wxHashTableBase \
#define _WX_DECLARE_HASH(eltype, listclass, hashclass, classexp) \
classexp hashclass : public wxHashTableBase \
{ \
public: \
hashclass(wxKeyType keyType = wxKEY_INTEGER, \
@@ -258,5 +258,14 @@ private:
} \
}
// this macro is to be used in the user code
#define WX_DECLARE_HASH(el, list, hash) \
_WX_DECLARE_HASH(el, list, hash, class)
// and this one does exactly the same thing but should be used inside the
// library
#define WX_DECLARE_EXPORTED_HASH(el, list, hash) \
_WX_DECLARE_HASH(el, list, hash, class WXDLLEXPORT)
#endif
// _WX_HASH_H__

View File

@@ -353,10 +353,10 @@ private:
// wxWindowBase pointers are put into the list, but wxWindow pointers are
// retrieved from it.
#define WX_DECLARE_LIST_3(T, Tbase, name, nodetype) \
#define WX_DECLARE_LIST_3(T, Tbase, name, nodetype, classexp) \
typedef int (*wxSortFuncFor_##name)(const T **, const T **); \
\
class WXDLLEXPORT nodetype : public wxNodeBase \
classexp nodetype : public wxNodeBase \
{ \
public: \
nodetype(wxListBase *list = (wxListBase *)NULL, \
@@ -379,7 +379,7 @@ private:
virtual void DeleteData(); \
}; \
\
class WXDLLEXPORT name : public wxListBase \
classexp name : public wxListBase \
{ \
public: \
typedef nodetype Node; \
@@ -447,12 +447,16 @@ private:
} \
}
#define WX_DECLARE_LIST_2(elementtype, listname, nodename) \
WX_DECLARE_LIST_3(elementtype, elementtype, listname, nodename)
#define WX_DECLARE_LIST_2(elementtype, listname, nodename, classexp) \
WX_DECLARE_LIST_3(elementtype, elementtype, listname, nodename, classexp)
#define WX_DECLARE_LIST(elementtype, listname) \
typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \
WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node)
WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, class)
#define WX_DECLARE_EXPORTED_LIST(elementtype, listname) \
typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \
WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, class WXDLLEXPORT)
// this macro must be inserted in your program after
// #include <wx/listimpl.cpp>
@@ -472,7 +476,7 @@ private:
// wxList compatibility class: in fact, it's a list of wxObjects
// -----------------------------------------------------------------------------
WX_DECLARE_LIST_2(wxObject, wxObjectList, wxObjectListNode);
WX_DECLARE_LIST_2(wxObject, wxObjectList, wxObjectListNode, class WXDLLEXPORT);
class WXDLLEXPORT wxList : public wxObjectList
{
@@ -489,7 +493,7 @@ public:
// wxStringList class for compatibility with the old code
// -----------------------------------------------------------------------------
WX_DECLARE_LIST_2(wxChar, wxStringListBase, wxStringListNode);
WX_DECLARE_LIST_2(wxChar, wxStringListBase, wxStringListNode, class WXDLLEXPORT);
class WXDLLEXPORT wxStringList : public wxStringListBase
{

View File

@@ -9,10 +9,10 @@
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#define _DEFINE_LIST(T, name) \
void wx##name##Node::DeleteData() \
{ \
delete (T *)GetData(); \
#define _DEFINE_LIST(T, name) \
inline void wx##name##Node::DeleteData() \
{ \
delete (T *)GetData(); \
}
// redefine the macro so that now it will generate the class implementation

View File

@@ -32,8 +32,8 @@ class WXDLLEXPORT wxMenuBar;
class WXDLLEXPORT wxMenuItem;
// pseudo template list classes
WX_DECLARE_LIST(wxMenu, wxMenuList);
WX_DECLARE_LIST(wxMenuItem, wxMenuItemList);
WX_DECLARE_EXPORTED_LIST(wxMenu, wxMenuList);
WX_DECLARE_EXPORTED_LIST(wxMenuItem, wxMenuItemList);
// ----------------------------------------------------------------------------
// conditional compilation

View File

@@ -21,7 +21,7 @@
// declare a linked list of modules
class wxModule;
WX_DECLARE_LIST(wxModule, wxModuleList);
WX_DECLARE_EXPORTED_LIST(wxModule, wxModuleList);
// declaring a class derived from wxModule will automatically create an
// instance of this class on program startup, call its OnInit() method and call

View File

@@ -216,6 +216,8 @@ extern LONG APIENTRY _EXPORT
#define wxZeroMemory(obj) memset((void*) & obj, 0, sizeof(obj))
#endif
#if wxUSE_GUI
#include <wx/gdicmn.h>
// make conversion from wxColour and COLORREF a bit less painful
@@ -314,15 +316,12 @@ private:
#define GetHcursor() ((HCURSOR)GetHCURSOR())
#define GetHcursorOf(cursor) ((HCURSOR)(cursor).GetHCURSOR())
#endif // wxUSE_GUI
// ---------------------------------------------------------------------------
// global data
// ---------------------------------------------------------------------------
#if 0 // where is this??
// The MakeProcInstance version of the function wxSubclassedGenericControlProc
WXDLLEXPORT_DATA(extern FARPROC) wxGenericControlSubClassProc;
#endif // 0
WXDLLEXPORT_DATA(extern wxChar*) wxBuffer;
WXDLLEXPORT_DATA(extern HINSTANCE) wxhInstance;

View File

@@ -205,6 +205,12 @@ struct WXDLLEXPORT wxStringData
// lock/unlock
void Lock() { if ( !IsEmpty() ) nRefs++; }
// VC++ will refuse to inline this function but profiling shows that it
// is wrong
#if defined(__VISUALC__) && defined(__WIN32__)
__forceinline
#endif
void Unlock() { if ( !IsEmpty() && --nRefs == 0) free(this); }
// if we had taken control over string memory (GetWriteBuf), it's

View File

@@ -206,7 +206,7 @@ protected:
};
// a list of toolbar tools
WX_DECLARE_LIST(wxToolBarToolBase, wxToolBarToolsList);
WX_DECLARE_EXPORTED_LIST(wxToolBarToolBase, wxToolBarToolsList);
// ----------------------------------------------------------------------------
// the base class for all toolbars

View File

@@ -58,7 +58,7 @@ class WXDLLEXPORT wxWindow;
// (pseudo)template list classes
// ----------------------------------------------------------------------------
WX_DECLARE_LIST_3(wxWindow, wxWindowBase, wxWindowList, wxWindowListNode);
WX_DECLARE_LIST_3(wxWindow, wxWindowBase, wxWindowList, wxWindowListNode, class WXDLLEXPORT);
// ----------------------------------------------------------------------------
// global variables