+extern wxCharBuffer wx2stc(const wxString& str);
+
+// This function takes both wxString and wxCharBuffer because it uses either
+// one or the other of them depending on the build mode. In Unicode it uses the
+// length of the already converted buffer to avoid doing the conversion again
+// just to compute the length.
+inline size_t wx2stclen(const wxString& WXUNUSED(str), const wxCharBuffer& buf)
+{
+ return buf.length() - 1;
+}