]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/gen_iface.py
Fix wxHash{Set,Map} compilation with g++ 4.7 in C++11 mode.
[wxWidgets.git] / src / stc / gen_iface.py
index 8fddb97722086ead377df4f7c72ac46a2b997344..37fc6911cc683dde9677b385c227188ac45d2465 100755 (executable)
@@ -8,7 +8,7 @@
 # Created:      5-Sept-2000
 # RCS-ID:       $Id$
 # Copyright:    (c) 2000 by Total Control Software
-# Licence:      wxWindows license
+# Licence:      wxWindows licence
 #----------------------------------------------------------------------------
 
 
@@ -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),
@@ -194,9 +194,9 @@ methodOverrideMap = {
                 const wxColour& background) {
 
                 SendMsg(%s, markerNumber, markerSymbol);
-                if (foreground.Ok())
+                if (foreground.IsOk())
                     MarkerSetForeground(markerNumber, foreground);
-                if (background.Ok())
+                if (background.IsOk())
                     MarkerSetBackground(markerNumber, background);''',
 
      ('Set the symbol used for a particular marker number,',
@@ -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