build: rework everything to use wxString instead of pointer-to-wxChar #112
Conversation
* abolish reliance on pointer-to-wxChar
* use backend-neutral wxString
* drop all wxString::c_str() calls because they give a pointer to
the internal representation, which is also bounded by the lifetime
of the surrounding object.
* drop calls to wxString::mb_str() because they give a
platform-dependent internal representation; under a Unicode
wxWidgets build, this is wchar_t, which
- on Windows: is not usable, because most APIs expect narrow
locale-specific strings
- on Linux: is not usable, because most APIs expect narrow
UTF-8 strings
* drop calls to wx_str, same as mb_str
|
A brief but not complete look shows you were alert to use const wString& in Did you make some attempt to stop at least once in every changed function On Friday, February 26, 2016, jengelh notifications@github.com wrote:
|
|
This fixes building on openSuse. |
|
I am not willing to pull this. This is a large commit that Jan admitted Better to break this into smaller commits, for instance such as separating I noticed a profanity in one of the comments -- please don't do that. PRL On Sat, Mar 12, 2016 at 11:10 AM, ThomasFeher notifications@github.com
|
|
Leaving this open for now, even though now has conflicts. I think the idea is right. The changes should be 'mechanical' and hence safe. |
|
Added reject-if-not-updated soon. It has merge conflicts, a profanity, and Paul would like it in smaller chunks. It's still a nice idea, and would help us on SUSE. |
|
There is quite a mixture in here. The varags function changes look odd as they are the opposite of what worked in wx2.8, but match the documentation (and the one I tried worked for me). |
| .dirstamp | ||
| stamp-h[0-9]* | ||
| Makefile | ||
| Makefile.in |
richardash1981
Sep 19, 2016
Contributor
We currently track Makefile.in. Don't want this change mixed in with charset changes.
We currently track Makefile.in. Don't want this change mixed in with charset changes.
| else | ||
| printf("ASSERTION FAILED!\n%s: %d\n", (const char *)wxString(fileName).mb_str(), lineNumber); | ||
| wxPrintf("ASSERTION FAILED!\n%s: %d\n", fileName, lineNumber); | ||
|
|
richardash1981
Sep 19, 2016
Contributor
This is an example of the change described here: http://docs.wxwidgets.org/trunk/classwx_string.html#string_vararg which basically boils down to the "right" solution being different to what worked in wx2.8.
This is an example of the change described here: http://docs.wxwidgets.org/trunk/classwx_string.html#string_vararg which basically boils down to the "right" solution being different to what worked in wx2.8.
|
No activity since 2016. Closing. |
make it build with wx3 --enable-stl and throw out other type sillynesses. That's all. It's not tested.
the internal representation, which is also bounded by the lifetime
of the surrounding object.
platform-dependent internal representation; under a Unicode
wxWidgets build, this is wchar_t, which
locale-specific strings
UTF-8 strings