Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(6)

Side by Side Diff: Objects/typeobject.c

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Objects/stringlib/string_format.h ('k') | Objects/unicodeobject.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Type object implementation */ 1 /* Type object implementation */
2 2
3 #include "Python.h" 3 #include "Python.h"
4 #include "frameobject.h" 4 #include "frameobject.h"
5 #include "structmember.h" 5 #include "structmember.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 9
10 /* Support type attribute cache */ 10 /* Support type attribute cache */
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 /* Extract the type again; tp_del may have changed it */ 959 /* Extract the type again; tp_del may have changed it */
960 type = Py_TYPE(self); 960 type = Py_TYPE(self);
961 961
962 /* Call the base tp_dealloc(); first retrack self if 962 /* Call the base tp_dealloc(); first retrack self if
963 * basedealloc knows about gc. 963 * basedealloc knows about gc.
964 */ 964 */
965 if (PyType_IS_GC(base)) 965 if (PyType_IS_GC(base))
966 _PyObject_GC_TRACK(self); 966 _PyObject_GC_TRACK(self);
967 assert(basedealloc); 967 assert(basedealloc);
968 basedealloc(self); 968 basedealloc(self);
969
970 PyType_Modified(type);
971 969
972 /* Can't reference self beyond this point */ 970 /* Can't reference self beyond this point */
973 Py_DECREF(type); 971 Py_DECREF(type);
974 972
975 endlabel: 973 endlabel:
976 ++_PyTrash_delete_nesting; 974 ++_PyTrash_delete_nesting;
977 Py_TRASHCAN_SAFE_END(self); 975 Py_TRASHCAN_SAFE_END(self);
978 --_PyTrash_delete_nesting; 976 --_PyTrash_delete_nesting;
979 977
980 /* Explanation of the weirdness around the trashcan macros: 978 /* Explanation of the weirdness around the trashcan macros:
(...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after
2961 Py_DECREF(name); 2959 Py_DECREF(name);
2962 return rtn; 2960 return rtn;
2963 } 2961 }
2964 2962
2965 static PyObject * 2963 static PyObject *
2966 object_str(PyObject *self) 2964 object_str(PyObject *self)
2967 { 2965 {
2968 unaryfunc f; 2966 unaryfunc f;
2969 2967
2970 f = Py_TYPE(self)->tp_repr; 2968 f = Py_TYPE(self)->tp_repr;
2971 if (f == NULL || f == object_str) 2969 if (f == NULL)
2972 f = object_repr; 2970 f = object_repr;
2973 return f(self); 2971 return f(self);
2974 } 2972 }
2975 2973
2976 static PyObject * 2974 static PyObject *
2977 object_richcompare(PyObject *self, PyObject *other, int op) 2975 object_richcompare(PyObject *self, PyObject *other, int op)
2978 { 2976 {
2979 PyObject *res; 2977 PyObject *res;
2980 2978
2981 switch (op) { 2979 switch (op) {
(...skipping 3528 matching lines...) Expand 10 before | Expand all | Expand 10 after
6510 0, /* tp_base */ 6508 0, /* tp_base */
6511 0, /* tp_dict */ 6509 0, /* tp_dict */
6512 super_descr_get, /* tp_descr_get */ 6510 super_descr_get, /* tp_descr_get */
6513 0, /* tp_descr_set */ 6511 0, /* tp_descr_set */
6514 0, /* tp_dictoffset */ 6512 0, /* tp_dictoffset */
6515 super_init, /* tp_init */ 6513 super_init, /* tp_init */
6516 PyType_GenericAlloc, /* tp_alloc */ 6514 PyType_GenericAlloc, /* tp_alloc */
6517 PyType_GenericNew, /* tp_new */ 6515 PyType_GenericNew, /* tp_new */
6518 PyObject_GC_Del, /* tp_free */ 6516 PyObject_GC_Del, /* tp_free */
6519 }; 6517 };
OLDNEW
« no previous file with comments | « Objects/stringlib/string_format.h ('k') | Objects/unicodeobject.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+