mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Narrow the scope of ignoring the warning
This commit is contained in:
parent
2b87fa400a
commit
e2a8bab98a
@ -54,6 +54,9 @@ static inline void wchar_raii_free(wchar_t *x) { PyMem_Free(x); }
|
|||||||
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
|
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
|
||||||
#endif
|
#endif
|
||||||
class wchar_raii : public generic_raii<wchar_t*, wchar_raii_free, static_cast<wchar_t*>(NULL)> {
|
class wchar_raii : public generic_raii<wchar_t*, wchar_raii_free, static_cast<wchar_t*>(NULL)> {
|
||||||
|
#if (defined(__GNUC__) && !defined(__clang__))
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
private:
|
private:
|
||||||
Py_ssize_t sz;
|
Py_ssize_t sz;
|
||||||
public:
|
public:
|
||||||
@ -73,9 +76,6 @@ class wchar_raii : public generic_raii<wchar_t*, wchar_raii_free, static_cast<wc
|
|||||||
std::wstring as_copy() const { return std::wstring(handle, sz); }
|
std::wstring as_copy() const { return std::wstring(handle, sz); }
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
#if (defined(__GNUC__) && !defined(__clang__))
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef generic_raii<PyObject*, Py_DecRef> pyobject_raii;
|
typedef generic_raii<PyObject*, Py_DecRef> pyobject_raii;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user