From: Vadim Zeitlin Date: Sun, 8 Apr 2007 22:42:45 +0000 (+0000) Subject: pass 0, not NULL, to SendMsg() which takes long to avoid gcc warnings X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/600b3983e9512d06af4554ed47e4e1ef8734d2d8 pass 0, not NULL, to SendMsg() which takes long to avoid gcc warnings git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/stc/gen_iface.py b/src/stc/gen_iface.py index c432d18884..ea310fb661 100644 --- a/src/stc/gen_iface.py +++ b/src/stc/gen_iface.py @@ -533,7 +533,7 @@ methodOverrideMap = { 'wxString %s(const wxString& key);', '''wxString %s(const wxString& key) { - int len = SendMsg(SCI_GETPROPERTY, (long)(const char*)wx2stc(key), (long)NULL); + int len = SendMsg(SCI_GETPROPERTY, (long)(const char*)wx2stc(key), 0); if (!len) return wxEmptyString; wxMemoryBuffer mbuf(len+1); @@ -549,7 +549,7 @@ methodOverrideMap = { 'wxString %s(const wxString& key);', '''wxString %s(const wxString& key) { - int len = SendMsg(SCI_GETPROPERTYEXPANDED, (long)(const char*)wx2stc(key), (long)NULL); + int len = SendMsg(SCI_GETPROPERTYEXPANDED, (long)(const char*)wx2stc(key), 0); if (!len) return wxEmptyString; wxMemoryBuffer mbuf(len+1); diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 213a96414d..c7a5b60f89 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -28,6 +28,7 @@ #include +#include "wx/wx.h" #include "wx/tokenzr.h" #include "wx/mstream.h" #include "wx/image.h" @@ -2561,7 +2562,7 @@ void wxStyledTextCtrl::SetLexerLanguage(const wxString& language) { // Retrieve a 'property' value previously set with SetProperty. wxString wxStyledTextCtrl::GetProperty(const wxString& key) { - int len = SendMsg(SCI_GETPROPERTY, (long)(const char*)wx2stc(key), (long)NULL); + int len = SendMsg(SCI_GETPROPERTY, (long)(const char*)wx2stc(key), 0); if (!len) return wxEmptyString; wxMemoryBuffer mbuf(len+1); @@ -2575,7 +2576,7 @@ wxString wxStyledTextCtrl::GetProperty(const wxString& key) { // Retrieve a 'property' value previously set with SetProperty, // with '$()' variable replacement on returned buffer. wxString wxStyledTextCtrl::GetPropertyExpanded(const wxString& key) { - int len = SendMsg(SCI_GETPROPERTYEXPANDED, (long)(const char*)wx2stc(key), (long)NULL); + int len = SendMsg(SCI_GETPROPERTYEXPANDED, (long)(const char*)wx2stc(key), 0); if (!len) return wxEmptyString; wxMemoryBuffer mbuf(len+1);