| 
									
										
										
										
											2007-11-27 10:40:20 +00:00
										 |  |  | /* Former class object interface -- now only bound methods are here  */ | 
					
						
							| 
									
										
										
										
											1990-10-14 12:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1993-05-21 19:56:10 +00:00
										 |  |  | /* Revealing some structures (not for general use) */ | 
					
						
							| 
									
										
										
										
											1990-10-14 12:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-12-03 20:14:31 +00:00
										 |  |  | #ifndef Py_LIMITED_API
 | 
					
						
							| 
									
										
										
										
											2000-07-09 00:20:36 +00:00
										 |  |  | #ifndef Py_CLASSOBJECT_H
 | 
					
						
							|  |  |  | #define Py_CLASSOBJECT_H
 | 
					
						
							|  |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  | extern "C" { | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1998-07-10 15:46:33 +00:00
										 |  |  | typedef struct { | 
					
						
							| 
									
										
										
										
											2000-07-09 00:20:36 +00:00
										 |  |  |     PyObject_HEAD | 
					
						
							|  |  |  |     PyObject *im_func;   /* The callable object implementing the method */ | 
					
						
							| 
									
										
										
										
											2007-11-27 10:40:20 +00:00
										 |  |  |     PyObject *im_self;   /* The instance it is bound to */ | 
					
						
							| 
									
										
										
										
											2001-03-23 04:17:58 +00:00
										 |  |  |     PyObject *im_weakreflist; /* List of weak references */ | 
					
						
							| 
									
										
										
										
											2019-05-29 20:31:52 +02:00
										 |  |  |     vectorcallfunc vectorcall; | 
					
						
							| 
									
										
										
										
											1998-07-10 15:46:33 +00:00
										 |  |  | } PyMethodObject; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-08-17 05:42:55 +00:00
										 |  |  | PyAPI_DATA(PyTypeObject) PyMethod_Type; | 
					
						
							| 
									
										
										
										
											1990-10-14 12:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1995-01-12 11:45:45 +00:00
										 |  |  | #define PyMethod_Check(op) ((op)->ob_type == &PyMethod_Type)
 | 
					
						
							| 
									
										
										
										
											1990-10-14 12:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-11-27 10:40:20 +00:00
										 |  |  | PyAPI_FUNC(PyObject *) PyMethod_New(PyObject *, PyObject *); | 
					
						
							| 
									
										
										
										
											1990-10-14 12:07:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-08-12 07:21:58 +00:00
										 |  |  | PyAPI_FUNC(PyObject *) PyMethod_Function(PyObject *); | 
					
						
							|  |  |  | PyAPI_FUNC(PyObject *) PyMethod_Self(PyObject *); | 
					
						
							| 
									
										
										
										
											2001-09-05 22:52:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1998-07-10 15:46:33 +00:00
										 |  |  | /* Macros for direct access to these values. Type checks are *not*
 | 
					
						
							|  |  |  |    done, so use with care. */ | 
					
						
							|  |  |  | #define PyMethod_GET_FUNCTION(meth) \
 | 
					
						
							|  |  |  |         (((PyMethodObject *)meth) -> im_func) | 
					
						
							|  |  |  | #define PyMethod_GET_SELF(meth) \
 | 
					
						
							| 
									
										
										
										
											2017-11-28 17:56:10 +02:00
										 |  |  |         (((PyMethodObject *)meth) -> im_self) | 
					
						
							| 
									
										
										
										
											1998-07-10 15:46:33 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-12-11 19:56:40 +00:00
										 |  |  | typedef struct { | 
					
						
							| 
									
										
										
										
											2017-11-28 17:56:10 +02:00
										 |  |  |     PyObject_HEAD | 
					
						
							|  |  |  |     PyObject *func; | 
					
						
							| 
									
										
										
										
											2007-12-11 19:56:40 +00:00
										 |  |  | } PyInstanceMethodObject; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | PyAPI_DATA(PyTypeObject) PyInstanceMethod_Type; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define PyInstanceMethod_Check(op) ((op)->ob_type == &PyInstanceMethod_Type)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | PyAPI_FUNC(PyObject *) PyInstanceMethod_New(PyObject *); | 
					
						
							|  |  |  | PyAPI_FUNC(PyObject *) PyInstanceMethod_Function(PyObject *); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* Macros for direct access to these values. Type checks are *not*
 | 
					
						
							|  |  |  |    done, so use with care. */ | 
					
						
							|  |  |  | #define PyInstanceMethod_GET_FUNCTION(meth) \
 | 
					
						
							|  |  |  |         (((PyInstanceMethodObject *)meth) -> func) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1993-07-28 09:05:47 +00:00
										 |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | #endif /* !Py_CLASSOBJECT_H */
 | 
					
						
							| 
									
										
										
										
											2010-12-03 20:14:31 +00:00
										 |  |  | #endif /* Py_LIMITED_API */
 |