summaryrefslogtreecommitdiffstats
path: root/Include/object.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-08-17 05:42:55 (GMT)
committerGuido van Rossum <guido@python.org>2006-08-17 05:42:55 (GMT)
commit50e9fb9e2d6b4b12524116ab775ac6543e4a5332 (patch)
tree96f41e9a6d07a2754fcaceb7b54a7c11f112687f /Include/object.h
parentd033ddf4dc501e0920adec9e193750e515bbd128 (diff)
downloadcpython-50e9fb9e2d6b4b12524116ab775ac6543e4a5332.zip
cpython-50e9fb9e2d6b4b12524116ab775ac6543e4a5332.tar.gz
cpython-50e9fb9e2d6b4b12524116ab775ac6543e4a5332.tar.bz2
Completely get rid of PyClass and PyInstance.
(classobject.[ch] aren't empty yet because they also define PyMethod.) This breaks lots of stuff, notably cPickle. But it's a step in the right direction. I'll clean it up later. (Also a few unrelated changes, e.g. T_NONE to define a "struct member" that is always None, and simplification of __hash__ -- these are unfinished.)
Diffstat (limited to 'Include/object.h')
-rw-r--r--Include/object.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/Include/object.h b/Include/object.h
index f8484ba..a9a880a 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -147,7 +147,7 @@ typedef int (*visitproc)(PyObject *, void *);
typedef int (*traverseproc)(PyObject *, visitproc, void *);
typedef struct {
- /* Number implementations should check *both*
+ /* Number implementations must check *both*
arguments for proper type and implement the necessary conversions
in the slot functions themselves. */
@@ -173,7 +173,7 @@ typedef struct {
unaryfunc nb_float;
unaryfunc nb_oct;
unaryfunc nb_hex;
- /* Added in release 2.0 */
+
binaryfunc nb_inplace_add;
binaryfunc nb_inplace_subtract;
binaryfunc nb_inplace_multiply;
@@ -185,13 +185,11 @@ typedef struct {
binaryfunc nb_inplace_xor;
binaryfunc nb_inplace_or;
- /* Added in release 2.2 */
binaryfunc nb_floor_divide;
binaryfunc nb_true_divide;
binaryfunc nb_inplace_floor_divide;
binaryfunc nb_inplace_true_divide;
- /* Added in release 2.5 */
lenfunc nb_index;
} PyNumberMethods;
@@ -204,7 +202,7 @@ typedef struct {
ssizeobjargproc sq_ass_item;
ssizessizeobjargproc sq_ass_slice;
objobjproc sq_contains;
- /* Added in release 2.0 */
+
binaryfunc sq_inplace_concat;
ssizeargfunc sq_inplace_repeat;
} PySequenceMethods;
@@ -292,7 +290,6 @@ typedef struct _typeobject {
/* weak reference enabler */
Py_ssize_t tp_weaklistoffset;
- /* Added in release 2.2 */
/* Iterators */
getiterfunc tp_iter;
iternextfunc tp_iternext;