Skip to content

Commit 3acaccb

Browse files
committed
[ARROW-47590][C++]: Use explicit W functions in cpu_info.cc for UNICODE compatibility
- Replace GetModuleHandle with GetModuleHandleW - Add L" prefix to string literals in cpu_info.cc - Part of fixing Windows UNICODE build failure
1 parent e1c6fd5 commit 3acaccb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/src/arrow/util/cpu_info.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void OsRetrieveCacheSize(std::array<int64_t, kCacheLevels>* cache_sizes) {
8282
typedef BOOL(WINAPI * GetLogicalProcessorInformationFuncPointer)(void*, void*);
8383
GetLogicalProcessorInformationFuncPointer func_pointer =
8484
(GetLogicalProcessorInformationFuncPointer)GetProcAddress(
85-
GetModuleHandle("kernel32"), "GetLogicalProcessorInformation");
85+
GetModuleHandleW(L"kernel32"), "GetLogicalProcessorInformation");
8686

8787
if (!func_pointer) {
8888
ARROW_LOG(WARNING) << "Failed to find procedure GetLogicalProcessorInformation";

0 commit comments

Comments
 (0)