numpy  2.0.0
include/numpy/npy_3kcompat.h File Reference
#include <Python.h>
#include <stdio.h>
#include "numpy/npy_common.h"
#include "numpy/ndarrayobject.h"

Go to the source code of this file.

Defines

#define NpySlice_GetIndicesEx(op, nop, start, end, step, slicelength)   PySlice_GetIndicesEx((PySliceObject *)op, nop, start, end, step, slicelength)
#define PyBytes_Type   PyString_Type
#define PyBytes_Check   PyString_Check
#define PyBytesObject   PyStringObject
#define PyBytes_FromString   PyString_FromString
#define PyBytes_FromStringAndSize   PyString_FromStringAndSize
#define PyBytes_AS_STRING   PyString_AS_STRING
#define PyBytes_AsStringAndSize   PyString_AsStringAndSize
#define PyBytes_FromFormat   PyString_FromFormat
#define PyBytes_Concat   PyString_Concat
#define PyBytes_ConcatAndDel   PyString_ConcatAndDel
#define PyBytes_AsString   PyString_AsString
#define PyBytes_GET_SIZE   PyString_GET_SIZE
#define PyBytes_Size   PyString_Size
#define PyUString_Type   PyString_Type
#define PyUString_Check   PyString_Check
#define PyUStringObject   PyStringObject
#define PyUString_FromString   PyString_FromString
#define PyUString_FromStringAndSize   PyString_FromStringAndSize
#define PyUString_FromFormat   PyString_FromFormat
#define PyUString_Concat   PyString_Concat
#define PyUString_ConcatAndDel   PyString_ConcatAndDel
#define PyUString_GET_SIZE   PyString_GET_SIZE
#define PyUString_Size   PyString_Size
#define PyUString_InternFromString   PyString_InternFromString
#define PyUString_Format   PyString_Format
#define npy_PyFile_Check   PyFile_Check

Functions

static NPY_INLINE void PyUnicode_ConcatAndDel (PyObject **left, PyObject *right)
static NPY_INLINE void PyUnicode_Concat2 (PyObject **left, PyObject *right)
static NPY_INLINE FILE * npy_PyFile_Dup2 (PyObject *file, const char *NPY_UNUSED(mode), npy_off_t *NPY_UNUSED(orig_pos))
static NPY_INLINE int npy_PyFile_DupClose2 (PyObject *NPY_UNUSED(file), FILE *NPY_UNUSED(handle), npy_off_t NPY_UNUSED(orig_pos))
static NPY_INLINE PyObject * npy_PyFile_OpenFile (PyObject *filename, const char *mode)
static NPY_INLINE int npy_PyFile_CloseFile (PyObject *file)
static NPY_INLINE PyObject * NpyCapsule_FromVoidPtr (void *ptr, void(*dtor)(void *))
static NPY_INLINE PyObject * NpyCapsule_FromVoidPtrAndDesc (void *ptr, void *context, void(*dtor)(void *, void *))
static NPY_INLINE void * NpyCapsule_AsVoidPtr (PyObject *ptr)
static NPY_INLINE void * NpyCapsule_GetDesc (PyObject *obj)
static NPY_INLINE int NpyCapsule_Check (PyObject *ptr)

Define Documentation

#define npy_PyFile_Check   PyFile_Check
#define NpySlice_GetIndicesEx (   op,
  nop,
  start,
  end,
  step,
  slicelength 
)    PySlice_GetIndicesEx((PySliceObject *)op, nop, start, end, step, slicelength)
PyInt -> PyLong

<

NPY_PY3K
Py3 changes PySlice_GetIndicesEx' first argument's type to PyObject*

Referenced by parse_index_entry().

#define PyBytes_AS_STRING   PyString_AS_STRING
#define PyBytes_AsString   PyString_AsString
#define PyBytes_Check   PyString_Check
#define PyBytes_Concat   PyString_Concat
#define PyBytes_ConcatAndDel   PyString_ConcatAndDel
#define PyBytes_FromFormat   PyString_FromFormat
#define PyBytes_FromString   PyString_FromString
#define PyBytes_FromStringAndSize   PyString_FromStringAndSize
#define PyBytes_GET_SIZE   PyString_GET_SIZE

Referenced by voidtype_length().

#define PyBytes_Size   PyString_Size
#define PyBytes_Type   PyString_Type
PyString -> PyBytes
#define PyBytesObject   PyStringObject
#define PyUString_Check   PyString_Check
#define PyUString_Concat   PyString_Concat
#define PyUString_Format   PyString_Format
NPY_PY3K

Referenced by _IsWriteable().

#define PyUString_FromStringAndSize   PyString_FromStringAndSize
#define PyUString_GET_SIZE   PyString_GET_SIZE
#define PyUString_InternFromString   PyString_InternFromString
#define PyUString_Size   PyString_Size
#define PyUString_Type   PyString_Type
#define PyUStringObject   PyStringObject

Function Documentation

static NPY_INLINE int npy_PyFile_CloseFile ( PyObject *  file) [static]
static NPY_INLINE FILE* npy_PyFile_Dup2 ( PyObject *  file,
const char *  NPY_UNUSEDmode,
npy_off_t NPY_UNUSEDorig_pos 
) [static]
PyFile_* compatibility
static NPY_INLINE int npy_PyFile_DupClose2 ( PyObject *  NPY_UNUSEDfile,
FILE *  NPY_UNUSEDhandle,
npy_off_t   NPY_UNUSEDorig_pos 
) [static]
static NPY_INLINE PyObject* npy_PyFile_OpenFile ( PyObject *  filename,
const char *  mode 
) [static]
static NPY_INLINE void* NpyCapsule_AsVoidPtr ( PyObject *  ptr) [static]
static NPY_INLINE int NpyCapsule_Check ( PyObject *  ptr) [static]
_NPY_3KCOMPAT_H_
static NPY_INLINE PyObject* NpyCapsule_FromVoidPtr ( void *  ptr,
void(*)(void *)  dtor 
) [static]
PyObject_Cmp
PyCObject functions adapted to PyCapsules.
The main job here is to get rid of the improved error handling of PyCapsules. It's a shame...
static NPY_INLINE PyObject* NpyCapsule_FromVoidPtrAndDesc ( void *  ptr,
void *  context,
void(*)(void *, void *)  dtor 
) [static]
static NPY_INLINE void* NpyCapsule_GetDesc ( PyObject *  obj) [static]
static NPY_INLINE void PyUnicode_Concat2 ( PyObject **  left,
PyObject *  right 
) [static]

References npy_fseek, npy_ftell, and npy_off_t.

static NPY_INLINE void PyUnicode_ConcatAndDel ( PyObject **  left,
PyObject *  right 
) [static]