[Kicad-developers] [PATCH] Correct signature of sorting function

2015-07-22 Thread Simon Richter
---
 common/displlst.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/displlst.cpp b/common/displlst.cpp
index 77631fc..afea210 100644
--- a/common/displlst.cpp
+++ b/common/displlst.cpp
@@ -236,7 +236,7 @@ void EDA_LIST_DIALOG::onClose( wxCloseEvent event )
 
 /* Sort alphabetically, case insensitive.
  */
-static int wxCALLBACK MyCompareFunction( long aItem1, long aItem2, long 
aSortData )
+static int wxCALLBACK MyCompareFunction( wxIntPtr aItem1, wxIntPtr aItem2, 
wxIntPtr aSortData )
 {
 wxString* component1Name = (wxString*) aItem1;
 wxString* component2Name = (wxString*) aItem2;
-- 
2.1.4


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] [PATCH] Correct signature of sorting function

2015-07-22 Thread Simon Richter
Hi,

The sorting function signature is supposed to use wxIntPtr, which is
guaranteed to be large enough to hold a pointer. The Windows ABI defines
long to be 32 bits, even on 64 bit architectures.

I have no idea how that ever compiled.

   Simon

---
 common/displlst.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/displlst.cpp b/common/displlst.cpp
index 77631fc..afea210 100644
--- a/common/displlst.cpp
+++ b/common/displlst.cpp
@@ -236,7 +236,7 @@ void EDA_LIST_DIALOG::onClose( wxCloseEvent event )
 
 /* Sort alphabetically, case insensitive.
  */
-static int wxCALLBACK MyCompareFunction( long aItem1, long aItem2, long aSortData )
+static int wxCALLBACK MyCompareFunction( wxIntPtr aItem1, wxIntPtr aItem2, wxIntPtr aSortData )
 {
 wxString* component1Name = (wxString*) aItem1;
 wxString* component2Name = (wxString*) aItem2;
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Correct signature of sorting function

2015-07-22 Thread Wayne Stambaugh
Patch committed on r5979.  Thanks.

On 7/22/2015 2:06 PM, Simon Richter wrote:
 Hi,
 
 The sorting function signature is supposed to use wxIntPtr, which is
 guaranteed to be large enough to hold a pointer. The Windows ABI defines
 long to be 32 bits, even on 64 bit architectures.
 
 I have no idea how that ever compiled.
 
Simon
 
 ---
  common/displlst.cpp | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 
 
 ___
 Mailing list: https://launchpad.net/~kicad-developers
 Post to : kicad-developers@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~kicad-developers
 More help   : https://help.launchpad.net/ListHelp
 


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp