Don't reference removed files in Makefile
[python/dscho.git] / Include / classobject.h
blobf87d02e8722eaee98dca5140d97dac0e0965a40a
1 #ifndef Py_CLASSOBJECT_H
2 #define Py_CLASSOBJECT_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
7 /***********************************************************
8 Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
9 The Netherlands.
11 All Rights Reserved
13 Permission to use, copy, modify, and distribute this software and its
14 documentation for any purpose and without fee is hereby granted,
15 provided that the above copyright notice appear in all copies and that
16 both that copyright notice and this permission notice appear in
17 supporting documentation, and that the names of Stichting Mathematisch
18 Centrum or CWI not be used in advertising or publicity pertaining to
19 distribution of the software without specific, written prior permission.
21 STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
22 THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
23 FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
24 FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
25 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
26 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
27 OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
29 ******************************************************************/
31 /* Class object interface */
33 #ifdef WITH_THREAD
34 #include "thread.h"
35 #else
36 #define get_thread_ident() 1L
37 #endif
39 /* Revealing some structures (not for general use) */
41 typedef struct {
42 PyObject_HEAD
43 PyObject *cl_bases; /* A tuple of class objects */
44 PyObject *cl_dict; /* A dictionary */
45 PyObject *cl_name; /* A string */
46 /* The following three are functions or NULL */
47 PyObject *cl_getattr;
48 PyObject *cl_setattr;
49 PyObject *cl_delattr;
50 } PyClassObject;
52 typedef struct {
53 PyObject_HEAD
54 PyClassObject *in_class; /* The class object */
55 PyObject *in_dict; /* A dictionary */
56 } PyInstanceObject;
58 extern DL_IMPORT(PyTypeObject) PyClass_Type, PyInstance_Type, PyMethod_Type;
60 #define PyClass_Check(op) ((op)->ob_type == &PyClass_Type)
61 #define PyInstance_Check(op) ((op)->ob_type == &PyInstance_Type)
62 #define PyMethod_Check(op) ((op)->ob_type == &PyMethod_Type)
64 extern PyObject *PyClass_New Py_PROTO((PyObject *, PyObject *, PyObject *));
65 extern PyObject *PyInstance_New Py_PROTO((PyObject *, PyObject *));
66 extern PyObject *PyMethod_New Py_PROTO((PyObject *, PyObject *, PyObject *));
68 extern PyObject *PyMethod_Function Py_PROTO((PyObject *));
69 extern PyObject *PyMethod_Self Py_PROTO((PyObject *));
70 extern PyObject *PyMethod_Class Py_PROTO((PyObject *));
72 extern int PyClass_IsSubclass Py_PROTO((PyObject *, PyObject *));
74 extern PyObject *PyInstance_DoBinOp
75 Py_PROTO((PyObject *, PyObject *,
76 char *, char *,
77 PyObject * (*) Py_PROTO((PyObject *, PyObject *)) ));
79 #ifdef __cplusplus
81 #endif
82 #endif /* !Py_CLASSOBJECT_H */