OLD | NEW |
1 /* Python interface to inferior events. | 1 /* Python interface to inferior events. |
2 | 2 |
3 Copyright (C) 2009-2012 Free Software Foundation, Inc. | 3 Copyright (C) 2009-2012 Free Software Foundation, Inc. |
4 | 4 |
5 This file is part of GDB. | 5 This file is part of GDB. |
6 | 6 |
7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation; either version 3 of the License, or | 9 the Free Software Foundation; either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 Py_XDECREF (event); | 125 Py_XDECREF (event); |
126 return 0; | 126 return 0; |
127 | 127 |
128 fail: | 128 fail: |
129 gdbpy_print_stack (); | 129 gdbpy_print_stack (); |
130 Py_XDECREF (callback_list_copy); | 130 Py_XDECREF (callback_list_copy); |
131 Py_XDECREF (event); | 131 Py_XDECREF (event); |
132 return -1; | 132 return -1; |
133 } | 133 } |
134 | 134 |
| 135 static PyGetSetDef event_object_getset[] = |
| 136 { |
| 137 { "__dict__", gdb_py_generic_dict, NULL, |
| 138 "The __dict__ for this event.", &event_object_type }, |
| 139 { NULL } |
| 140 }; |
| 141 |
135 PyTypeObject event_object_type = | 142 PyTypeObject event_object_type = |
136 { | 143 { |
137 PyObject_HEAD_INIT (NULL) | 144 PyObject_HEAD_INIT (NULL) |
138 0, /* ob_size */ | 145 0, /* ob_size */ |
139 "gdb.Event", /* tp_name */ | 146 "gdb.Event", /* tp_name */ |
140 sizeof (event_object), /* tp_basicsize */ | 147 sizeof (event_object), /* tp_basicsize */ |
141 0, /* tp_itemsize */ | 148 0, /* tp_itemsize */ |
142 evpy_dealloc, /* tp_dealloc */ | 149 evpy_dealloc, /* tp_dealloc */ |
143 0, /* tp_print */ | 150 0, /* tp_print */ |
144 0, /* tp_getattr */ | 151 0, /* tp_getattr */ |
(...skipping 12 matching lines...) Expand all Loading... |
157 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ | 164 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ |
158 "GDB event object", /* tp_doc */ | 165 "GDB event object", /* tp_doc */ |
159 0, /* tp_traverse */ | 166 0, /* tp_traverse */ |
160 0, /* tp_clear */ | 167 0, /* tp_clear */ |
161 0, /* tp_richcompare */ | 168 0, /* tp_richcompare */ |
162 0, /* tp_weaklistoffset */ | 169 0, /* tp_weaklistoffset */ |
163 0, /* tp_iter */ | 170 0, /* tp_iter */ |
164 0, /* tp_iternext */ | 171 0, /* tp_iternext */ |
165 0, /* tp_methods */ | 172 0, /* tp_methods */ |
166 0, /* tp_members */ | 173 0, /* tp_members */ |
167 0, /* tp_getset */ | 174 event_object_getset,» » » /* tp_getset */ |
168 0, /* tp_base */ | 175 0, /* tp_base */ |
169 0, /* tp_dict */ | 176 0, /* tp_dict */ |
170 0, /* tp_descr_get */ | 177 0, /* tp_descr_get */ |
171 0, /* tp_descr_set */ | 178 0, /* tp_descr_set */ |
172 offsetof (event_object, dict), /* tp_dictoffset */ | 179 offsetof (event_object, dict), /* tp_dictoffset */ |
173 0, /* tp_init */ | 180 0, /* tp_init */ |
174 0 /* tp_alloc */ | 181 0 /* tp_alloc */ |
175 }; | 182 }; |
OLD | NEW |