Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d0c87ee

Browse files
committed
Oops, another forgotten renaming: varobject -> PyVarObject.
1 parent fe28fa0 commit d0c87ee

5 files changed

Lines changed: 11 additions & 9 deletions

File tree

Include/object.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ typedef struct _object {
117117

118118
typedef struct {
119119
PyObject_VAR_HEAD
120-
} varobject;
120+
} PyVarObject;
121121

122122

123123
/*

Include/objimpl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ n * tp_itemsize. This fills in the ob_size field as well.
5656

5757
#ifndef MS_COREDLL
5858
extern PyObject *_PyObject_New Py_PROTO((PyTypeObject *));
59-
extern varobject *_PyObject_NewVar Py_PROTO((PyTypeObject *, int));
59+
extern PyVarObject *_PyObject_NewVar Py_PROTO((PyTypeObject *, int));
6060

6161
#define PyObject_NEW(type, typeobj) ((type *) _PyObject_New(typeobj))
6262
#define PyObject_NEW_VAR(type, typeobj, n) ((type *) _PyObject_NewVar(typeobj, n))
@@ -67,10 +67,10 @@ extern varobject *_PyObject_NewVar Py_PROTO((PyTypeObject *, int));
6767
no guarantee they will use the same heap
6868
*/
6969
extern PyObject *_PyObject_New Py_PROTO((PyTypeObject *, PyObject *));
70-
extern varobject *_PyObject_NewVar Py_PROTO((PyTypeObject *, int, varobject *));
70+
extern PyVarObject *_PyObject_NewVar Py_PROTO((PyTypeObject *, int, PyVarObject *));
7171

7272
#define PyObject_NEW(type, typeobj) ((type *) _PyObject_New(typeobj,(PyObject *)malloc((typeobj)->tp_basicsize)))
73-
#define PyObject_NEW_VAR(type, typeobj, n) ((type *) _PyObject_NewVar(typeobj, n, (varobject *)malloc((typeobj)->tp_basicsize + n * (typeobj)->tp_itemsize)))
73+
#define PyObject_NEW_VAR(type, typeobj, n) ((type *) _PyObject_NewVar(typeobj, n, (PyVarObject *)malloc((typeobj)->tp_basicsize + n * (typeobj)->tp_itemsize)))
7474

7575
#endif /* MS_COREDLL */
7676

Include/rename2.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ PERFORMANCE OF THIS SOFTWARE.
115115
#define longobject PyLongObject
116116
#define noobject PyNothingObject
117117
#define object PyObject
118+
#define varobject PyVarObject
118119
#define stringobject PyStringObject
119120
#define typeobject PyTypeObject
120121
#define listobject PyListObject

Misc/RENAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ intobject PyIntObject
7979
longobject PyLongObject
8080
noobject PyNothingObject
8181
object PyObject
82+
varobject PyVarObject
8283
stringobject PyStringObject
8384
typeobject PyTypeObject
8485
listobject PyListObject

Objects/object.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,24 +129,24 @@ _PyObject_New(tp,op)
129129
}
130130

131131
#ifndef MS_COREDLL
132-
varobject *
132+
PyVarObject *
133133
_PyObject_NewVar(tp, size)
134134
PyTypeObject *tp;
135135
int size;
136136
#else
137-
varobject *
137+
PyVarObject *
138138
_PyObject_NewVar(tp, size, op)
139139
PyTypeObject *tp;
140140
int size;
141-
varobject *op;
141+
PyVarObject *op;
142142
#endif
143143
{
144144
#ifndef MS_COREDLL
145-
varobject *op = (varobject *)
145+
PyVarObject *op = (PyVarObject *)
146146
malloc(tp->tp_basicsize + size * tp->tp_itemsize);
147147
#endif
148148
if (op == NULL)
149-
return (varobject *)PyErr_NoMemory();
149+
return (PyVarObject *)PyErr_NoMemory();
150150
op->ob_type = tp;
151151
op->ob_size = size;
152152
_Py_NewReference(op);

0 commit comments

Comments
 (0)