1. DLL compilation fixes (wrong WXDLLEXPORT placement) in db.h/cpp
2. dummy typedef added to gsocket.c - trans unit can't be empty 3. WX_DEFINE_EXPORTED_ARRAY & friends appear git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -443,7 +443,7 @@ class CstructTablesInUse : public wxObject
|
|||||||
// for other code segments to use, or close all of them when the application has
|
// for other code segments to use, or close all of them when the application has
|
||||||
// completed.
|
// completed.
|
||||||
|
|
||||||
wxDB* WXDLLEXPORT GetDbConnection(DbStuff *pDbStuff);
|
wxDB WXDLLEXPORT *GetDbConnection(DbStuff *pDbStuff);
|
||||||
bool WXDLLEXPORT FreeDbConnection(wxDB *pDb);
|
bool WXDLLEXPORT FreeDbConnection(wxDB *pDb);
|
||||||
void WXDLLEXPORT CloseDbConnections(void);
|
void WXDLLEXPORT CloseDbConnections(void);
|
||||||
int WXDLLEXPORT NumberDbConnectionsInUse(void);
|
int WXDLLEXPORT NumberDbConnectionsInUse(void);
|
||||||
|
@@ -165,9 +165,9 @@ private:
|
|||||||
// { ((wxBaseArray *)this)->operator=((const wxBaseArray&)src);
|
// { ((wxBaseArray *)this)->operator=((const wxBaseArray&)src);
|
||||||
// so using a temporary variable instead.
|
// so using a temporary variable instead.
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
#define _WX_DEFINE_ARRAY(T, name) \
|
#define _WX_DEFINE_ARRAY(T, name, classexp) \
|
||||||
typedef int (CMPFUNC_CONV *CMPFUNC##T)(T *pItem1, T *pItem2); \
|
typedef int (CMPFUNC_CONV *CMPFUNC##T)(T *pItem1, T *pItem2); \
|
||||||
class WXDLLEXPORT name : public wxBaseArray \
|
classexp name : public wxBaseArray \
|
||||||
{ \
|
{ \
|
||||||
public: \
|
public: \
|
||||||
name() \
|
name() \
|
||||||
@@ -228,9 +228,9 @@ public: \
|
|||||||
// { ((wxBaseArray *)this)->operator=((const wxBaseArray&)src);
|
// { ((wxBaseArray *)this)->operator=((const wxBaseArray&)src);
|
||||||
// so using a temporary variable instead.
|
// so using a temporary variable instead.
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
#define _WX_DEFINE_SORTED_ARRAY(T, name) \
|
#define _WX_DEFINE_SORTED_ARRAY(T, name, classexp) \
|
||||||
typedef int (CMPFUNC_CONV *SCMPFUNC##T)(T pItem1, T pItem2); \
|
typedef int (CMPFUNC_CONV *SCMPFUNC##T)(T pItem1, T pItem2); \
|
||||||
class WXDLLEXPORT name : public wxBaseArray \
|
classexp name : public wxBaseArray \
|
||||||
{ \
|
{ \
|
||||||
public: \
|
public: \
|
||||||
name(SCMPFUNC##T fn) \
|
name(SCMPFUNC##T fn) \
|
||||||
@@ -274,9 +274,9 @@ private: \
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// see WX_DECLARE_OBJARRAY and WX_DEFINE_OBJARRAY
|
// see WX_DECLARE_OBJARRAY and WX_DEFINE_OBJARRAY
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
#define _WX_DECLARE_OBJARRAY(T, name) \
|
#define _WX_DECLARE_OBJARRAY(T, name, classexp) \
|
||||||
typedef int (CMPFUNC_CONV *CMPFUNC##T)(T** pItem1, T** pItem2); \
|
typedef int (CMPFUNC_CONV *CMPFUNC##T)(T** pItem1, T** pItem2); \
|
||||||
class WXDLLEXPORT name : public wxBaseArray \
|
classexp name : public wxBaseArray \
|
||||||
{ \
|
{ \
|
||||||
public: \
|
public: \
|
||||||
name() { } \
|
name() { } \
|
||||||
@@ -340,15 +340,17 @@ private: \
|
|||||||
|
|
||||||
@memo declare and define array class 'name' containing elements of type 'T'
|
@memo declare and define array class 'name' containing elements of type 'T'
|
||||||
*/
|
*/
|
||||||
#define WX_DEFINE_ARRAY(T, name) typedef T _A##name; \
|
#define WX_DEFINE_ARRAY(T, name) \
|
||||||
_WX_DEFINE_ARRAY(_A##name, name)
|
typedef T _A##name; \
|
||||||
|
_WX_DEFINE_ARRAY(_A##name, name, class)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This macro does the same as WX_DEFINE_ARRAY except that the array will be
|
This macro does the same as WX_DEFINE_ARRAY except that the array will be
|
||||||
sorted with the specified compare function.
|
sorted with the specified compare function.
|
||||||
*/
|
*/
|
||||||
#define WX_DEFINE_SORTED_ARRAY(T, name) typedef T _A##name; \
|
#define WX_DEFINE_SORTED_ARRAY(T, name) \
|
||||||
_WX_DEFINE_SORTED_ARRAY(_A##name, name)
|
typedef T _A##name; \
|
||||||
|
_WX_DEFINE_SORTED_ARRAY(_A##name, name, class)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This macro generates a new objarrays class which owns the objects it
|
This macro generates a new objarrays class which owns the objects it
|
||||||
@@ -385,8 +387,10 @@ private: \
|
|||||||
|
|
||||||
@memo declare objarray class 'name' containing elements of type 'T'
|
@memo declare objarray class 'name' containing elements of type 'T'
|
||||||
*/
|
*/
|
||||||
#define WX_DECLARE_OBJARRAY(T, name) typedef T _L##name; \
|
#define WX_DECLARE_OBJARRAY(T, name) \
|
||||||
_WX_DECLARE_OBJARRAY(_L##name, name)
|
typedef T _L##name; \
|
||||||
|
_WX_DECLARE_OBJARRAY(_L##name, name, class)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
To use an objarray class you must
|
To use an objarray class you must
|
||||||
<ll>
|
<ll>
|
||||||
@@ -407,18 +411,32 @@ private: \
|
|||||||
#define WX_DEFINE_OBJARRAY(name) "don't forget to include arrimpl.cpp!"
|
#define WX_DEFINE_OBJARRAY(name) "don't forget to include arrimpl.cpp!"
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
// these macros do the same thing as the WX_XXX ones above, but should be used
|
||||||
|
// inside the library for user visible classes because otherwise they wouldn't
|
||||||
|
// be visible from outside (when using wxWindows as DLL under Windows)
|
||||||
|
#define WX_DEFINE_EXPORTED_ARRAY(T, name) \
|
||||||
|
typedef T _A##name; \
|
||||||
|
_WX_DEFINE_ARRAY(_A##name, name, class WXDLLEXPORT)
|
||||||
|
|
||||||
|
#define WX_DEFINE_SORTED_EXPORTED_ARRAY(T, name) \
|
||||||
|
typedef T _A##name; \
|
||||||
|
_WX_DEFINE_SORTED_ARRAY(_A##name, name, class WXDLLEXPORT)
|
||||||
|
|
||||||
|
#define WX_DECLARE_EXPORTED_OBJARRAY(T, name) \
|
||||||
|
typedef T _L##name; \
|
||||||
|
_WX_DECLARE_OBJARRAY(_L##name, name, class WXDLLEXPORT)
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
/** @name Some commonly used predefined arrays */
|
/** @name Some commonly used predefined arrays */
|
||||||
// # overhead if not used?
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
//@{
|
//@{
|
||||||
/** @name ArrayInt */
|
/** @name ArrayInt */
|
||||||
WX_DEFINE_ARRAY(int, wxArrayInt);
|
WX_DEFINE_EXPORTED_ARRAY(int, wxArrayInt);
|
||||||
/** @name ArrayLong */
|
/** @name ArrayLong */
|
||||||
WX_DEFINE_ARRAY(long, wxArrayLong);
|
WX_DEFINE_EXPORTED_ARRAY(long, wxArrayLong);
|
||||||
/** @name ArrayPtrVoid */
|
/** @name ArrayPtrVoid */
|
||||||
WX_DEFINE_ARRAY(void *, wxArrayPtrVoid);
|
WX_DEFINE_EXPORTED_ARRAY(void *, wxArrayPtrVoid);
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
@@ -443,5 +461,6 @@ WX_DEFINE_ARRAY(void *, wxArrayPtrVoid);
|
|||||||
\
|
\
|
||||||
array.Empty(); \
|
array.Empty(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _DYNARRAY_H
|
#endif // _DYNARRAY_H
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
// this one if used by wxPaintDC only
|
// this one if used by wxPaintDC only
|
||||||
struct WXDLLEXPORT wxPaintDCInfo;
|
struct WXDLLEXPORT wxPaintDCInfo;
|
||||||
|
|
||||||
WX_DECLARE_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
|
WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// DC classes
|
// DC classes
|
||||||
|
@@ -26,7 +26,7 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxListBoxNameStr;
|
|||||||
// define the array of list box items
|
// define the array of list box items
|
||||||
#include <wx/dynarray.h>
|
#include <wx/dynarray.h>
|
||||||
|
|
||||||
WX_DEFINE_ARRAY(wxOwnerDrawn *, wxListBoxItemsArray);
|
WX_DEFINE_EXPORTED_ARRAY(wxOwnerDrawn *, wxListBoxItemsArray);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -34,7 +34,7 @@ class WXDLLEXPORT wxWindow;
|
|||||||
// array of notebook pages
|
// array of notebook pages
|
||||||
typedef wxWindow WXDLLEXPORT wxNotebookPage; // so far, any window can be a page
|
typedef wxWindow WXDLLEXPORT wxNotebookPage; // so far, any window can be a page
|
||||||
|
|
||||||
WX_DEFINE_ARRAY(wxNotebookPage *, wxArrayPages);
|
WX_DEFINE_EXPORTED_ARRAY(wxNotebookPage *, wxArrayPages);
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxNotebook
|
// wxNotebook
|
||||||
|
@@ -122,7 +122,7 @@ protected:
|
|||||||
long m_itemId;
|
long m_itemId;
|
||||||
};
|
};
|
||||||
|
|
||||||
WX_DEFINE_ARRAY(wxTreeItemId, wxArrayTreeItemIds);
|
WX_DEFINE_EXPORTED_ARRAY(wxTreeItemId, wxArrayTreeItemIds);
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxTreeItemData is some (arbitrary) user class associated with some item. The
|
// wxTreeItemData is some (arbitrary) user class associated with some item. The
|
||||||
|
@@ -45,7 +45,7 @@ enum wxTextFileType
|
|||||||
wxTextFileType_Os2 // 'CR' 'LF'
|
wxTextFileType_Os2 // 'CR' 'LF'
|
||||||
};
|
};
|
||||||
|
|
||||||
WX_DEFINE_ARRAY(wxTextFileType, ArrayFileType);
|
WX_DEFINE_EXPORTED_ARRAY(wxTextFileType, ArrayFileType);
|
||||||
|
|
||||||
class WXDLLEXPORT wxTextFile
|
class WXDLLEXPORT wxTextFile
|
||||||
{
|
{
|
||||||
|
@@ -84,7 +84,7 @@
|
|||||||
#include "wx/db.h"
|
#include "wx/db.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DbList* WXDLLEXPORT PtrBegDbList = 0;
|
DbList WXDLLEXPORT *PtrBegDbList = 0;
|
||||||
|
|
||||||
#if __WXDEBUG__ > 0
|
#if __WXDEBUG__ > 0
|
||||||
#if wxMAJOR_VERSION == 2
|
#if wxMAJOR_VERSION == 2
|
||||||
@@ -1728,7 +1728,7 @@ DBMS wxDB::Dbms(void)
|
|||||||
|
|
||||||
|
|
||||||
/********** GetDbConnection() **********/
|
/********** GetDbConnection() **********/
|
||||||
wxDB* WXDLLEXPORT GetDbConnection(DbStuff *pDbStuff)
|
wxDB WXDLLEXPORT *GetDbConnection(DbStuff *pDbStuff)
|
||||||
{
|
{
|
||||||
DbList *pList;
|
DbList *pList;
|
||||||
|
|
||||||
|
@@ -119,7 +119,7 @@ private:
|
|||||||
m_ext;
|
m_ext;
|
||||||
};
|
};
|
||||||
|
|
||||||
WX_DECLARE_OBJARRAY(wxFileTypeInfo, wxArrayFileTypeInfo);
|
WX_DECLARE_EXPORTED_OBJARRAY(wxFileTypeInfo, wxArrayFileTypeInfo);
|
||||||
#include "wx/arrimpl.cpp"
|
#include "wx/arrimpl.cpp"
|
||||||
WX_DEFINE_OBJARRAY(wxArrayFileTypeInfo);
|
WX_DEFINE_OBJARRAY(wxArrayFileTypeInfo);
|
||||||
|
|
||||||
|
@@ -1350,12 +1350,16 @@ GSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf)
|
|||||||
return GSOCK_INVADDR;
|
return GSOCK_INVADDR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else /* !wxUSE_SOCKETS */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* translation unit shouldn't be empty, so include this typedef to make the
|
||||||
|
* compiler (VC++ 6.0, for example) happy
|
||||||
|
*/
|
||||||
|
typedef (*wxDummy)();
|
||||||
|
|
||||||
#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
|
#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Diferencias con la version Unix:
|
/* Diferencias con la version Unix:
|
||||||
* - El descriptor es SOCKET y no int
|
* - El descriptor es SOCKET y no int
|
||||||
* - Constantes -1 pasan a INVALID_SOCKET
|
* - Constantes -1 pasan a INVALID_SOCKET
|
||||||
|
Reference in New Issue
Block a user