com php-src: improve typedef and fix the fake function: win32/ioutil.c
| From: | Anatol Belski | Date: | Sat, 23 Jul 2016 21:24:32 +0000 |
| Subject: | com php-src: improve typedef and fix the fake function: win32/ioutil.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-93355@lists.php.net to get a copy of this message | ||
Commit: 88d4f149a653e8a4eb754d08eb8c68bfd5973226
Author: Anatol Belski <ab@php.net> Sat, 23 Jul 2016 23:21:17 +0200
Parents: 40557fdc346bde45dc912ae8ebe4bd7f3ff9d469
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=88d4f149a653e8a4eb754d08eb8c68bfd5973226
Log:
improve typedef and fix the fake function
Changed paths:
M win32/ioutil.c
Diff:
diff --git a/win32/ioutil.c b/win32/ioutil.c
index 69cc5e2..57a1daf 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;
}