Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / bindings / python / python-typemaps.h
blob8a533e822988ed386c50aaa06b868f4bdeb8952c
1 #ifndef LLDB_BINDINGS_PYTHON_PYTHON_TYPEMAPS_H
2 #define LLDB_BINDINGS_PYTHON_PYTHON_TYPEMAPS_H
4 #include <Python.h>
6 // Defined here instead of a .swig file because SWIG 2 doesn't support
7 // explicit deleted functions.
8 struct Py_buffer_RAII {
9 Py_buffer buffer = {};
10 Py_buffer_RAII(){};
11 Py_buffer &operator=(const Py_buffer_RAII &) = delete;
12 Py_buffer_RAII(const Py_buffer_RAII &) = delete;
13 ~Py_buffer_RAII() {
14 if (buffer.obj)
15 PyBuffer_Release(&buffer);
19 #endif // LLDB_BINDINGS_PYTHON_PYTHON_TYPEMAPS_H