mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Use & instead of address()
This commit is contained in:
parent
a5de2b33c0
commit
13d7f3e5d9
@ -339,9 +339,9 @@ get_device_information(CComPtr<IPortableDevice> &device, IPortableDeviceProperti
|
||||
pyobject_raii storage(get_storage_info(device));
|
||||
if (!storage) {
|
||||
pyobject_raii exc_type, exc_value, exc_tb;
|
||||
PyErr_Fetch(exc_type.address(), exc_value.address(), exc_tb.address());
|
||||
PyErr_Fetch(&exc_type, &exc_value, &exc_tb);
|
||||
if (exc_type) {
|
||||
PyErr_NormalizeException(exc_type.address(), exc_value.address(), exc_tb.address());
|
||||
PyErr_NormalizeException(&exc_type, &exc_value, &exc_tb);
|
||||
PyDict_SetItemString(ans, "storage_error", exc_value.ptr());
|
||||
} else {
|
||||
PyDict_SetItemString(ans, "storage_error", PyUnicode_FromString("get_storage_info() failed without an error set"));
|
||||
|
@ -49,6 +49,7 @@ class generic_raii {
|
||||
void set_ptr(T val) { handle = val; }
|
||||
T* address() { return &handle; }
|
||||
explicit operator bool() const { return handle != null; }
|
||||
T* operator &() { return &handle; }
|
||||
};
|
||||
|
||||
typedef generic_raii<wchar_t*, PyMem_Free, NULL> wchar_raii;
|
||||
|
Loading…
x
Reference in New Issue
Block a user