addet SETTUPLEITEM and added cast to GETTUPLEITEM
This commit is contained in:
parent
65bc7a7bf2
commit
599de5ab9f
|
@ -253,6 +253,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#define newdictobject PyDict_New
|
#define newdictobject PyDict_New
|
||||||
#define gettupleitem PyTuple_GetItem
|
#define gettupleitem PyTuple_GetItem
|
||||||
#define GETTUPLEITEM PyTuple_GET_ITEM
|
#define GETTUPLEITEM PyTuple_GET_ITEM
|
||||||
|
#define SETTUPLEITEM PyTuple_SET_ITEM
|
||||||
#define gettuplesize PyTuple_Size
|
#define gettuplesize PyTuple_Size
|
||||||
#define gettupleslice PyTuple_GetSlice
|
#define gettupleslice PyTuple_GetSlice
|
||||||
#define newtupleobject PyTuple_New
|
#define newtupleobject PyTuple_New
|
||||||
|
|
|
@ -61,7 +61,10 @@ extern PyObject *PyTuple_GetSlice Py_PROTO((PyObject *, int, int));
|
||||||
extern int _PyTuple_Resize Py_PROTO((PyObject **, int, int));
|
extern int _PyTuple_Resize Py_PROTO((PyObject **, int, int));
|
||||||
|
|
||||||
/* Macro, trading safety for speed */
|
/* Macro, trading safety for speed */
|
||||||
#define PyTuple_GET_ITEM(op, i) ((op)->ob_item[i])
|
#define PyTuple_GET_ITEM(op, i) (((PyTupleObject *)(op))->ob_item[i])
|
||||||
|
|
||||||
|
/* Macro, *only* to be used to fill in brand new tuples */
|
||||||
|
#define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue