mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-31 10:09:16 +08:00
Don't use PyInt_FromSsize_t
Change the Python layer to avoid PyInt_FromSsize_t, and remove the compatibility define. gdb/ChangeLog 2020-09-15 Tom Tromey <tromey@adacore.com> * python/python-internal.h (PyInt_FromSsize_t): Remove define. * python/py-record.c (recpy_element_number): Use gdb_py_object_from_longest. (recpy_gap_number): Likewise.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2020-09-15 Tom Tromey <tromey@adacore.com>
|
||||||
|
|
||||||
|
* python/python-internal.h (PyInt_FromSsize_t): Remove define.
|
||||||
|
* python/py-record.c (recpy_element_number): Use
|
||||||
|
gdb_py_object_from_longest.
|
||||||
|
(recpy_gap_number): Likewise.
|
||||||
|
|
||||||
2020-09-15 Tom Tromey <tromey@adacore.com>
|
2020-09-15 Tom Tromey <tromey@adacore.com>
|
||||||
|
|
||||||
* top.c (ui::ui): Update.
|
* top.c (ui::ui): Update.
|
||||||
|
@ -374,7 +374,7 @@ recpy_element_number (PyObject *self, void* closure)
|
|||||||
{
|
{
|
||||||
const recpy_element_object * const obj = (recpy_element_object *) self;
|
const recpy_element_object * const obj = (recpy_element_object *) self;
|
||||||
|
|
||||||
return PyInt_FromSsize_t (obj->number);
|
return gdb_py_object_from_longest (obj->number).release ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Implementation of RecordInstruction.__hash__ [int] and
|
/* Implementation of RecordInstruction.__hash__ [int] and
|
||||||
@ -454,7 +454,7 @@ recpy_gap_number (PyObject *self, void *closure)
|
|||||||
{
|
{
|
||||||
const recpy_gap_object * const obj = (const recpy_gap_object *) self;
|
const recpy_gap_object * const obj = (const recpy_gap_object *) self;
|
||||||
|
|
||||||
return PyInt_FromSsize_t (obj->number);
|
return gdb_py_object_from_longest (obj->number).release ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Implementation of RecordGap.error_code [int]. */
|
/* Implementation of RecordGap.error_code [int]. */
|
||||||
|
@ -97,7 +97,6 @@
|
|||||||
|
|
||||||
#define PyInt_Check PyLong_Check
|
#define PyInt_Check PyLong_Check
|
||||||
#define PyInt_FromLong PyLong_FromLong
|
#define PyInt_FromLong PyLong_FromLong
|
||||||
#define PyInt_FromSsize_t PyLong_FromSsize_t
|
|
||||||
#define PyInt_AsLong PyLong_AsLong
|
#define PyInt_AsLong PyLong_AsLong
|
||||||
#define PyInt_AsSsize_t PyLong_AsSsize_t
|
#define PyInt_AsSsize_t PyLong_AsSsize_t
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user