Commit d4536e4f authored by Robert Bradshaw's avatar Robert Bradshaw Committed by GitHub

Merge pull request #1779 from jdemeyer/PyObject_GenericGetAttr

Add declarations for PyObject_GenericGetAttr and PyObject_GenericSetAttr
parents 2a547fc9 e1255baa
...@@ -102,6 +102,8 @@ cdef extern from "Python.h": ...@@ -102,6 +102,8 @@ cdef extern from "Python.h":
# or NULL on failure. This is the equivalent of the Python # or NULL on failure. This is the equivalent of the Python
# expression "o.attr_name". # expression "o.attr_name".
object PyObject_GenericGetAttr(object o, object attr_name)
int PyObject_SetAttrString(object o, char *attr_name, object v) except -1 int PyObject_SetAttrString(object o, char *attr_name, object v) except -1
# Set the value of the attribute named attr_name, for object o, to # Set the value of the attribute named attr_name, for object o, to
# the value v. Returns -1 on failure. This is the equivalent of # the value v. Returns -1 on failure. This is the equivalent of
...@@ -112,6 +114,8 @@ cdef extern from "Python.h": ...@@ -112,6 +114,8 @@ cdef extern from "Python.h":
# the value v. Returns -1 on failure. This is the equivalent of # the value v. Returns -1 on failure. This is the equivalent of
# the Python statement "o.attr_name = v". # the Python statement "o.attr_name = v".
int PyObject_GenericSetAttr(object o, object attr_name, object v) except -1
int PyObject_DelAttrString(object o, char *attr_name) except -1 int PyObject_DelAttrString(object o, char *attr_name) except -1
# Delete attribute named attr_name, for object o. Returns -1 on # Delete attribute named attr_name, for object o. Returns -1 on
# failure. This is the equivalent of the Python statement: "del # failure. This is the equivalent of the Python statement: "del
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment