From: Robin Dunn Date: Tue, 7 Feb 2012 23:55:50 +0000 (+0000) Subject: use buf.length() instead of strlen() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/017ddee0cbf48438fefc0e3d698400eef863b865 use buf.length() instead of strlen() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/stc/gen_iface.py b/src/stc/gen_iface.py index 326b259fe6..37fc6911cc 100755 --- a/src/stc/gen_iface.py +++ b/src/stc/gen_iface.py @@ -89,7 +89,7 @@ methodOverrideMap = { '''void %s(const wxString& text) { wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); - SendMsg(%s, strlen(buf), (sptr_t)(const char*)buf);''', + SendMsg(%s, buf.length(), (sptr_t)(const char*)buf);''', 0), 'AddStyledText' : (0, @@ -104,7 +104,7 @@ methodOverrideMap = { '''void %s(const wxString& text) { wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); - SendMsg(%s, strlen(buf), (sptr_t)(const char*)buf);''', + SendMsg(%s, buf.length(), (sptr_t)(const char*)buf);''', 0), 'GetViewWS' : ( 'GetViewWhiteSpace', 0, 0, 0), @@ -597,7 +597,7 @@ methodOverrideMap = { ''' int %s(const wxString& text) { wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); - return SendMsg(%s, strlen(buf), (sptr_t)(const char*)buf);''', + return SendMsg(%s, buf.length(), (sptr_t)(const char*)buf);''', 0), 'ReplaceTargetRE' : @@ -607,7 +607,7 @@ methodOverrideMap = { ''' int %s(const wxString& text) { wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); - return SendMsg(%s, strlen(buf), (sptr_t)(const char*)buf);''', + return SendMsg(%s, buf.length(), (sptr_t)(const char*)buf);''', 0), 'SearchInTarget' : @@ -617,7 +617,7 @@ methodOverrideMap = { ''' int %s(const wxString& text) { wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); - return SendMsg(%s, strlen(buf), (sptr_t)(const char*)buf);''', + return SendMsg(%s, buf.length(), (sptr_t)(const char*)buf);''', 0), # not sure what to do about these yet