summaryrefslogtreecommitdiff
path: root/Objects/typeobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1990-12-20 15:06:42 +0000
committerGuido van Rossum <guido@python.org>1990-12-20 15:06:42 +0000
commit3f5da24ea304e674a9abbdcffc4d671e32aa70f1 (patch)
treee932e31cb9381f40b7c87c377638216c043b5cfc /Objects/typeobject.c
parent226d79eb4a776dd54c9e4544b17deaf928bcef3a (diff)
downloadcpython-git-3f5da24ea304e674a9abbdcffc4d671e32aa70f1.tar.gz
"Compiling" version
Diffstat (limited to 'Objects/typeobject.c')
-rw-r--r--Objects/typeobject.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index f7acaad123..f80c518162 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -1,16 +1,11 @@
/* Type object implementation */
-#include <stdio.h>
-
-#include "PROTO.h"
-#include "object.h"
-#include "stringobject.h"
-#include "objimpl.h"
+#include "allobjects.h"
/* Type object implementation */
static void
-typeprint(v, fp, flags)
+type_print(v, fp, flags)
typeobject *v;
FILE *fp;
int flags;
@@ -19,7 +14,7 @@ typeprint(v, fp, flags)
}
static object *
-typerepr(v)
+type_repr(v)
typeobject *v;
{
char buf[100];
@@ -27,21 +22,16 @@ typerepr(v)
return newstringobject(buf);
}
-typedef struct {
- OB_HEAD
- long ob_ival;
-} intobject;
-
typeobject Typetype = {
OB_HEAD_INIT(&Typetype)
0, /* Number of items for varobject */
"type", /* Name of this type */
sizeof(typeobject), /* Basic object size */
0, /* Item size for varobject */
- 0, /*tp_dealloc*/
- typeprint, /*tp_print*/
- 0, /*tp_getattr*/
- 0, /*tp_setattr*/
- 0, /*tp_compare*/
- typerepr, /*tp_repr*/
+ 0, /*tp_dealloc*/
+ type_print, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ 0, /*tp_compare*/
+ type_repr, /*tp_repr*/
};