Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: third_party/cython/src/Cython/Includes/cpython/method.pxd

Issue 385073004: Adding cython v0.20.2 in third-party. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reference cython dev list thread. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/cython/src/Cython/Includes/cpython/method.pxd
diff --git a/third_party/cython/src/Cython/Includes/cpython/method.pxd b/third_party/cython/src/Cython/Includes/cpython/method.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..bc09416422b6a0194828390de339e8c1d311229b
--- /dev/null
+++ b/third_party/cython/src/Cython/Includes/cpython/method.pxd
@@ -0,0 +1,48 @@
+cdef extern from "Python.h":
+ ctypedef void PyObject
+ ############################################################################
+ # 7.5.4 Method Objects
+ ############################################################################
+
+ # There are some useful functions that are useful for working with method objects.
+ # PyTypeObject PyMethod_Type
+ # This instance of PyTypeObject represents the Python method type. This is exposed to Python programs as types.MethodType.
+
+ bint PyMethod_Check(object o)
+ # Return true if o is a method object (has type
+ # PyMethod_Type). The parameter must not be NULL.
+
+ object PyMethod_New(object func, object self, object cls)
+ # Return value: New reference.
+ # Return a new method object, with func being any callable object;
+ # this is the function that will be called when the method is
+ # called. If this method should be bound to an instance, self
+ # should be the instance and class should be the class of self,
+ # otherwise self should be NULL and class should be the class
+ # which provides the unbound method..
+
+ PyObject* PyMethod_Class(object meth) except NULL
+ # Return value: Borrowed reference.
+ # Return the class object from which the method meth was created;
+ # if this was created from an instance, it will be the class of
+ # the instance.
+
+ PyObject* PyMethod_GET_CLASS(object meth)
+ # Return value: Borrowed reference.
+ # Macro version of PyMethod_Class() which avoids error checking.
+
+ PyObject* PyMethod_Function(object meth) except NULL
+ # Return value: Borrowed reference.
+ # Return the function object associated with the method meth.
+
+ PyObject* PyMethod_GET_FUNCTION(object meth)
+ # Return value: Borrowed reference.
+ # Macro version of PyMethod_Function() which avoids error checking.
+
+ PyObject* PyMethod_Self(object meth) except? NULL
+ # Return value: Borrowed reference.
+ # Return the instance associated with the method meth if it is bound, otherwise return NULL.
+
+ PyObject* PyMethod_GET_SELF(object meth)
+ # Return value: Borrowed reference.
+ # Macro version of PyMethod_Self() which avoids error checking.
« no previous file with comments | « third_party/cython/src/Cython/Includes/cpython/mem.pxd ('k') | third_party/cython/src/Cython/Includes/cpython/module.pxd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698