forked from pool/python-wxPython
Jan Engelhardt
66f31faeb6
- Wrap all relevant build dependencies when building with system wxWidgets library. - Add patches to allow building with STL variant of wxGTK: * 0001-Fix-conversion-of-variant-list-members.patch * use_stl_build.patch * 0001-Fix-wxUIActionSimulator-Text-parameter-documentation.patch * 0003-Use-explicit-wxString-c_str-conversion-for-sipFindTy.patch OBS-URL: https://build.opensuse.org/request/show/818645 OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=18
60 lines
2.0 KiB
Diff
60 lines
2.0 KiB
Diff
From 5b810b129db00a98c84672cd94a4a4be83ba8e69 Mon Sep 17 00:00:00 2001
|
|
From: Vadim Zeitlin <vadim@wxwidgets.org>
|
|
Date: Mon, 1 Jun 2020 17:25:41 +0200
|
|
Subject: [PATCH] Fix wxUIActionSimulator::Text() parameter documentation
|
|
|
|
This function explicitly accepts ASCII strings only, so it's limited to
|
|
"const char*", but was incorrectly documented as taking wxString.
|
|
|
|
Closes https://github.com/wxWidgets/wxWidgets/pull/1879
|
|
---
|
|
ext/wxWidgets/interface/wx/uiaction.h | 4 ++--
|
|
sip/cpp/sip_corewxUIActionSimulator.cpp | 2 +-
|
|
sip/gen/uiaction.sip | 2 +-
|
|
3 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/ext/wxWidgets/interface/wx/uiaction.h b/ext/wxWidgets/interface/wx/uiaction.h
|
|
index 27b3aaf2..7d4eba52 100644
|
|
--- a/ext/wxWidgets/interface/wx/uiaction.h
|
|
+++ b/ext/wxWidgets/interface/wx/uiaction.h
|
|
@@ -176,8 +176,8 @@ public:
|
|
keyboard layout but may not work with other layouts.
|
|
|
|
@param text
|
|
- The string to type.
|
|
+ The string, containing only US ASCII characters, to type.
|
|
*/
|
|
- bool Text(const wxString& text);
|
|
+ bool Text(const char* text);
|
|
};
|
|
|
|
diff --git a/sip/cpp/sip_corewxUIActionSimulator.cpp b/sip/cpp/sip_corewxUIActionSimulator.cpp
|
|
index 42bc481a..85a47384 100644
|
|
--- a/sip/cpp/sip_corewxUIActionSimulator.cpp
|
|
+++ b/sip/cpp/sip_corewxUIActionSimulator.cpp
|
|
@@ -496,7 +496,7 @@ static PyObject *meth_wxUIActionSimulator_Text(PyObject *sipSelf, PyObject *sipA
|
|
PyErr_Clear();
|
|
|
|
Py_BEGIN_ALLOW_THREADS
|
|
- sipRes = sipCpp->Text(*text);
|
|
+ sipRes = sipCpp->Text(text->c_str());
|
|
Py_END_ALLOW_THREADS
|
|
sipReleaseType(const_cast< ::wxString *>(text),sipType_wxString,textState);
|
|
|
|
diff --git a/sip/gen/uiaction.sip b/sip/gen/uiaction.sip
|
|
index 788e2b65..ff27dfa0 100644
|
|
--- a/sip/gen/uiaction.sip
|
|
+++ b/sip/gen/uiaction.sip
|
|
@@ -129,7 +129,7 @@ public:
|
|
%End
|
|
|
|
bool Text(
|
|
- const wxString & text
|
|
+ const char* text
|
|
);
|
|
%Docstring
|
|
Text(text) -> bool
|
|
--
|
|
2.27.0
|
|
|