diff options
author | Anatol Belski <ab@php.net> | 2016-07-23 23:21:17 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2016-07-23 23:24:32 +0200 |
commit | 88d4f149a653e8a4eb754d08eb8c68bfd5973226 (patch) | |
tree | 0d8d09f61bd2f31cdcd4af87693f32cac73e95b6 | |
parent | 40557fdc346bde45dc912ae8ebe4bd7f3ff9d469 (diff) | |
download | php-git-88d4f149a653e8a4eb754d08eb8c68bfd5973226.tar.gz |
improve typedef and fix the fake function
-rw-r--r-- | win32/ioutil.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/win32/ioutil.c b/win32/ioutil.c index 69cc5e2051..57a1daf72a 100644 --- a/win32/ioutil.c +++ b/win32/ioutil.c @@ -66,7 +66,7 @@ #include <winnls.h> */ -typedef HRESULT (WINAPI *MyPathCchCanonicalizeEx)(_Out_ PWSTR pszPathOut, _In_ size_t cchPathOut, _In_ PCWSTR pszPathIn, _In_ unsigned long dwFlags); +typedef HRESULT (WINAPI *MyPathCchCanonicalizeEx)(wchar_t *pszPathOut, size_t cchPathOut, const wchar_t *pszPathIn, unsigned long dwFlags); static MyPathCchCanonicalizeEx canonicalize_path_w = NULL; @@ -539,10 +539,10 @@ PW32IO BOOL php_win32_ioutil_normalize_path_w(wchar_t **buf, size_t len, size_t return TRUE; }/*}}}*/ -static HRESULT MyPathCchCanonicalizeExFallback(_Out_ PWSTR pszPathOut, _In_ size_t cchPathOut, _In_ PCWSTR pszPathIn, _In_ unsigned long dwFlags) +static HRESULT MyPathCchCanonicalizeExFallback(wchar_t *pszPathOut, size_t cchPathOut, const wchar_t *pszPathIn, unsigned long dwFlags) { - pszPathOut = pszPathIn; - cchPathOut = wcslen(pszPathOut); + cchPathOut = wcslen(pszPathIn); + memmove(pszPathOut, pszPathIn, (cchPathOut + 1) * sizeof(wchar_t)); return S_OK; } |