Apply the changes done directly to stc.cpp in r71428 and r71429 to the script
generating this code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71539
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
'void %s(const wxString& text);',
'''void %s(const wxString& text) {
'void %s(const wxString& text);',
'''void %s(const wxString& text) {
- wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
- SendMsg(%s, buf.length()-1, (sptr_t)(const char*)buf);''',
+ const wxWX2MBbuf buf = wx2stc(text);
+ SendMsg(%s, wx2stclen(text, buf), (sptr_t)(const char*)buf);''',
0),
'AddStyledText' : (0,
0),
'AddStyledText' : (0,
'void %s(const wxString& text);',
'''void %s(const wxString& text) {
'void %s(const wxString& text);',
'''void %s(const wxString& text) {
- wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
- SendMsg(%s, buf.length()-1, (sptr_t)(const char*)buf);''',
+ const wxWX2MBbuf buf = wx2stc(text);
+ SendMsg(%s, wx2stclen(text, buf), (sptr_t)(const char*)buf);''',
0),
'GetViewWS' : ( 'GetViewWhiteSpace', 0, 0, 0),
0),
'GetViewWS' : ( 'GetViewWhiteSpace', 0, 0, 0),
TextToFind ft;
ft.chrg.cpMin = minPos;
ft.chrg.cpMax = maxPos;
TextToFind ft;
ft.chrg.cpMin = minPos;
ft.chrg.cpMax = maxPos;
- wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
+ const wxWX2MBbuf buf = wx2stc(text);
ft.lpstrText = (char*)(const char*)buf;
return SendMsg(%s, flags, (sptr_t)&ft);''',
ft.lpstrText = (char*)(const char*)buf;
return SendMsg(%s, flags, (sptr_t)&ft);''',
'''
int %s(const wxString& text) {
'''
int %s(const wxString& text) {
- wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
- return SendMsg(%s, buf.length()-1, (sptr_t)(const char*)buf);''',
+ const wxWX2MBbuf buf = wx2stc(text);
+ return SendMsg(%s, wx2stclen(text, buf), (sptr_t)(const char*)buf);''',
'''
int %s(const wxString& text) {
'''
int %s(const wxString& text) {
- wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
- return SendMsg(%s, buf.length()-1, (sptr_t)(const char*)buf);''',
+ const wxWX2MBbuf buf = wx2stc(text);
+ return SendMsg(%s, wx2stclen(text, buf), (sptr_t)(const char*)buf);''',
'''
int %s(const wxString& text) {
'''
int %s(const wxString& text) {
- wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
- return SendMsg(%s, buf.length()-1, (sptr_t)(const char*)buf);''',
+ const wxWX2MBbuf buf = wx2stc(text);
+ return SendMsg(%s, wx2stclen(text, buf), (sptr_t)(const char*)buf);''',
0),
# not sure what to do about these yet
0),
# not sure what to do about these yet