| OLD | NEW |
| 1 /* Python interface to lazy strings. | 1 /* Python interface to lazy strings. |
| 2 | 2 |
| 3 Copyright (C) 2010-2012 Free Software Foundation, Inc. | 3 Copyright (C) 2010-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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 } | 77 } |
| 78 | 78 |
| 79 static PyObject * | 79 static PyObject * |
| 80 stpy_get_length (PyObject *self, void *closure) | 80 stpy_get_length (PyObject *self, void *closure) |
| 81 { | 81 { |
| 82 lazy_string_object *self_string = (lazy_string_object *) self; | 82 lazy_string_object *self_string = (lazy_string_object *) self; |
| 83 | 83 |
| 84 return PyLong_FromLong (self_string->length); | 84 return PyLong_FromLong (self_string->length); |
| 85 } | 85 } |
| 86 | 86 |
| 87 PyObject * | 87 static PyObject * |
| 88 stpy_get_type (PyObject *self, void *closure) | 88 stpy_get_type (PyObject *self, void *closure) |
| 89 { | 89 { |
| 90 lazy_string_object *str_obj = (lazy_string_object *) self; | 90 lazy_string_object *str_obj = (lazy_string_object *) self; |
| 91 | 91 |
| 92 return type_to_type_object (str_obj->type); | 92 return type_to_type_object (str_obj->type); |
| 93 } | 93 } |
| 94 | 94 |
| 95 static PyObject * | 95 static PyObject * |
| 96 stpy_convert_to_value (PyObject *self, PyObject *args) | 96 stpy_convert_to_value (PyObject *self, PyObject *args) |
| 97 { | 97 { |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 0, /* tp_traverse */ | 242 0, /* tp_traverse */ |
| 243 0, /* tp_clear */ | 243 0, /* tp_clear */ |
| 244 0, /* tp_richcompare */ | 244 0, /* tp_richcompare */ |
| 245 0, /* tp_weaklistoffset */ | 245 0, /* tp_weaklistoffset */ |
| 246 0, /* tp_iter */ | 246 0, /* tp_iter */ |
| 247 0, /* tp_iternext */ | 247 0, /* tp_iternext */ |
| 248 lazy_string_object_methods, /* tp_methods */ | 248 lazy_string_object_methods, /* tp_methods */ |
| 249 0, /* tp_members */ | 249 0, /* tp_members */ |
| 250 lazy_string_object_getset /* tp_getset */ | 250 lazy_string_object_getset /* tp_getset */ |
| 251 }; | 251 }; |
| OLD | NEW |