Files
Kevin Buettner 26c897821b Define unique_ptr specialization for Py_buffer.
This patch causes PyBuffer_Release() to be called when the associated
buffer goes out of scope.  I've been using it as follows:

 ...
 Py_buffer_up buffer_up;
 Py_buffer py_buf;

 if (PyObject_CheckBuffer (obj)
     && PyObject_GetBuffer (obj, &py_buf, PyBUF_SIMPLE) == 0)
   {
      /* Got a buffer, py_buf, out of obj.  Cause it to released
         when it goes out of scope.  */
     buffer_up.reset (&py_buf);
   }
   ...

This snippet of code was taken directly from an upcoming patch to
python-value.c.

gdb/ChangeLog:

	* python/python-internal.h (Py_buffer_deleter): New struct.
	(Py_buffer_up): New typedef.
2019-02-26 10:21:22 -07:00
..
2019-01-22 20:35:21 -07:00
2019-02-07 03:27:23 -07:00
2019-02-07 03:27:23 -07:00
2019-01-03 14:49:18 -07:00
2019-02-07 03:27:23 -07:00
2019-02-07 03:27:23 -07:00
2019-02-07 03:27:23 -07:00
2019-01-25 15:28:16 -07:00
2019-02-07 03:27:23 -07:00