]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes to common source files not applicable to open-vm-tools.
authorJohn Wolfe <jwolfe@vmware.com>
Tue, 13 Sep 2022 17:31:15 +0000 (10:31 -0700)
committerJohn Wolfe <jwolfe@vmware.com>
Tue, 13 Sep 2022 17:31:15 +0000 (10:31 -0700)
open-vm-tools/services/plugins/dndcp/stringxx/string.cc
open-vm-tools/services/plugins/dndcp/stringxx/string.hh

index c76da737800834837c6648e6cd29047bf1669561..9b0390c2d4f0e03e56024fc5b045a0199933c86a 100644 (file)
@@ -400,6 +400,33 @@ string::operator const ubstr_t()
    return ubstr_t(GetUtf16Cache());
 }
 
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * utf::string::t_str --
+ *
+ *      Get the TCHAR representation of this string.
+ *
+ * Results:
+ *      The TCHAR representation.
+ *
+ * Side effects:
+ *      None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+const TCHAR*
+string::t_str() const
+{
+#ifdef UNICODE
+   return w_str();
+#else
+   return c_str();
+#endif
+}
+
 #endif
 
 
index 40457c43b7f16a04b70bb26e2ee0e09b7bfb9d67..ec60f5bfa5e73d7ca815b85a70e17e084018a4ce 100644 (file)
@@ -152,6 +152,9 @@ public:
    const char *c_str() const;
    const utf16_t *w_str() const;
    const Glib::ustring& ustr() const;
+#ifdef _WIN32
+   const TCHAR* t_str() const;
+#endif
 
    // Mapping functions to Glib::ustring
    void swap(string &s);