summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Include/cpython/methodobject.h
diff options
context:
space:
mode:
authorAlexSm <[email protected]>2024-03-05 10:40:59 +0100
committerGitHub <[email protected]>2024-03-05 12:40:59 +0300
commit1ac13c847b5358faba44dbb638a828e24369467b (patch)
tree07672b4dd3604ad3dee540a02c6494cb7d10dc3d /contrib/tools/python3/src/Include/cpython/methodobject.h
parentffcca3e7f7958ddc6487b91d3df8c01054bd0638 (diff)
Library import 16 (#2433)
Co-authored-by: robot-piglet <[email protected]> Co-authored-by: deshevoy <[email protected]> Co-authored-by: robot-contrib <[email protected]> Co-authored-by: thegeorg <[email protected]> Co-authored-by: robot-ya-builder <[email protected]> Co-authored-by: svidyuk <[email protected]> Co-authored-by: shadchin <[email protected]> Co-authored-by: robot-ratatosk <[email protected]> Co-authored-by: innokentii <[email protected]> Co-authored-by: arkady-e1ppa <[email protected]> Co-authored-by: snermolaev <[email protected]> Co-authored-by: dimdim11 <[email protected]> Co-authored-by: kickbutt <[email protected]> Co-authored-by: abdullinsaid <[email protected]> Co-authored-by: korsunandrei <[email protected]> Co-authored-by: petrk <[email protected]> Co-authored-by: miroslav2 <[email protected]> Co-authored-by: serjflint <[email protected]> Co-authored-by: akhropov <[email protected]> Co-authored-by: prettyboy <[email protected]> Co-authored-by: ilikepugs <[email protected]> Co-authored-by: hiddenpath <[email protected]> Co-authored-by: mikhnenko <[email protected]> Co-authored-by: spreis <[email protected]> Co-authored-by: andreyshspb <[email protected]> Co-authored-by: dimaandreev <[email protected]> Co-authored-by: rashid <[email protected]> Co-authored-by: robot-ydb-importer <[email protected]> Co-authored-by: r-vetrov <[email protected]> Co-authored-by: ypodlesov <[email protected]> Co-authored-by: zaverden <[email protected]> Co-authored-by: vpozdyayev <[email protected]> Co-authored-by: robot-cozmo <[email protected]> Co-authored-by: v-korovin <[email protected]> Co-authored-by: arikon <[email protected]> Co-authored-by: khoden <[email protected]> Co-authored-by: psydmm <[email protected]> Co-authored-by: robot-javacom <[email protected]> Co-authored-by: dtorilov <[email protected]> Co-authored-by: sennikovmv <[email protected]> Co-authored-by: hcpp <[email protected]>
Diffstat (limited to 'contrib/tools/python3/src/Include/cpython/methodobject.h')
-rw-r--r--contrib/tools/python3/src/Include/cpython/methodobject.h66
1 files changed, 0 insertions, 66 deletions
diff --git a/contrib/tools/python3/src/Include/cpython/methodobject.h b/contrib/tools/python3/src/Include/cpython/methodobject.h
deleted file mode 100644
index d541e154948..00000000000
--- a/contrib/tools/python3/src/Include/cpython/methodobject.h
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifndef Py_CPYTHON_METHODOBJECT_H
-# error "this header file must not be included directly"
-#endif
-
-// PyCFunctionObject structure
-
-typedef struct {
- PyObject_HEAD
- PyMethodDef *m_ml; /* Description of the C function to call */
- PyObject *m_self; /* Passed as 'self' arg to the C func, can be NULL */
- PyObject *m_module; /* The __module__ attribute, can be anything */
- PyObject *m_weakreflist; /* List of weak references */
- vectorcallfunc vectorcall;
-} PyCFunctionObject;
-
-#define _PyCFunctionObject_CAST(func) \
- (assert(PyCFunction_Check(func)), \
- _Py_CAST(PyCFunctionObject*, (func)))
-
-
-// PyCMethodObject structure
-
-typedef struct {
- PyCFunctionObject func;
- PyTypeObject *mm_class; /* Class that defines this method */
-} PyCMethodObject;
-
-#define _PyCMethodObject_CAST(func) \
- (assert(PyCMethod_Check(func)), \
- _Py_CAST(PyCMethodObject*, (func)))
-
-PyAPI_DATA(PyTypeObject) PyCMethod_Type;
-
-#define PyCMethod_CheckExact(op) Py_IS_TYPE((op), &PyCMethod_Type)
-#define PyCMethod_Check(op) PyObject_TypeCheck((op), &PyCMethod_Type)
-
-
-/* Static inline functions for direct access to these values.
- Type checks are *not* done, so use with care. */
-static inline PyCFunction PyCFunction_GET_FUNCTION(PyObject *func) {
- return _PyCFunctionObject_CAST(func)->m_ml->ml_meth;
-}
-#define PyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(_PyObject_CAST(func))
-
-static inline PyObject* PyCFunction_GET_SELF(PyObject *func_obj) {
- PyCFunctionObject *func = _PyCFunctionObject_CAST(func_obj);
- if (func->m_ml->ml_flags & METH_STATIC) {
- return _Py_NULL;
- }
- return func->m_self;
-}
-#define PyCFunction_GET_SELF(func) PyCFunction_GET_SELF(_PyObject_CAST(func))
-
-static inline int PyCFunction_GET_FLAGS(PyObject *func) {
- return _PyCFunctionObject_CAST(func)->m_ml->ml_flags;
-}
-#define PyCFunction_GET_FLAGS(func) PyCFunction_GET_FLAGS(_PyObject_CAST(func))
-
-static inline PyTypeObject* PyCFunction_GET_CLASS(PyObject *func_obj) {
- PyCFunctionObject *func = _PyCFunctionObject_CAST(func_obj);
- if (func->m_ml->ml_flags & METH_METHOD) {
- return _PyCMethodObject_CAST(func)->mm_class;
- }
- return _Py_NULL;
-}
-#define PyCFunction_GET_CLASS(func) PyCFunction_GET_CLASS(_PyObject_CAST(func))