mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix building on windows 32bit
This commit is contained in:
parent
2ae7b84161
commit
b15117ce2b
@ -326,7 +326,7 @@ find_objects_in(CComPtr<IPortableDeviceContent> &content, CComPtr<IPortableDevic
|
|||||||
while (hr == S_OK) {
|
while (hr == S_OK) {
|
||||||
DWORD fetched;
|
DWORD fetched;
|
||||||
prop_variant pv(VT_LPWSTR);
|
prop_variant pv(VT_LPWSTR);
|
||||||
generic_raii_array<wchar_t*, CoTaskMemFree, 16> child_ids;
|
generic_raii_array<wchar_t*, co_task_mem_free, 16> child_ids;
|
||||||
Py_BEGIN_ALLOW_THREADS;
|
Py_BEGIN_ALLOW_THREADS;
|
||||||
hr = children->Next((ULONG)child_ids.size(), child_ids.ptr(), &fetched);
|
hr = children->Next((ULONG)child_ids.size(), child_ids.ptr(), &fetched);
|
||||||
Py_END_ALLOW_THREADS;
|
Py_END_ALLOW_THREADS;
|
||||||
|
@ -85,7 +85,7 @@ get_storage_info(IPortableDevice *device) { // {{{
|
|||||||
|
|
||||||
hr = S_OK;
|
hr = S_OK;
|
||||||
while (hr == S_OK) {
|
while (hr == S_OK) {
|
||||||
generic_raii_array<wchar_t*, CoTaskMemFree, 16> object_ids;
|
generic_raii_array<wchar_t*, co_task_mem_free, 16> object_ids;
|
||||||
Py_BEGIN_ALLOW_THREADS;
|
Py_BEGIN_ALLOW_THREADS;
|
||||||
hr = objects->Next((ULONG)object_ids.size(), object_ids.ptr(), &fetched);
|
hr = objects->Next((ULONG)object_ids.size(), object_ids.ptr(), &fetched);
|
||||||
Py_END_ALLOW_THREADS;
|
Py_END_ALLOW_THREADS;
|
||||||
|
@ -24,7 +24,8 @@ set_error_from_hresult(PyObject *exc_type, const char *file, const int line, con
|
|||||||
}
|
}
|
||||||
#define error_from_hresult(hr, ...) set_error_from_hresult(PyExc_OSError, __FILE__, __LINE__, hr, __VA_ARGS__)
|
#define error_from_hresult(hr, ...) set_error_from_hresult(PyExc_OSError, __FILE__, __LINE__, hr, __VA_ARGS__)
|
||||||
|
|
||||||
typedef generic_raii<wchar_t*, CoTaskMemFree, NULL> com_wchar_raii;
|
static inline void co_task_mem_free(void* m) { CoTaskMemFree(m); }
|
||||||
|
typedef generic_raii<wchar_t*, co_task_mem_free, NULL> com_wchar_raii;
|
||||||
static inline void handle_destructor(HANDLE p) { CloseHandle(p); }
|
static inline void handle_destructor(HANDLE p) { CloseHandle(p); }
|
||||||
typedef generic_raii<HANDLE, handle_destructor, INVALID_HANDLE_VALUE> handle_raii;
|
typedef generic_raii<HANDLE, handle_destructor, INVALID_HANDLE_VALUE> handle_raii;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user