Former-commit-id:133dc97f67
[formerlya02aeb236c
] [formerly9f19e3f712
] [formerly06a8b51d6d
[formerly9f19e3f712
[formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f]]] Former-commit-id:06a8b51d6d
Former-commit-id:377dcd10b9
[formerly3360eb6c5f
] Former-commit-id:8e80217e59
4744 lines
180 KiB
C
Executable file
4744 lines
180 KiB
C
Executable file
/* Generated by Cython 0.12 on Sun Mar 14 21:50:43 2010 */
|
|
|
|
#define PY_SSIZE_T_CLEAN
|
|
#include "Python.h"
|
|
#include "structmember.h"
|
|
#ifndef Py_PYTHON_H
|
|
#error Python headers needed to compile C extensions, please install development version of Python.
|
|
#else
|
|
#ifndef PY_LONG_LONG
|
|
#define PY_LONG_LONG LONG_LONG
|
|
#endif
|
|
#ifndef DL_EXPORT
|
|
#define DL_EXPORT(t) t
|
|
#endif
|
|
#if PY_VERSION_HEX < 0x02040000
|
|
#define METH_COEXIST 0
|
|
#define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
|
|
#define PyDict_Contains(d,o) PySequence_Contains(d,o)
|
|
#endif
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
typedef int Py_ssize_t;
|
|
#define PY_SSIZE_T_MAX INT_MAX
|
|
#define PY_SSIZE_T_MIN INT_MIN
|
|
#define PY_FORMAT_SIZE_T ""
|
|
#define PyInt_FromSsize_t(z) PyInt_FromLong(z)
|
|
#define PyInt_AsSsize_t(o) PyInt_AsLong(o)
|
|
#define PyNumber_Index(o) PyNumber_Int(o)
|
|
#define PyIndex_Check(o) PyNumber_Check(o)
|
|
#endif
|
|
#if PY_VERSION_HEX < 0x02060000
|
|
#define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
|
|
#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
|
|
#define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size)
|
|
#define PyVarObject_HEAD_INIT(type, size) \
|
|
PyObject_HEAD_INIT(type) size,
|
|
#define PyType_Modified(t)
|
|
|
|
typedef struct {
|
|
void *buf;
|
|
PyObject *obj;
|
|
Py_ssize_t len;
|
|
Py_ssize_t itemsize;
|
|
int readonly;
|
|
int ndim;
|
|
char *format;
|
|
Py_ssize_t *shape;
|
|
Py_ssize_t *strides;
|
|
Py_ssize_t *suboffsets;
|
|
void *internal;
|
|
} Py_buffer;
|
|
|
|
#define PyBUF_SIMPLE 0
|
|
#define PyBUF_WRITABLE 0x0001
|
|
#define PyBUF_FORMAT 0x0004
|
|
#define PyBUF_ND 0x0008
|
|
#define PyBUF_STRIDES (0x0010 | PyBUF_ND)
|
|
#define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
|
|
#define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
|
|
#define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
|
|
#define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
|
|
|
|
#endif
|
|
#if PY_MAJOR_VERSION < 3
|
|
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
|
|
#else
|
|
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
#define Py_TPFLAGS_CHECKTYPES 0
|
|
#define Py_TPFLAGS_HAVE_INDEX 0
|
|
#endif
|
|
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
|
|
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
#define PyBaseString_Type PyUnicode_Type
|
|
#define PyString_Type PyUnicode_Type
|
|
#define PyString_CheckExact PyUnicode_CheckExact
|
|
#else
|
|
#define PyBytes_Type PyString_Type
|
|
#define PyBytes_CheckExact PyString_CheckExact
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
#define PyInt_Type PyLong_Type
|
|
#define PyInt_Check(op) PyLong_Check(op)
|
|
#define PyInt_CheckExact(op) PyLong_CheckExact(op)
|
|
#define PyInt_FromString PyLong_FromString
|
|
#define PyInt_FromUnicode PyLong_FromUnicode
|
|
#define PyInt_FromLong PyLong_FromLong
|
|
#define PyInt_FromSize_t PyLong_FromSize_t
|
|
#define PyInt_FromSsize_t PyLong_FromSsize_t
|
|
#define PyInt_AsLong PyLong_AsLong
|
|
#define PyInt_AS_LONG PyLong_AS_LONG
|
|
#define PyInt_AsSsize_t PyLong_AsSsize_t
|
|
#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
|
|
#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
|
|
#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
|
|
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
|
|
#else
|
|
#define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
|
|
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
#define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
|
|
#endif
|
|
#if !defined(WIN32) && !defined(MS_WINDOWS)
|
|
#ifndef __stdcall
|
|
#define __stdcall
|
|
#endif
|
|
#ifndef __cdecl
|
|
#define __cdecl
|
|
#endif
|
|
#ifndef __fastcall
|
|
#define __fastcall
|
|
#endif
|
|
#else
|
|
#define _USE_MATH_DEFINES
|
|
#endif
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
#define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n)))
|
|
#define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
|
|
#define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n)))
|
|
#else
|
|
#define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n))
|
|
#define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
|
|
#define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n))
|
|
#endif
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
#define __Pyx_NAMESTR(n) ((char *)(n))
|
|
#define __Pyx_DOCSTR(n) ((char *)(n))
|
|
#else
|
|
#define __Pyx_NAMESTR(n) (n)
|
|
#define __Pyx_DOCSTR(n) (n)
|
|
#endif
|
|
#ifdef __cplusplus
|
|
#define __PYX_EXTERN_C extern "C"
|
|
#else
|
|
#define __PYX_EXTERN_C extern
|
|
#endif
|
|
#include <math.h>
|
|
#define __PYX_HAVE_API__h5py___conv
|
|
#include "stdlib.h"
|
|
#include "string.h"
|
|
#include "time.h"
|
|
#include "unistd.h"
|
|
#include "stdint.h"
|
|
#include "compat.h"
|
|
#include "lzf_filter.h"
|
|
#include "hdf5.h"
|
|
|
|
#ifdef __GNUC__
|
|
#define INLINE __inline__
|
|
#elif _WIN32
|
|
#define INLINE __inline
|
|
#else
|
|
#define INLINE
|
|
#endif
|
|
|
|
typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
|
|
|
|
|
|
/* Type Conversion Predeclarations */
|
|
|
|
#if PY_MAJOR_VERSION < 3
|
|
#define __Pyx_PyBytes_FromString PyString_FromString
|
|
#define __Pyx_PyBytes_FromStringAndSize PyString_FromStringAndSize
|
|
#define __Pyx_PyBytes_AsString PyString_AsString
|
|
#else
|
|
#define __Pyx_PyBytes_FromString PyBytes_FromString
|
|
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
|
|
#define __Pyx_PyBytes_AsString PyBytes_AsString
|
|
#endif
|
|
|
|
#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s)
|
|
#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) __Pyx_PyBytes_AsString(s))
|
|
|
|
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
|
|
static INLINE int __Pyx_PyObject_IsTrue(PyObject*);
|
|
static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
|
|
|
|
#if !defined(T_PYSSIZET)
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
#define T_PYSSIZET T_INT
|
|
#elif !defined(T_LONGLONG)
|
|
#define T_PYSSIZET \
|
|
((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
|
|
((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1))
|
|
#else
|
|
#define T_PYSSIZET \
|
|
((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
|
|
((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : \
|
|
((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))
|
|
#endif
|
|
#endif
|
|
|
|
|
|
#if !defined(T_ULONGLONG)
|
|
#define __Pyx_T_UNSIGNED_INT(x) \
|
|
((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \
|
|
((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
|
|
((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \
|
|
((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : -1))))
|
|
#else
|
|
#define __Pyx_T_UNSIGNED_INT(x) \
|
|
((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \
|
|
((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
|
|
((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \
|
|
((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : \
|
|
((sizeof(x) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))))
|
|
#endif
|
|
#if !defined(T_LONGLONG)
|
|
#define __Pyx_T_SIGNED_INT(x) \
|
|
((sizeof(x) == sizeof(char)) ? T_BYTE : \
|
|
((sizeof(x) == sizeof(short)) ? T_SHORT : \
|
|
((sizeof(x) == sizeof(int)) ? T_INT : \
|
|
((sizeof(x) == sizeof(long)) ? T_LONG : -1))))
|
|
#else
|
|
#define __Pyx_T_SIGNED_INT(x) \
|
|
((sizeof(x) == sizeof(char)) ? T_BYTE : \
|
|
((sizeof(x) == sizeof(short)) ? T_SHORT : \
|
|
((sizeof(x) == sizeof(int)) ? T_INT : \
|
|
((sizeof(x) == sizeof(long)) ? T_LONG : \
|
|
((sizeof(x) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))))
|
|
#endif
|
|
|
|
#define __Pyx_T_FLOATING(x) \
|
|
((sizeof(x) == sizeof(float)) ? T_FLOAT : \
|
|
((sizeof(x) == sizeof(double)) ? T_DOUBLE : -1))
|
|
|
|
#if !defined(T_SIZET)
|
|
#if !defined(T_ULONGLONG)
|
|
#define T_SIZET \
|
|
((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
|
|
((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1))
|
|
#else
|
|
#define T_SIZET \
|
|
((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
|
|
((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : \
|
|
((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))
|
|
#endif
|
|
#endif
|
|
|
|
static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
|
|
static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
|
|
static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
|
|
|
|
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
|
|
|
|
|
|
#ifdef __GNUC__
|
|
/* Test for GCC > 2.95 */
|
|
#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
|
|
#define likely(x) __builtin_expect(!!(x), 1)
|
|
#define unlikely(x) __builtin_expect(!!(x), 0)
|
|
#else /* __GNUC__ > 2 ... */
|
|
#define likely(x) (x)
|
|
#define unlikely(x) (x)
|
|
#endif /* __GNUC__ > 2 ... */
|
|
#else /* __GNUC__ */
|
|
#define likely(x) (x)
|
|
#define unlikely(x) (x)
|
|
#endif /* __GNUC__ */
|
|
|
|
static PyObject *__pyx_m;
|
|
static PyObject *__pyx_b;
|
|
static PyObject *__pyx_empty_tuple;
|
|
static PyObject *__pyx_empty_bytes;
|
|
static int __pyx_lineno;
|
|
static int __pyx_clineno = 0;
|
|
static const char * __pyx_cfilenm= __FILE__;
|
|
static const char *__pyx_filename;
|
|
static const char **__pyx_f;
|
|
|
|
|
|
/* Type declarations */
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/h5r.pxd":20
|
|
* ctypedef unsigned char hdset_reg_ref_t[12]
|
|
*
|
|
* cdef union ref_u: # <<<<<<<<<<<<<<
|
|
* hobj_ref_t obj_ref
|
|
* hdset_reg_ref_t reg_ref
|
|
*/
|
|
|
|
union __pyx_t_4h5py_3h5r_ref_u {
|
|
hobj_ref_t obj_ref;
|
|
hdset_reg_ref_t reg_ref;
|
|
};
|
|
|
|
typedef int (*__pyx_t_4h5py_5_conv_conv_operator_t)(void *, void *, void *, void *);
|
|
|
|
typedef herr_t (*__pyx_t_4h5py_5_conv_init_operator_t)(hid_t, hid_t, void **);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":107
|
|
* # String to VLEN routines
|
|
*
|
|
* ctypedef struct conv_size_t: # <<<<<<<<<<<<<<
|
|
* size_t src_size
|
|
* size_t dst_size
|
|
*/
|
|
|
|
typedef struct {
|
|
size_t src_size;
|
|
size_t dst_size;
|
|
} __pyx_t_4h5py_5_conv_conv_size_t;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":387
|
|
* # Enum to integer converter
|
|
*
|
|
* cdef struct conv_enum_t: # <<<<<<<<<<<<<<
|
|
* size_t src_size
|
|
* size_t dst_size
|
|
*/
|
|
|
|
struct __pyx_t_4h5py_5_conv_conv_enum_t {
|
|
size_t src_size;
|
|
size_t dst_size;
|
|
hid_t supertype;
|
|
int identical;
|
|
};
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/h5r.pxd":24
|
|
* hdset_reg_ref_t reg_ref
|
|
*
|
|
* cdef class Reference: # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef ref_u ref
|
|
*/
|
|
|
|
struct __pyx_obj_4h5py_3h5r_Reference {
|
|
PyObject_HEAD
|
|
union __pyx_t_4h5py_3h5r_ref_u ref;
|
|
int typecode;
|
|
size_t typesize;
|
|
};
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/h5r.pxd":30
|
|
* cdef readonly size_t typesize
|
|
*
|
|
* cdef class RegionReference(Reference): # <<<<<<<<<<<<<<
|
|
*
|
|
* pass
|
|
*/
|
|
|
|
struct __pyx_obj_4h5py_3h5r_RegionReference {
|
|
struct __pyx_obj_4h5py_3h5r_Reference __pyx_base;
|
|
};
|
|
|
|
#ifndef CYTHON_REFNANNY
|
|
#define CYTHON_REFNANNY 0
|
|
#endif
|
|
|
|
#if CYTHON_REFNANNY
|
|
typedef struct {
|
|
void (*INCREF)(void*, PyObject*, int);
|
|
void (*DECREF)(void*, PyObject*, int);
|
|
void (*GOTREF)(void*, PyObject*, int);
|
|
void (*GIVEREF)(void*, PyObject*, int);
|
|
void* (*SetupContext)(const char*, int, const char*);
|
|
void (*FinishContext)(void**);
|
|
} __Pyx_RefNannyAPIStruct;
|
|
static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
|
|
static __Pyx_RefNannyAPIStruct * __Pyx_RefNannyImportAPI(const char *modname) {
|
|
PyObject *m = NULL, *p = NULL;
|
|
void *r = NULL;
|
|
m = PyImport_ImportModule((char *)modname);
|
|
if (!m) goto end;
|
|
p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
|
|
if (!p) goto end;
|
|
r = PyLong_AsVoidPtr(p);
|
|
end:
|
|
Py_XDECREF(p);
|
|
Py_XDECREF(m);
|
|
return (__Pyx_RefNannyAPIStruct *)r;
|
|
}
|
|
#define __Pyx_RefNannySetupContext(name) void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
|
|
#define __Pyx_RefNannyFinishContext() __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
|
|
#define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
|
|
#define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
|
|
#define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
|
|
#define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
|
|
#define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0)
|
|
#else
|
|
#define __Pyx_RefNannySetupContext(name)
|
|
#define __Pyx_RefNannyFinishContext()
|
|
#define __Pyx_INCREF(r) Py_INCREF(r)
|
|
#define __Pyx_DECREF(r) Py_DECREF(r)
|
|
#define __Pyx_GOTREF(r)
|
|
#define __Pyx_GIVEREF(r)
|
|
#define __Pyx_XDECREF(r) Py_XDECREF(r)
|
|
#endif /* CYTHON_REFNANNY */
|
|
#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
|
|
#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)
|
|
|
|
static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
|
|
static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
|
|
|
|
static INLINE PyObject *__Pyx_PyInt_to_py_hid_t(hid_t);
|
|
|
|
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
|
|
|
|
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
|
|
|
|
static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
|
|
|
|
static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
|
|
|
|
static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
|
|
|
|
static INLINE char __Pyx_PyInt_AsChar(PyObject *);
|
|
|
|
static INLINE short __Pyx_PyInt_AsShort(PyObject *);
|
|
|
|
static INLINE int __Pyx_PyInt_AsInt(PyObject *);
|
|
|
|
static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
|
|
|
|
static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
|
|
|
|
static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
|
|
|
|
static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
|
|
|
|
static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
|
|
|
|
static INLINE long __Pyx_PyInt_AsLong(PyObject *);
|
|
|
|
static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
|
|
|
|
static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
|
|
|
|
static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
|
|
|
|
static void __Pyx_WriteUnraisable(const char *name); /*proto*/
|
|
|
|
#ifndef __PYX_FORCE_INIT_THREADS
|
|
#if PY_VERSION_HEX < 0x02040200
|
|
#define __PYX_FORCE_INIT_THREADS 1
|
|
#else
|
|
#define __PYX_FORCE_INIT_THREADS 0
|
|
#endif
|
|
#endif
|
|
|
|
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size); /*proto*/
|
|
|
|
static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
|
|
|
|
static void __Pyx_AddTraceback(const char *funcname); /*proto*/
|
|
|
|
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
|
|
/* Module declarations from h5py.h5r */
|
|
|
|
static PyTypeObject *__pyx_ptype_4h5py_3h5r_Reference = 0;
|
|
static PyTypeObject *__pyx_ptype_4h5py_3h5r_RegionReference = 0;
|
|
/* Module declarations from h5py._conv */
|
|
|
|
static hid_t __pyx_v_4h5py_5_conv_H5PY_OBJ;
|
|
static hid_t __pyx_f_4h5py_5_conv_get_python_obj(int __pyx_skip_dispatch); /*proto*/
|
|
static herr_t __pyx_f_4h5py_5_conv_generic_converter(hid_t, hid_t, H5T_cdata_t *, size_t, size_t, size_t, void *, void *, hid_t, __pyx_t_4h5py_5_conv_conv_operator_t, __pyx_t_4h5py_5_conv_init_operator_t, H5T_bkg_t); /*proto*/
|
|
static herr_t __pyx_f_4h5py_5_conv_init_generic(hid_t, hid_t, void **); /*proto*/
|
|
static int __pyx_f_4h5py_5_conv_conv_vlen2str(void *, void *, void *, void *); /*proto*/
|
|
static int __pyx_f_4h5py_5_conv_conv_str2vlen(void *, void *, void *, void *); /*proto*/
|
|
static herr_t __pyx_f_4h5py_5_conv_init_vlen2fixed(hid_t, hid_t, void **); /*proto*/
|
|
static herr_t __pyx_f_4h5py_5_conv_init_fixed2vlen(hid_t, hid_t, void **); /*proto*/
|
|
static int __pyx_f_4h5py_5_conv_conv_vlen2fixed(void *, void *, void *, void *); /*proto*/
|
|
static int __pyx_f_4h5py_5_conv_conv_fixed2vlen(void *, void *, void *, void *); /*proto*/
|
|
static int __pyx_f_4h5py_5_conv_conv_objref2pyref(void *, void *, void *, void *); /*proto*/
|
|
static int __pyx_f_4h5py_5_conv_conv_pyref2objref(void *, void *, void *, void *); /*proto*/
|
|
static int __pyx_f_4h5py_5_conv_conv_regref2pyref(void *, void *, void *, void *); /*proto*/
|
|
static int __pyx_f_4h5py_5_conv_conv_pyref2regref(void *, void *, void *, void *); /*proto*/
|
|
static herr_t __pyx_f_4h5py_5_conv_vlen2str(hid_t, hid_t, H5T_cdata_t *, size_t, size_t, size_t, void *, void *, hid_t); /*proto*/
|
|
static herr_t __pyx_f_4h5py_5_conv_str2vlen(hid_t, hid_t, H5T_cdata_t *, size_t, size_t, size_t, void *, void *, hid_t); /*proto*/
|
|
static herr_t __pyx_f_4h5py_5_conv_vlen2fixed(hid_t, hid_t, H5T_cdata_t *, size_t, size_t, size_t, void *, void *, hid_t); /*proto*/
|
|
static herr_t __pyx_f_4h5py_5_conv_fixed2vlen(hid_t, hid_t, H5T_cdata_t *, size_t, size_t, size_t, void *, void *, hid_t); /*proto*/
|
|
static herr_t __pyx_f_4h5py_5_conv_objref2pyref(hid_t, hid_t, H5T_cdata_t *, size_t, size_t, size_t, void *, void *, hid_t); /*proto*/
|
|
static herr_t __pyx_f_4h5py_5_conv_pyref2objref(hid_t, hid_t, H5T_cdata_t *, size_t, size_t, size_t, void *, void *, hid_t); /*proto*/
|
|
static herr_t __pyx_f_4h5py_5_conv_regref2pyref(hid_t, hid_t, H5T_cdata_t *, size_t, size_t, size_t, void *, void *, hid_t); /*proto*/
|
|
static herr_t __pyx_f_4h5py_5_conv_pyref2regref(hid_t, hid_t, H5T_cdata_t *, size_t, size_t, size_t, void *, void *, hid_t); /*proto*/
|
|
static herr_t __pyx_f_4h5py_5_conv_enum_int_converter(hid_t, hid_t, H5T_cdata_t *, size_t, size_t, size_t, void *, void *, hid_t, int); /*proto*/
|
|
static herr_t __pyx_f_4h5py_5_conv_enum2int(hid_t, hid_t, H5T_cdata_t *, size_t, size_t, size_t, void *, void *, hid_t); /*proto*/
|
|
static herr_t __pyx_f_4h5py_5_conv_int2enum(hid_t, hid_t, H5T_cdata_t *, size_t, size_t, size_t, void *, void *, hid_t); /*proto*/
|
|
static int __pyx_f_4h5py_5_conv_register_converters(int __pyx_skip_dispatch); /*proto*/
|
|
static int __pyx_f_4h5py_5_conv_unregister_converters(int __pyx_skip_dispatch); /*proto*/
|
|
#define __Pyx_MODULE_NAME "h5py._conv"
|
|
int __pyx_module_is_main_h5py___conv = 0;
|
|
|
|
/* Implementation of h5py._conv */
|
|
static PyObject *__pyx_builtin_ValueError;
|
|
static PyObject *__pyx_builtin_TypeError;
|
|
static PyObject *__pyx_builtin_MemoryError;
|
|
static char __pyx_k_1[] = "PYTHON:OBJECT";
|
|
static char __pyx_k_2[] = "";
|
|
static char __pyx_k_3[] = "VLEN strings do not support embedded NULLs";
|
|
static char __pyx_k_4[] = "Can't convert incompatible object to HDF5 object reference";
|
|
static char __pyx_k_5[] = "Can't convert incompatible object to HDF5 region reference";
|
|
static char __pyx_k_6[] = "Can't allocate conversion buffer";
|
|
static char __pyx_k_7[] = "\n Low-level type-conversion routines.\n";
|
|
static char __pyx_k__ref[] = "ref";
|
|
static char __pyx_k__priv[] = "priv";
|
|
static char __pyx_k__command[] = "command";
|
|
static char __pyx_k__obj_ref[] = "obj_ref";
|
|
static char __pyx_k__reg_ref[] = "reg_ref";
|
|
static char __pyx_k____main__[] = "__main__";
|
|
static char __pyx_k__dst_size[] = "dst_size";
|
|
static char __pyx_k__enum2int[] = "enum2int";
|
|
static char __pyx_k__int2enum[] = "int2enum";
|
|
static char __pyx_k__need_bkg[] = "need_bkg";
|
|
static char __pyx_k__src_size[] = "src_size";
|
|
static char __pyx_k__str2vlen[] = "str2vlen";
|
|
static char __pyx_k__typecode[] = "typecode";
|
|
static char __pyx_k__vlen2str[] = "vlen2str";
|
|
static char __pyx_k__TypeError[] = "TypeError";
|
|
static char __pyx_k__identical[] = "identical";
|
|
static char __pyx_k__supertype[] = "supertype";
|
|
static char __pyx_k__ValueError[] = "ValueError";
|
|
static char __pyx_k__fixed2vlen[] = "fixed2vlen";
|
|
static char __pyx_k__vlen2fixed[] = "vlen2fixed";
|
|
static char __pyx_k__MemoryError[] = "MemoryError";
|
|
static char __pyx_k__objref2pyref[] = "objref2pyref";
|
|
static char __pyx_k__pyref2objref[] = "pyref2objref";
|
|
static char __pyx_k__pyref2regref[] = "pyref2regref";
|
|
static char __pyx_k__regref2pyref[] = "regref2pyref";
|
|
static PyObject *__pyx_kp_s_3;
|
|
static PyObject *__pyx_kp_s_4;
|
|
static PyObject *__pyx_kp_s_5;
|
|
static PyObject *__pyx_kp_s_6;
|
|
static PyObject *__pyx_n_s__MemoryError;
|
|
static PyObject *__pyx_n_s__TypeError;
|
|
static PyObject *__pyx_n_s__ValueError;
|
|
static PyObject *__pyx_n_s____main__;
|
|
static PyObject *__pyx_n_s__command;
|
|
static PyObject *__pyx_n_s__dst_size;
|
|
static PyObject *__pyx_n_s__identical;
|
|
static PyObject *__pyx_n_s__need_bkg;
|
|
static PyObject *__pyx_n_s__obj_ref;
|
|
static PyObject *__pyx_n_s__priv;
|
|
static PyObject *__pyx_n_s__ref;
|
|
static PyObject *__pyx_n_s__reg_ref;
|
|
static PyObject *__pyx_n_s__src_size;
|
|
static PyObject *__pyx_n_s__supertype;
|
|
static PyObject *__pyx_n_s__typecode;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":24
|
|
* cdef hid_t H5PY_OBJ = 0
|
|
*
|
|
* cpdef hid_t get_python_obj(): # <<<<<<<<<<<<<<
|
|
* global H5PY_OBJ
|
|
* if H5PY_OBJ <= 0:
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_4h5py_5_conv_get_python_obj(PyObject *__pyx_self, PyObject *unused); /*proto*/
|
|
static hid_t __pyx_f_4h5py_5_conv_get_python_obj(int __pyx_skip_dispatch) {
|
|
hid_t __pyx_r;
|
|
int __pyx_t_1;
|
|
hid_t __pyx_t_2;
|
|
herr_t __pyx_t_3;
|
|
__Pyx_RefNannySetupContext("get_python_obj");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":26
|
|
* cpdef hid_t get_python_obj():
|
|
* global H5PY_OBJ
|
|
* if H5PY_OBJ <= 0: # <<<<<<<<<<<<<<
|
|
* H5PY_OBJ = H5Tcreate(H5T_OPAQUE, sizeof(PyObject*))
|
|
* H5Tset_tag(H5PY_OBJ, "PYTHON:OBJECT")
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_4h5py_5_conv_H5PY_OBJ <= 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":27
|
|
* global H5PY_OBJ
|
|
* if H5PY_OBJ <= 0:
|
|
* H5PY_OBJ = H5Tcreate(H5T_OPAQUE, sizeof(PyObject*)) # <<<<<<<<<<<<<<
|
|
* H5Tset_tag(H5PY_OBJ, "PYTHON:OBJECT")
|
|
* H5Tlock(H5PY_OBJ)
|
|
*/
|
|
__pyx_t_2 = H5Tcreate(H5T_OPAQUE, (sizeof(PyObject *))); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_v_4h5py_5_conv_H5PY_OBJ = __pyx_t_2;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":28
|
|
* if H5PY_OBJ <= 0:
|
|
* H5PY_OBJ = H5Tcreate(H5T_OPAQUE, sizeof(PyObject*))
|
|
* H5Tset_tag(H5PY_OBJ, "PYTHON:OBJECT") # <<<<<<<<<<<<<<
|
|
* H5Tlock(H5PY_OBJ)
|
|
* return H5PY_OBJ
|
|
*/
|
|
__pyx_t_3 = H5Tset_tag(__pyx_v_4h5py_5_conv_H5PY_OBJ, __pyx_k_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":29
|
|
* H5PY_OBJ = H5Tcreate(H5T_OPAQUE, sizeof(PyObject*))
|
|
* H5Tset_tag(H5PY_OBJ, "PYTHON:OBJECT")
|
|
* H5Tlock(H5PY_OBJ) # <<<<<<<<<<<<<<
|
|
* return H5PY_OBJ
|
|
*
|
|
*/
|
|
__pyx_t_3 = H5Tlock(__pyx_v_4h5py_5_conv_H5PY_OBJ); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":30
|
|
* H5Tset_tag(H5PY_OBJ, "PYTHON:OBJECT")
|
|
* H5Tlock(H5PY_OBJ)
|
|
* return H5PY_OBJ # <<<<<<<<<<<<<<
|
|
*
|
|
* ctypedef int (*conv_operator_t)(void* ipt, void* opt, void* bkg, void* priv) except -1
|
|
*/
|
|
__pyx_r = __pyx_v_4h5py_5_conv_H5PY_OBJ;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_WriteUnraisable("h5py._conv.get_python_obj");
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":24
|
|
* cdef hid_t H5PY_OBJ = 0
|
|
*
|
|
* cpdef hid_t get_python_obj(): # <<<<<<<<<<<<<<
|
|
* global H5PY_OBJ
|
|
* if H5PY_OBJ <= 0:
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_4h5py_5_conv_get_python_obj(PyObject *__pyx_self, PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pf_4h5py_5_conv_get_python_obj(PyObject *__pyx_self, PyObject *unused) {
|
|
PyObject *__pyx_r = NULL;
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("get_python_obj");
|
|
__pyx_self = __pyx_self;
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __Pyx_PyInt_to_py_hid_t(__pyx_f_4h5py_5_conv_get_python_obj(0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("h5py._conv.get_python_obj");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":44
|
|
* # likely small compared to the cost of the Python-side API calls required to
|
|
* # implement the conversions.
|
|
* cdef herr_t generic_converter(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
|
|
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
|
|
* void *bkg_i, hid_t dxpl, conv_operator_t op,
|
|
*/
|
|
|
|
static herr_t __pyx_f_4h5py_5_conv_generic_converter(hid_t __pyx_v_src_id, hid_t __pyx_v_dst_id, H5T_cdata_t *__pyx_v_cdata, size_t __pyx_v_nl, size_t __pyx_v_buf_stride, size_t __pyx_v_bkg_stride, void *__pyx_v_buf_i, void *__pyx_v_bkg_i, hid_t __pyx_v_dxpl, __pyx_t_4h5py_5_conv_conv_operator_t __pyx_v_op, __pyx_t_4h5py_5_conv_init_operator_t __pyx_v_initop, H5T_bkg_t __pyx_v_need_bkg) {
|
|
int __pyx_v_command;
|
|
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_v_sizes;
|
|
int __pyx_v_i;
|
|
char *__pyx_v_buf;
|
|
char *__pyx_v_bkg;
|
|
herr_t __pyx_r;
|
|
int __pyx_t_1;
|
|
herr_t __pyx_t_2;
|
|
size_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
__Pyx_RefNannySetupContext("generic_converter");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":49
|
|
* init_operator_t initop, H5T_bkg_t need_bkg) except -1:
|
|
*
|
|
* cdef int command = cdata[0].command # <<<<<<<<<<<<<<
|
|
* cdef conv_size_t *sizes
|
|
* cdef int i
|
|
*/
|
|
__pyx_v_command = (__pyx_v_cdata[0]).command;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":53
|
|
* cdef int i
|
|
*
|
|
* cdef char* buf = <char*>buf_i # <<<<<<<<<<<<<<
|
|
* cdef char* bkg = <char*>bkg_i
|
|
*
|
|
*/
|
|
__pyx_v_buf = ((char *)__pyx_v_buf_i);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":54
|
|
*
|
|
* cdef char* buf = <char*>buf_i
|
|
* cdef char* bkg = <char*>bkg_i # <<<<<<<<<<<<<<
|
|
*
|
|
* if command == H5T_CONV_INIT:
|
|
*/
|
|
__pyx_v_bkg = ((char *)__pyx_v_bkg_i);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":56
|
|
* cdef char* bkg = <char*>bkg_i
|
|
*
|
|
* if command == H5T_CONV_INIT: # <<<<<<<<<<<<<<
|
|
*
|
|
* cdata[0].need_bkg = need_bkg
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_command == H5T_CONV_INIT);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":58
|
|
* if command == H5T_CONV_INIT:
|
|
*
|
|
* cdata[0].need_bkg = need_bkg # <<<<<<<<<<<<<<
|
|
* return initop(src_id, dst_id, &(cdata[0].priv))
|
|
*
|
|
*/
|
|
(__pyx_v_cdata[0]).need_bkg = __pyx_v_need_bkg;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":59
|
|
*
|
|
* cdata[0].need_bkg = need_bkg
|
|
* return initop(src_id, dst_id, &(cdata[0].priv)) # <<<<<<<<<<<<<<
|
|
*
|
|
* elif command == H5T_CONV_FREE:
|
|
*/
|
|
__pyx_t_2 = __pyx_v_initop(__pyx_v_src_id, __pyx_v_dst_id, (&(__pyx_v_cdata[0]).priv)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_r = __pyx_t_2;
|
|
goto __pyx_L0;
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":61
|
|
* return initop(src_id, dst_id, &(cdata[0].priv))
|
|
*
|
|
* elif command == H5T_CONV_FREE: # <<<<<<<<<<<<<<
|
|
*
|
|
* free(cdata[0].priv)
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_command == H5T_CONV_FREE);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":63
|
|
* elif command == H5T_CONV_FREE:
|
|
*
|
|
* free(cdata[0].priv) # <<<<<<<<<<<<<<
|
|
* cdata[0].priv = NULL
|
|
*
|
|
*/
|
|
free((__pyx_v_cdata[0]).priv);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":64
|
|
*
|
|
* free(cdata[0].priv)
|
|
* cdata[0].priv = NULL # <<<<<<<<<<<<<<
|
|
*
|
|
* elif command == H5T_CONV_CONV:
|
|
*/
|
|
(__pyx_v_cdata[0]).priv = NULL;
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":66
|
|
* cdata[0].priv = NULL
|
|
*
|
|
* elif command == H5T_CONV_CONV: # <<<<<<<<<<<<<<
|
|
*
|
|
* sizes = <conv_size_t*>cdata[0].priv
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_command == H5T_CONV_CONV);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":68
|
|
* elif command == H5T_CONV_CONV:
|
|
*
|
|
* sizes = <conv_size_t*>cdata[0].priv # <<<<<<<<<<<<<<
|
|
*
|
|
* if bkg_stride==0: bkg_stride = sizes[0].dst_size;
|
|
*/
|
|
__pyx_v_sizes = ((__pyx_t_4h5py_5_conv_conv_size_t *)(__pyx_v_cdata[0]).priv);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":70
|
|
* sizes = <conv_size_t*>cdata[0].priv
|
|
*
|
|
* if bkg_stride==0: bkg_stride = sizes[0].dst_size; # <<<<<<<<<<<<<<
|
|
*
|
|
* if buf_stride == 0:
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_bkg_stride == 0);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_bkg_stride = (__pyx_v_sizes[0]).dst_size;
|
|
goto __pyx_L4;
|
|
}
|
|
__pyx_L4:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":72
|
|
* if bkg_stride==0: bkg_stride = sizes[0].dst_size;
|
|
*
|
|
* if buf_stride == 0: # <<<<<<<<<<<<<<
|
|
* # No explicit stride seems to mean that the elements are packed
|
|
* # contiguously in the buffer. In this case we must be careful
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_buf_stride == 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":78
|
|
* # of a larger size.
|
|
*
|
|
* if sizes[0].src_size >= sizes[0].dst_size: # <<<<<<<<<<<<<<
|
|
* for i from 0<=i<nl:
|
|
* op( buf + (i*sizes[0].src_size), # input pointer
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v_sizes[0]).src_size >= (__pyx_v_sizes[0]).dst_size);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":79
|
|
*
|
|
* if sizes[0].src_size >= sizes[0].dst_size:
|
|
* for i from 0<=i<nl: # <<<<<<<<<<<<<<
|
|
* op( buf + (i*sizes[0].src_size), # input pointer
|
|
* buf + (i*sizes[0].dst_size), # output pointer
|
|
*/
|
|
__pyx_t_3 = __pyx_v_nl;
|
|
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":83
|
|
* buf + (i*sizes[0].dst_size), # output pointer
|
|
* bkg + (i*bkg_stride), # backing buffer
|
|
* cdata[0].priv) # conversion context # <<<<<<<<<<<<<<
|
|
* else:
|
|
* for i from nl>i>=0:
|
|
*/
|
|
__pyx_t_4 = __pyx_v_op((__pyx_v_buf + (__pyx_v_i * (__pyx_v_sizes[0]).src_size)), (__pyx_v_buf + (__pyx_v_i * (__pyx_v_sizes[0]).dst_size)), (__pyx_v_bkg + (__pyx_v_i * __pyx_v_bkg_stride)), (__pyx_v_cdata[0]).priv); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
}
|
|
goto __pyx_L6;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":85
|
|
* cdata[0].priv) # conversion context
|
|
* else:
|
|
* for i from nl>i>=0: # <<<<<<<<<<<<<<
|
|
* op( buf + (i*sizes[0].src_size),
|
|
* buf + (i*sizes[0].dst_size),
|
|
*/
|
|
for (__pyx_v_i = __pyx_v_nl-1; __pyx_v_i >= 0; __pyx_v_i--) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":89
|
|
* buf + (i*sizes[0].dst_size),
|
|
* bkg + (i*bkg_stride),
|
|
* cdata[0].priv) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* # With explicit strides, we assume that the library knows the
|
|
*/
|
|
__pyx_t_4 = __pyx_v_op((__pyx_v_buf + (__pyx_v_i * (__pyx_v_sizes[0]).src_size)), (__pyx_v_buf + (__pyx_v_i * (__pyx_v_sizes[0]).dst_size)), (__pyx_v_bkg + (__pyx_v_i * __pyx_v_bkg_stride)), (__pyx_v_cdata[0]).priv); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
}
|
|
}
|
|
__pyx_L6:;
|
|
goto __pyx_L5;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":94
|
|
* # alignment better than us. Therefore we use the given stride
|
|
* # offsets exclusively.
|
|
* for i from 0<=i<nl: # <<<<<<<<<<<<<<
|
|
* op( buf + (i*buf_stride),
|
|
* buf + (i*buf_stride), # note this is the same!
|
|
*/
|
|
__pyx_t_3 = __pyx_v_nl;
|
|
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":98
|
|
* buf + (i*buf_stride), # note this is the same!
|
|
* bkg + (i*bkg_stride),
|
|
* cdata[0].priv) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return -2 # Unrecognized command. Note this is NOT an exception.
|
|
*/
|
|
__pyx_t_4 = __pyx_v_op((__pyx_v_buf + (__pyx_v_i * __pyx_v_buf_stride)), (__pyx_v_buf + (__pyx_v_i * __pyx_v_buf_stride)), (__pyx_v_bkg + (__pyx_v_i * __pyx_v_bkg_stride)), (__pyx_v_cdata[0]).priv); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
}
|
|
}
|
|
__pyx_L5:;
|
|
goto __pyx_L3;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":100
|
|
* cdata[0].priv)
|
|
* else:
|
|
* return -2 # Unrecognized command. Note this is NOT an exception. # <<<<<<<<<<<<<<
|
|
*
|
|
* return 0
|
|
*/
|
|
__pyx_r = -2;
|
|
goto __pyx_L0;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":102
|
|
* return -2 # Unrecognized command. Note this is NOT an exception.
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* # =============================================================================
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.generic_converter");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":111
|
|
* size_t dst_size
|
|
*
|
|
* cdef herr_t init_generic(hid_t src, hid_t dst, void** priv) except -1: # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef conv_size_t *sizes
|
|
*/
|
|
|
|
static herr_t __pyx_f_4h5py_5_conv_init_generic(hid_t __pyx_v_src, hid_t __pyx_v_dst, void **__pyx_v_priv) {
|
|
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_v_sizes;
|
|
herr_t __pyx_r;
|
|
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_t_1;
|
|
size_t __pyx_t_2;
|
|
__Pyx_RefNannySetupContext("init_generic");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":114
|
|
*
|
|
* cdef conv_size_t *sizes
|
|
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t)) # <<<<<<<<<<<<<<
|
|
* sizes[0].src_size = H5Tget_size(src)
|
|
* sizes[0].dst_size = H5Tget_size(dst)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_t_4h5py_5_conv_conv_size_t *)malloc((sizeof(__pyx_t_4h5py_5_conv_conv_size_t))));
|
|
(__pyx_v_priv[0]) = __pyx_t_1;
|
|
__pyx_v_sizes = __pyx_t_1;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":115
|
|
* cdef conv_size_t *sizes
|
|
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t))
|
|
* sizes[0].src_size = H5Tget_size(src) # <<<<<<<<<<<<<<
|
|
* sizes[0].dst_size = H5Tget_size(dst)
|
|
*
|
|
*/
|
|
__pyx_t_2 = H5Tget_size(__pyx_v_src); if (unlikely(__pyx_t_2 == 0 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
(__pyx_v_sizes[0]).src_size = __pyx_t_2;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":116
|
|
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t))
|
|
* sizes[0].src_size = H5Tget_size(src)
|
|
* sizes[0].dst_size = H5Tget_size(dst) # <<<<<<<<<<<<<<
|
|
*
|
|
* return 0
|
|
*/
|
|
__pyx_t_2 = H5Tget_size(__pyx_v_dst); if (unlikely(__pyx_t_2 == 0 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
(__pyx_v_sizes[0]).dst_size = __pyx_t_2;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":118
|
|
* sizes[0].dst_size = H5Tget_size(dst)
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int conv_vlen2str(void* ipt, void* opt, void* bkg, void* priv) except -1:
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.init_generic");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":120
|
|
* return 0
|
|
*
|
|
* cdef int conv_vlen2str(void* ipt, void* opt, void* bkg, void* priv) except -1: # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>opt
|
|
*/
|
|
|
|
static int __pyx_f_4h5py_5_conv_conv_vlen2str(void *__pyx_v_ipt, void *__pyx_v_opt, void *__pyx_v_bkg, void *__pyx_v_priv) {
|
|
PyObject **__pyx_v_buf_obj;
|
|
PyObject **__pyx_v_bkg_obj;
|
|
char **__pyx_v_buf_cstring;
|
|
PyObject *__pyx_v_temp_obj;
|
|
int __pyx_r;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2;
|
|
__Pyx_RefNannySetupContext("conv_vlen2str");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":122
|
|
* cdef int conv_vlen2str(void* ipt, void* opt, void* bkg, void* priv) except -1:
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>opt # <<<<<<<<<<<<<<
|
|
* cdef PyObject** bkg_obj = <PyObject**>bkg
|
|
* cdef char** buf_cstring = <char**>ipt
|
|
*/
|
|
__pyx_v_buf_obj = ((PyObject **)__pyx_v_opt);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":123
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>opt
|
|
* cdef PyObject** bkg_obj = <PyObject**>bkg # <<<<<<<<<<<<<<
|
|
* cdef char** buf_cstring = <char**>ipt
|
|
* cdef PyObject* temp_obj = NULL
|
|
*/
|
|
__pyx_v_bkg_obj = ((PyObject **)__pyx_v_bkg);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":124
|
|
* cdef PyObject** buf_obj = <PyObject**>opt
|
|
* cdef PyObject** bkg_obj = <PyObject**>bkg
|
|
* cdef char** buf_cstring = <char**>ipt # <<<<<<<<<<<<<<
|
|
* cdef PyObject* temp_obj = NULL
|
|
*
|
|
*/
|
|
__pyx_v_buf_cstring = ((char **)__pyx_v_ipt);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":125
|
|
* cdef PyObject** bkg_obj = <PyObject**>bkg
|
|
* cdef char** buf_cstring = <char**>ipt
|
|
* cdef PyObject* temp_obj = NULL # <<<<<<<<<<<<<<
|
|
*
|
|
* if buf_cstring[0] == NULL:
|
|
*/
|
|
__pyx_v_temp_obj = NULL;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":127
|
|
* cdef PyObject* temp_obj = NULL
|
|
*
|
|
* if buf_cstring[0] == NULL: # <<<<<<<<<<<<<<
|
|
* temp_obj = PyString_FromString("")
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v_buf_cstring[0]) == NULL);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":128
|
|
*
|
|
* if buf_cstring[0] == NULL:
|
|
* temp_obj = PyString_FromString("") # <<<<<<<<<<<<<<
|
|
* else:
|
|
* temp_obj = PyString_FromString(buf_cstring[0])
|
|
*/
|
|
__pyx_t_2 = PyString_FromString(__pyx_k_2); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_v_temp_obj = __pyx_t_2;
|
|
goto __pyx_L3;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":130
|
|
* temp_obj = PyString_FromString("")
|
|
* else:
|
|
* temp_obj = PyString_FromString(buf_cstring[0]) # <<<<<<<<<<<<<<
|
|
*
|
|
* # Since all data conversions are by definition in-place, it
|
|
*/
|
|
__pyx_t_2 = PyString_FromString((__pyx_v_buf_cstring[0])); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_v_temp_obj = __pyx_t_2;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":134
|
|
* # Since all data conversions are by definition in-place, it
|
|
* # is our responsibility to free the memory used by the vlens.
|
|
* free(buf_cstring[0]) # <<<<<<<<<<<<<<
|
|
*
|
|
* # HDF5 will eventuallly overwrite this target location, so we
|
|
*/
|
|
free((__pyx_v_buf_cstring[0]));
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":138
|
|
* # HDF5 will eventuallly overwrite this target location, so we
|
|
* # make sure to decref the object there.
|
|
* Py_XDECREF(bkg_obj[0]) # <<<<<<<<<<<<<<
|
|
*
|
|
* # Write the new string object to the buffer in-place
|
|
*/
|
|
Py_XDECREF((__pyx_v_bkg_obj[0]));
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":141
|
|
*
|
|
* # Write the new string object to the buffer in-place
|
|
* buf_obj[0] = temp_obj # <<<<<<<<<<<<<<
|
|
*
|
|
* return 0
|
|
*/
|
|
(__pyx_v_buf_obj[0]) = __pyx_v_temp_obj;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":143
|
|
* buf_obj[0] = temp_obj
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int conv_str2vlen(void* ipt, void* opt, void* bkg, void* priv) except -1:
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.conv_vlen2str");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":145
|
|
* return 0
|
|
*
|
|
* cdef int conv_str2vlen(void* ipt, void* opt, void* bkg, void* priv) except -1: # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>ipt
|
|
*/
|
|
|
|
static int __pyx_f_4h5py_5_conv_conv_str2vlen(void *__pyx_v_ipt, void *__pyx_v_opt, void *__pyx_v_bkg, void *__pyx_v_priv) {
|
|
PyObject **__pyx_v_buf_obj;
|
|
char **__pyx_v_buf_cstring;
|
|
PyObject *__pyx_v_temp_object;
|
|
char *__pyx_v_temp_string;
|
|
size_t __pyx_v_temp_string_len;
|
|
int __pyx_r;
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
char *__pyx_t_5;
|
|
PyObject *__pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("conv_str2vlen");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":147
|
|
* cdef int conv_str2vlen(void* ipt, void* opt, void* bkg, void* priv) except -1:
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>ipt # <<<<<<<<<<<<<<
|
|
* cdef char** buf_cstring = <char**>opt
|
|
*
|
|
*/
|
|
__pyx_v_buf_obj = ((PyObject **)__pyx_v_ipt);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":148
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>ipt
|
|
* cdef char** buf_cstring = <char**>opt # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef PyObject* temp_object = NULL
|
|
*/
|
|
__pyx_v_buf_cstring = ((char **)__pyx_v_opt);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":150
|
|
* cdef char** buf_cstring = <char**>opt
|
|
*
|
|
* cdef PyObject* temp_object = NULL # <<<<<<<<<<<<<<
|
|
* cdef char* temp_string = NULL
|
|
* cdef size_t temp_string_len = 0 # Not including null term
|
|
*/
|
|
__pyx_v_temp_object = NULL;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":151
|
|
*
|
|
* cdef PyObject* temp_object = NULL
|
|
* cdef char* temp_string = NULL # <<<<<<<<<<<<<<
|
|
* cdef size_t temp_string_len = 0 # Not including null term
|
|
*
|
|
*/
|
|
__pyx_v_temp_string = NULL;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":152
|
|
* cdef PyObject* temp_object = NULL
|
|
* cdef char* temp_string = NULL
|
|
* cdef size_t temp_string_len = 0 # Not including null term # <<<<<<<<<<<<<<
|
|
*
|
|
* try:
|
|
*/
|
|
__pyx_v_temp_string_len = 0;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":154
|
|
* cdef size_t temp_string_len = 0 # Not including null term
|
|
*
|
|
* try: # <<<<<<<<<<<<<<
|
|
* if buf_obj[0] == NULL or buf_obj[0] == Py_None:
|
|
* temp_string = ""
|
|
*/
|
|
/*try:*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":155
|
|
*
|
|
* try:
|
|
* if buf_obj[0] == NULL or buf_obj[0] == Py_None: # <<<<<<<<<<<<<<
|
|
* temp_string = ""
|
|
* temp_string_len = 0
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v_buf_obj[0]) == NULL);
|
|
if (!__pyx_t_1) {
|
|
__pyx_t_2 = ((__pyx_v_buf_obj[0]) == Py_None);
|
|
__pyx_t_3 = __pyx_t_2;
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_1;
|
|
}
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":156
|
|
* try:
|
|
* if buf_obj[0] == NULL or buf_obj[0] == Py_None:
|
|
* temp_string = "" # <<<<<<<<<<<<<<
|
|
* temp_string_len = 0
|
|
* else:
|
|
*/
|
|
__pyx_v_temp_string = __pyx_k_2;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":157
|
|
* if buf_obj[0] == NULL or buf_obj[0] == Py_None:
|
|
* temp_string = ""
|
|
* temp_string_len = 0 # <<<<<<<<<<<<<<
|
|
* else:
|
|
* if PyString_CheckExact(buf_obj[0]):
|
|
*/
|
|
__pyx_v_temp_string_len = 0;
|
|
goto __pyx_L6;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":159
|
|
* temp_string_len = 0
|
|
* else:
|
|
* if PyString_CheckExact(buf_obj[0]): # <<<<<<<<<<<<<<
|
|
* temp_object = buf_obj[0]
|
|
* Py_INCREF(temp_object)
|
|
*/
|
|
__pyx_t_4 = PyString_CheckExact((__pyx_v_buf_obj[0])); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L4;}
|
|
if (__pyx_t_4) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":160
|
|
* else:
|
|
* if PyString_CheckExact(buf_obj[0]):
|
|
* temp_object = buf_obj[0] # <<<<<<<<<<<<<<
|
|
* Py_INCREF(temp_object)
|
|
* temp_string = PyString_AsString(temp_object)
|
|
*/
|
|
__pyx_v_temp_object = (__pyx_v_buf_obj[0]);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":161
|
|
* if PyString_CheckExact(buf_obj[0]):
|
|
* temp_object = buf_obj[0]
|
|
* Py_INCREF(temp_object) # <<<<<<<<<<<<<<
|
|
* temp_string = PyString_AsString(temp_object)
|
|
* temp_string_len = PyString_Size(temp_object)
|
|
*/
|
|
Py_INCREF(__pyx_v_temp_object);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":162
|
|
* temp_object = buf_obj[0]
|
|
* Py_INCREF(temp_object)
|
|
* temp_string = PyString_AsString(temp_object) # <<<<<<<<<<<<<<
|
|
* temp_string_len = PyString_Size(temp_object)
|
|
* else:
|
|
*/
|
|
__pyx_t_5 = PyString_AsString(__pyx_v_temp_object); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L4;}
|
|
__pyx_v_temp_string = __pyx_t_5;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":163
|
|
* Py_INCREF(temp_object)
|
|
* temp_string = PyString_AsString(temp_object)
|
|
* temp_string_len = PyString_Size(temp_object) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* temp_object = PyObject_Str(buf_obj[0])
|
|
*/
|
|
__pyx_t_4 = PyString_Size(__pyx_v_temp_object); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L4;}
|
|
__pyx_v_temp_string_len = __pyx_t_4;
|
|
goto __pyx_L7;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":165
|
|
* temp_string_len = PyString_Size(temp_object)
|
|
* else:
|
|
* temp_object = PyObject_Str(buf_obj[0]) # <<<<<<<<<<<<<<
|
|
* temp_string = PyString_AsString(temp_object)
|
|
* temp_string_len = PyString_Size(temp_object)
|
|
*/
|
|
__pyx_t_6 = PyObject_Str((__pyx_v_buf_obj[0])); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L4;}
|
|
__pyx_v_temp_object = __pyx_t_6;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":166
|
|
* else:
|
|
* temp_object = PyObject_Str(buf_obj[0])
|
|
* temp_string = PyString_AsString(temp_object) # <<<<<<<<<<<<<<
|
|
* temp_string_len = PyString_Size(temp_object)
|
|
*
|
|
*/
|
|
__pyx_t_5 = PyString_AsString(__pyx_v_temp_object); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L4;}
|
|
__pyx_v_temp_string = __pyx_t_5;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":167
|
|
* temp_object = PyObject_Str(buf_obj[0])
|
|
* temp_string = PyString_AsString(temp_object)
|
|
* temp_string_len = PyString_Size(temp_object) # <<<<<<<<<<<<<<
|
|
*
|
|
* if strlen(temp_string) != temp_string_len:
|
|
*/
|
|
__pyx_t_4 = PyString_Size(__pyx_v_temp_object); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L4;}
|
|
__pyx_v_temp_string_len = __pyx_t_4;
|
|
}
|
|
__pyx_L7:;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":169
|
|
* temp_string_len = PyString_Size(temp_object)
|
|
*
|
|
* if strlen(temp_string) != temp_string_len: # <<<<<<<<<<<<<<
|
|
* raise ValueError("VLEN strings do not support embedded NULLs")
|
|
*
|
|
*/
|
|
__pyx_t_3 = (strlen(__pyx_v_temp_string) != __pyx_v_temp_string_len);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":170
|
|
*
|
|
* if strlen(temp_string) != temp_string_len:
|
|
* raise ValueError("VLEN strings do not support embedded NULLs") # <<<<<<<<<<<<<<
|
|
*
|
|
* buf_cstring[0] = <char*>malloc(temp_string_len+1)
|
|
*/
|
|
__pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L4;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
|
|
PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_kp_s_3));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
|
|
__pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L4;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_Raise(__pyx_t_8, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L4;}
|
|
goto __pyx_L8;
|
|
}
|
|
__pyx_L8:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":172
|
|
* raise ValueError("VLEN strings do not support embedded NULLs")
|
|
*
|
|
* buf_cstring[0] = <char*>malloc(temp_string_len+1) # <<<<<<<<<<<<<<
|
|
* memcpy(buf_cstring[0], temp_string, temp_string_len+1)
|
|
*
|
|
*/
|
|
(__pyx_v_buf_cstring[0]) = ((char *)malloc((__pyx_v_temp_string_len + 1)));
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":173
|
|
*
|
|
* buf_cstring[0] = <char*>malloc(temp_string_len+1)
|
|
* memcpy(buf_cstring[0], temp_string, temp_string_len+1) # <<<<<<<<<<<<<<
|
|
*
|
|
* return 0
|
|
*/
|
|
memcpy((__pyx_v_buf_cstring[0]), __pyx_v_temp_string, (__pyx_v_temp_string_len + 1));
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":175
|
|
* memcpy(buf_cstring[0], temp_string, temp_string_len+1)
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
* finally:
|
|
* Py_XDECREF(temp_object)
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L3;
|
|
}
|
|
/*finally:*/ {
|
|
int __pyx_why;
|
|
PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
|
|
int __pyx_exc_lineno;
|
|
__pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
|
|
__pyx_why = 0; goto __pyx_L5;
|
|
__pyx_L3: __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
|
|
__pyx_why = 3; goto __pyx_L5;
|
|
__pyx_L4: {
|
|
__pyx_why = 4;
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
|
|
__pyx_exc_lineno = __pyx_lineno;
|
|
goto __pyx_L5;
|
|
}
|
|
__pyx_L5:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":177
|
|
* return 0
|
|
* finally:
|
|
* Py_XDECREF(temp_object) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
Py_XDECREF(__pyx_v_temp_object);
|
|
switch (__pyx_why) {
|
|
case 3: goto __pyx_L0;
|
|
case 4: {
|
|
__Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
|
|
__pyx_lineno = __pyx_exc_lineno;
|
|
__pyx_exc_type = 0;
|
|
__pyx_exc_value = 0;
|
|
__pyx_exc_tb = 0;
|
|
goto __pyx_L1_error;
|
|
}
|
|
}
|
|
}
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("h5py._conv.conv_str2vlen");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":183
|
|
* # VLEN to fixed-width strings
|
|
*
|
|
* cdef herr_t init_vlen2fixed(hid_t src, hid_t dst, void** priv) except -1: # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef conv_size_t *sizes
|
|
*/
|
|
|
|
static herr_t __pyx_f_4h5py_5_conv_init_vlen2fixed(hid_t __pyx_v_src, hid_t __pyx_v_dst, void **__pyx_v_priv) {
|
|
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_v_sizes;
|
|
herr_t __pyx_r;
|
|
htri_t __pyx_t_1;
|
|
htri_t __pyx_t_2;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_t_5;
|
|
size_t __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("init_vlen2fixed");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":187
|
|
* cdef conv_size_t *sizes
|
|
*
|
|
* if not (H5Tis_variable_str(src) and (not H5Tis_variable_str(dst))): # <<<<<<<<<<<<<<
|
|
* return -2
|
|
*
|
|
*/
|
|
__pyx_t_1 = H5Tis_variable_str(__pyx_v_src); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_1) {
|
|
__pyx_t_2 = H5Tis_variable_str(__pyx_v_dst); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = (!__pyx_t_2);
|
|
__pyx_t_4 = __pyx_t_3;
|
|
} else {
|
|
__pyx_t_4 = __pyx_t_1;
|
|
}
|
|
__pyx_t_3 = (!__pyx_t_4);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":188
|
|
*
|
|
* if not (H5Tis_variable_str(src) and (not H5Tis_variable_str(dst))):
|
|
* return -2 # <<<<<<<<<<<<<<
|
|
*
|
|
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t))
|
|
*/
|
|
__pyx_r = -2;
|
|
goto __pyx_L0;
|
|
goto __pyx_L3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":190
|
|
* return -2
|
|
*
|
|
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t)) # <<<<<<<<<<<<<<
|
|
* sizes[0].src_size = H5Tget_size(src)
|
|
* sizes[0].dst_size = H5Tget_size(dst)
|
|
*/
|
|
__pyx_t_5 = ((__pyx_t_4h5py_5_conv_conv_size_t *)malloc((sizeof(__pyx_t_4h5py_5_conv_conv_size_t))));
|
|
(__pyx_v_priv[0]) = __pyx_t_5;
|
|
__pyx_v_sizes = __pyx_t_5;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":191
|
|
*
|
|
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t))
|
|
* sizes[0].src_size = H5Tget_size(src) # <<<<<<<<<<<<<<
|
|
* sizes[0].dst_size = H5Tget_size(dst)
|
|
*
|
|
*/
|
|
__pyx_t_6 = H5Tget_size(__pyx_v_src); if (unlikely(__pyx_t_6 == 0 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
(__pyx_v_sizes[0]).src_size = __pyx_t_6;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":192
|
|
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t))
|
|
* sizes[0].src_size = H5Tget_size(src)
|
|
* sizes[0].dst_size = H5Tget_size(dst) # <<<<<<<<<<<<<<
|
|
*
|
|
* return 0
|
|
*/
|
|
__pyx_t_6 = H5Tget_size(__pyx_v_dst); if (unlikely(__pyx_t_6 == 0 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
(__pyx_v_sizes[0]).dst_size = __pyx_t_6;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":194
|
|
* sizes[0].dst_size = H5Tget_size(dst)
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef herr_t init_fixed2vlen(hid_t src, hid_t dst, void** priv) except -1:
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.init_vlen2fixed");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":196
|
|
* return 0
|
|
*
|
|
* cdef herr_t init_fixed2vlen(hid_t src, hid_t dst, void** priv) except -1: # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef conv_size_t *sizes
|
|
*/
|
|
|
|
static herr_t __pyx_f_4h5py_5_conv_init_fixed2vlen(hid_t __pyx_v_src, hid_t __pyx_v_dst, void **__pyx_v_priv) {
|
|
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_v_sizes;
|
|
herr_t __pyx_r;
|
|
htri_t __pyx_t_1;
|
|
htri_t __pyx_t_2;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_t_5;
|
|
size_t __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("init_fixed2vlen");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":200
|
|
* cdef conv_size_t *sizes
|
|
*
|
|
* if not (H5Tis_variable_str(dst) and (not H5Tis_variable_str(src))): # <<<<<<<<<<<<<<
|
|
* return -2
|
|
*
|
|
*/
|
|
__pyx_t_1 = H5Tis_variable_str(__pyx_v_dst); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_1) {
|
|
__pyx_t_2 = H5Tis_variable_str(__pyx_v_src); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = (!__pyx_t_2);
|
|
__pyx_t_4 = __pyx_t_3;
|
|
} else {
|
|
__pyx_t_4 = __pyx_t_1;
|
|
}
|
|
__pyx_t_3 = (!__pyx_t_4);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":201
|
|
*
|
|
* if not (H5Tis_variable_str(dst) and (not H5Tis_variable_str(src))):
|
|
* return -2 # <<<<<<<<<<<<<<
|
|
*
|
|
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t))
|
|
*/
|
|
__pyx_r = -2;
|
|
goto __pyx_L0;
|
|
goto __pyx_L3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":203
|
|
* return -2
|
|
*
|
|
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t)) # <<<<<<<<<<<<<<
|
|
* sizes[0].src_size = H5Tget_size(src)
|
|
* sizes[0].dst_size = H5Tget_size(dst)
|
|
*/
|
|
__pyx_t_5 = ((__pyx_t_4h5py_5_conv_conv_size_t *)malloc((sizeof(__pyx_t_4h5py_5_conv_conv_size_t))));
|
|
(__pyx_v_priv[0]) = __pyx_t_5;
|
|
__pyx_v_sizes = __pyx_t_5;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":204
|
|
*
|
|
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t))
|
|
* sizes[0].src_size = H5Tget_size(src) # <<<<<<<<<<<<<<
|
|
* sizes[0].dst_size = H5Tget_size(dst)
|
|
*
|
|
*/
|
|
__pyx_t_6 = H5Tget_size(__pyx_v_src); if (unlikely(__pyx_t_6 == 0 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
(__pyx_v_sizes[0]).src_size = __pyx_t_6;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":205
|
|
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t))
|
|
* sizes[0].src_size = H5Tget_size(src)
|
|
* sizes[0].dst_size = H5Tget_size(dst) # <<<<<<<<<<<<<<
|
|
*
|
|
* return 0
|
|
*/
|
|
__pyx_t_6 = H5Tget_size(__pyx_v_dst); if (unlikely(__pyx_t_6 == 0 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
(__pyx_v_sizes[0]).dst_size = __pyx_t_6;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":207
|
|
* sizes[0].dst_size = H5Tget_size(dst)
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int conv_vlen2fixed(void* ipt, void* opt, void* bkg, void* priv) except -1:
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.init_fixed2vlen");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":209
|
|
* return 0
|
|
*
|
|
* cdef int conv_vlen2fixed(void* ipt, void* opt, void* bkg, void* priv) except -1: # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef char** buf_vlen = <char**>ipt
|
|
*/
|
|
|
|
static int __pyx_f_4h5py_5_conv_conv_vlen2fixed(void *__pyx_v_ipt, void *__pyx_v_opt, void *__pyx_v_bkg, void *__pyx_v_priv) {
|
|
char **__pyx_v_buf_vlen;
|
|
char *__pyx_v_buf_fixed;
|
|
char *__pyx_v_temp_string;
|
|
size_t __pyx_v_temp_string_len;
|
|
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_v_sizes;
|
|
int __pyx_r;
|
|
int __pyx_t_1;
|
|
__Pyx_RefNannySetupContext("conv_vlen2fixed");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":211
|
|
* cdef int conv_vlen2fixed(void* ipt, void* opt, void* bkg, void* priv) except -1:
|
|
*
|
|
* cdef char** buf_vlen = <char**>ipt # <<<<<<<<<<<<<<
|
|
* cdef char* buf_fixed = <char*>opt
|
|
* cdef char* temp_string = NULL
|
|
*/
|
|
__pyx_v_buf_vlen = ((char **)__pyx_v_ipt);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":212
|
|
*
|
|
* cdef char** buf_vlen = <char**>ipt
|
|
* cdef char* buf_fixed = <char*>opt # <<<<<<<<<<<<<<
|
|
* cdef char* temp_string = NULL
|
|
* cdef size_t temp_string_len = 0 # Without null term
|
|
*/
|
|
__pyx_v_buf_fixed = ((char *)__pyx_v_opt);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":213
|
|
* cdef char** buf_vlen = <char**>ipt
|
|
* cdef char* buf_fixed = <char*>opt
|
|
* cdef char* temp_string = NULL # <<<<<<<<<<<<<<
|
|
* cdef size_t temp_string_len = 0 # Without null term
|
|
* cdef conv_size_t *sizes = <conv_size_t*>priv
|
|
*/
|
|
__pyx_v_temp_string = NULL;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":214
|
|
* cdef char* buf_fixed = <char*>opt
|
|
* cdef char* temp_string = NULL
|
|
* cdef size_t temp_string_len = 0 # Without null term # <<<<<<<<<<<<<<
|
|
* cdef conv_size_t *sizes = <conv_size_t*>priv
|
|
*
|
|
*/
|
|
__pyx_v_temp_string_len = 0;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":215
|
|
* cdef char* temp_string = NULL
|
|
* cdef size_t temp_string_len = 0 # Without null term
|
|
* cdef conv_size_t *sizes = <conv_size_t*>priv # <<<<<<<<<<<<<<
|
|
*
|
|
* if buf_vlen[0] != NULL:
|
|
*/
|
|
__pyx_v_sizes = ((__pyx_t_4h5py_5_conv_conv_size_t *)__pyx_v_priv);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":217
|
|
* cdef conv_size_t *sizes = <conv_size_t*>priv
|
|
*
|
|
* if buf_vlen[0] != NULL: # <<<<<<<<<<<<<<
|
|
* temp_string = buf_vlen[0]
|
|
* temp_string_len = strlen(temp_string)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v_buf_vlen[0]) != NULL);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":218
|
|
*
|
|
* if buf_vlen[0] != NULL:
|
|
* temp_string = buf_vlen[0] # <<<<<<<<<<<<<<
|
|
* temp_string_len = strlen(temp_string)
|
|
*
|
|
*/
|
|
__pyx_v_temp_string = (__pyx_v_buf_vlen[0]);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":219
|
|
* if buf_vlen[0] != NULL:
|
|
* temp_string = buf_vlen[0]
|
|
* temp_string_len = strlen(temp_string) # <<<<<<<<<<<<<<
|
|
*
|
|
* if temp_string_len <= sizes[0].dst_size:
|
|
*/
|
|
__pyx_v_temp_string_len = strlen(__pyx_v_temp_string);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":221
|
|
* temp_string_len = strlen(temp_string)
|
|
*
|
|
* if temp_string_len <= sizes[0].dst_size: # <<<<<<<<<<<<<<
|
|
* # Pad with zeros
|
|
* memcpy(buf_fixed, temp_string, temp_string_len)
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_temp_string_len <= (__pyx_v_sizes[0]).dst_size);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":223
|
|
* if temp_string_len <= sizes[0].dst_size:
|
|
* # Pad with zeros
|
|
* memcpy(buf_fixed, temp_string, temp_string_len) # <<<<<<<<<<<<<<
|
|
* memset(buf_fixed + temp_string_len, c'\0', sizes[0].dst_size - temp_string_len)
|
|
* else:
|
|
*/
|
|
memcpy(__pyx_v_buf_fixed, __pyx_v_temp_string, __pyx_v_temp_string_len);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":224
|
|
* # Pad with zeros
|
|
* memcpy(buf_fixed, temp_string, temp_string_len)
|
|
* memset(buf_fixed + temp_string_len, c'\0', sizes[0].dst_size - temp_string_len) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* # Simply truncate the string
|
|
*/
|
|
memset((__pyx_v_buf_fixed + __pyx_v_temp_string_len), '\x00', ((__pyx_v_sizes[0]).dst_size - __pyx_v_temp_string_len));
|
|
goto __pyx_L4;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":227
|
|
* else:
|
|
* # Simply truncate the string
|
|
* memcpy(buf_fixed, temp_string, sizes[0].dst_size) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* memset(buf_fixed, c'\0', sizes[0].dst_size)
|
|
*/
|
|
memcpy(__pyx_v_buf_fixed, __pyx_v_temp_string, (__pyx_v_sizes[0]).dst_size);
|
|
}
|
|
__pyx_L4:;
|
|
goto __pyx_L3;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":229
|
|
* memcpy(buf_fixed, temp_string, sizes[0].dst_size)
|
|
* else:
|
|
* memset(buf_fixed, c'\0', sizes[0].dst_size) # <<<<<<<<<<<<<<
|
|
*
|
|
* return 0
|
|
*/
|
|
memset(__pyx_v_buf_fixed, '\x00', (__pyx_v_sizes[0]).dst_size);
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":231
|
|
* memset(buf_fixed, c'\0', sizes[0].dst_size)
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int conv_fixed2vlen(void* ipt, void* opt, void* bkg, void* priv) except -1:
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":233
|
|
* return 0
|
|
*
|
|
* cdef int conv_fixed2vlen(void* ipt, void* opt, void* bkg, void* priv) except -1: # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef char** buf_vlen = <char**>opt
|
|
*/
|
|
|
|
static int __pyx_f_4h5py_5_conv_conv_fixed2vlen(void *__pyx_v_ipt, void *__pyx_v_opt, void *__pyx_v_bkg, void *__pyx_v_priv) {
|
|
char **__pyx_v_buf_vlen;
|
|
char *__pyx_v_buf_fixed;
|
|
char *__pyx_v_temp_string;
|
|
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_v_sizes;
|
|
int __pyx_r;
|
|
__Pyx_RefNannySetupContext("conv_fixed2vlen");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":235
|
|
* cdef int conv_fixed2vlen(void* ipt, void* opt, void* bkg, void* priv) except -1:
|
|
*
|
|
* cdef char** buf_vlen = <char**>opt # <<<<<<<<<<<<<<
|
|
* cdef char* buf_fixed = <char*>ipt
|
|
* cdef char* temp_string = NULL
|
|
*/
|
|
__pyx_v_buf_vlen = ((char **)__pyx_v_opt);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":236
|
|
*
|
|
* cdef char** buf_vlen = <char**>opt
|
|
* cdef char* buf_fixed = <char*>ipt # <<<<<<<<<<<<<<
|
|
* cdef char* temp_string = NULL
|
|
* cdef conv_size_t *sizes = <conv_size_t*>priv
|
|
*/
|
|
__pyx_v_buf_fixed = ((char *)__pyx_v_ipt);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":237
|
|
* cdef char** buf_vlen = <char**>opt
|
|
* cdef char* buf_fixed = <char*>ipt
|
|
* cdef char* temp_string = NULL # <<<<<<<<<<<<<<
|
|
* cdef conv_size_t *sizes = <conv_size_t*>priv
|
|
*
|
|
*/
|
|
__pyx_v_temp_string = NULL;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":238
|
|
* cdef char* buf_fixed = <char*>ipt
|
|
* cdef char* temp_string = NULL
|
|
* cdef conv_size_t *sizes = <conv_size_t*>priv # <<<<<<<<<<<<<<
|
|
*
|
|
* temp_string = <char*>malloc(sizes[0].src_size+1)
|
|
*/
|
|
__pyx_v_sizes = ((__pyx_t_4h5py_5_conv_conv_size_t *)__pyx_v_priv);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":240
|
|
* cdef conv_size_t *sizes = <conv_size_t*>priv
|
|
*
|
|
* temp_string = <char*>malloc(sizes[0].src_size+1) # <<<<<<<<<<<<<<
|
|
* memcpy(temp_string, buf_fixed, sizes[0].src_size)
|
|
* temp_string[sizes[0].src_size] = c'\0'
|
|
*/
|
|
__pyx_v_temp_string = ((char *)malloc(((__pyx_v_sizes[0]).src_size + 1)));
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":241
|
|
*
|
|
* temp_string = <char*>malloc(sizes[0].src_size+1)
|
|
* memcpy(temp_string, buf_fixed, sizes[0].src_size) # <<<<<<<<<<<<<<
|
|
* temp_string[sizes[0].src_size] = c'\0'
|
|
*
|
|
*/
|
|
memcpy(__pyx_v_temp_string, __pyx_v_buf_fixed, (__pyx_v_sizes[0]).src_size);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":242
|
|
* temp_string = <char*>malloc(sizes[0].src_size+1)
|
|
* memcpy(temp_string, buf_fixed, sizes[0].src_size)
|
|
* temp_string[sizes[0].src_size] = c'\0' # <<<<<<<<<<<<<<
|
|
*
|
|
* buf_vlen[0] = temp_string
|
|
*/
|
|
(__pyx_v_temp_string[(__pyx_v_sizes[0]).src_size]) = '\x00';
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":244
|
|
* temp_string[sizes[0].src_size] = c'\0'
|
|
*
|
|
* buf_vlen[0] = temp_string # <<<<<<<<<<<<<<
|
|
*
|
|
* return 0
|
|
*/
|
|
(__pyx_v_buf_vlen[0]) = __pyx_v_temp_string;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":246
|
|
* buf_vlen[0] = temp_string
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* # =============================================================================
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":251
|
|
* # HDF5 references to Python instances of h5r.Reference
|
|
*
|
|
* cdef int conv_objref2pyref(void* ipt, void* opt, void* bkg, void* priv) except -1: # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>opt
|
|
*/
|
|
|
|
static int __pyx_f_4h5py_5_conv_conv_objref2pyref(void *__pyx_v_ipt, void *__pyx_v_opt, void *__pyx_v_bkg, void *__pyx_v_priv) {
|
|
PyObject **__pyx_v_buf_obj;
|
|
PyObject **__pyx_v_bkg_obj;
|
|
hobj_ref_t *__pyx_v_buf_ref;
|
|
struct __pyx_obj_4h5py_3h5r_Reference *__pyx_v_ref = 0;
|
|
PyObject *__pyx_v_ref_ptr;
|
|
int __pyx_r;
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("conv_objref2pyref");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":253
|
|
* cdef int conv_objref2pyref(void* ipt, void* opt, void* bkg, void* priv) except -1:
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>opt # <<<<<<<<<<<<<<
|
|
* cdef PyObject** bkg_obj = <PyObject**>bkg
|
|
* cdef hobj_ref_t* buf_ref = <hobj_ref_t*>ipt
|
|
*/
|
|
__pyx_v_buf_obj = ((PyObject **)__pyx_v_opt);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":254
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>opt
|
|
* cdef PyObject** bkg_obj = <PyObject**>bkg # <<<<<<<<<<<<<<
|
|
* cdef hobj_ref_t* buf_ref = <hobj_ref_t*>ipt
|
|
*
|
|
*/
|
|
__pyx_v_bkg_obj = ((PyObject **)__pyx_v_bkg);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":255
|
|
* cdef PyObject** buf_obj = <PyObject**>opt
|
|
* cdef PyObject** bkg_obj = <PyObject**>bkg
|
|
* cdef hobj_ref_t* buf_ref = <hobj_ref_t*>ipt # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef Reference ref = Reference()
|
|
*/
|
|
__pyx_v_buf_ref = ((hobj_ref_t *)__pyx_v_ipt);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":257
|
|
* cdef hobj_ref_t* buf_ref = <hobj_ref_t*>ipt
|
|
*
|
|
* cdef Reference ref = Reference() # <<<<<<<<<<<<<<
|
|
* cdef PyObject* ref_ptr = NULL
|
|
*
|
|
*/
|
|
__pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4h5py_3h5r_Reference)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v_ref = ((struct __pyx_obj_4h5py_3h5r_Reference *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":258
|
|
*
|
|
* cdef Reference ref = Reference()
|
|
* cdef PyObject* ref_ptr = NULL # <<<<<<<<<<<<<<
|
|
*
|
|
* ref.ref.obj_ref = buf_ref[0]
|
|
*/
|
|
__pyx_v_ref_ptr = NULL;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":260
|
|
* cdef PyObject* ref_ptr = NULL
|
|
*
|
|
* ref.ref.obj_ref = buf_ref[0] # <<<<<<<<<<<<<<
|
|
* ref.typecode = H5R_OBJECT
|
|
*
|
|
*/
|
|
__pyx_v_ref->ref.obj_ref = (__pyx_v_buf_ref[0]);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":261
|
|
*
|
|
* ref.ref.obj_ref = buf_ref[0]
|
|
* ref.typecode = H5R_OBJECT # <<<<<<<<<<<<<<
|
|
*
|
|
* ref_ptr = <PyObject*>ref
|
|
*/
|
|
__pyx_v_ref->typecode = H5R_OBJECT;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":263
|
|
* ref.typecode = H5R_OBJECT
|
|
*
|
|
* ref_ptr = <PyObject*>ref # <<<<<<<<<<<<<<
|
|
* Py_INCREF(ref_ptr) # because Cython discards its reference when the
|
|
* # function exits
|
|
*/
|
|
__pyx_v_ref_ptr = ((PyObject *)__pyx_v_ref);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":264
|
|
*
|
|
* ref_ptr = <PyObject*>ref
|
|
* Py_INCREF(ref_ptr) # because Cython discards its reference when the # <<<<<<<<<<<<<<
|
|
* # function exits
|
|
*
|
|
*/
|
|
Py_INCREF(__pyx_v_ref_ptr);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":267
|
|
* # function exits
|
|
*
|
|
* Py_XDECREF(bkg_obj[0]) # <<<<<<<<<<<<<<
|
|
* buf_obj[0] = ref_ptr
|
|
*
|
|
*/
|
|
Py_XDECREF((__pyx_v_bkg_obj[0]));
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":268
|
|
*
|
|
* Py_XDECREF(bkg_obj[0])
|
|
* buf_obj[0] = ref_ptr # <<<<<<<<<<<<<<
|
|
*
|
|
* return 0
|
|
*/
|
|
(__pyx_v_buf_obj[0]) = __pyx_v_ref_ptr;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":270
|
|
* buf_obj[0] = ref_ptr
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int conv_pyref2objref(void* ipt, void* opt, void* bkg, void* priv) except -1:
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("h5py._conv.conv_objref2pyref");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_ref);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":272
|
|
* return 0
|
|
*
|
|
* cdef int conv_pyref2objref(void* ipt, void* opt, void* bkg, void* priv) except -1: # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>ipt
|
|
*/
|
|
|
|
static int __pyx_f_4h5py_5_conv_conv_pyref2objref(void *__pyx_v_ipt, void *__pyx_v_opt, void *__pyx_v_bkg, void *__pyx_v_priv) {
|
|
PyObject **__pyx_v_buf_obj;
|
|
hobj_ref_t *__pyx_v_buf_ref;
|
|
PyObject *__pyx_v_obj;
|
|
struct __pyx_obj_4h5py_3h5r_Reference *__pyx_v_ref;
|
|
int __pyx_r;
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("conv_pyref2objref");
|
|
__pyx_v_obj = Py_None; __Pyx_INCREF(Py_None);
|
|
__pyx_v_ref = ((struct __pyx_obj_4h5py_3h5r_Reference *)Py_None); __Pyx_INCREF(Py_None);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":274
|
|
* cdef int conv_pyref2objref(void* ipt, void* opt, void* bkg, void* priv) except -1:
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>ipt # <<<<<<<<<<<<<<
|
|
* cdef hobj_ref_t* buf_ref = <hobj_ref_t*>opt
|
|
*
|
|
*/
|
|
__pyx_v_buf_obj = ((PyObject **)__pyx_v_ipt);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":275
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>ipt
|
|
* cdef hobj_ref_t* buf_ref = <hobj_ref_t*>opt # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef object obj
|
|
*/
|
|
__pyx_v_buf_ref = ((hobj_ref_t *)__pyx_v_opt);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":280
|
|
* cdef Reference ref
|
|
*
|
|
* if buf_obj[0] != NULL and buf_obj[0] != Py_None: # <<<<<<<<<<<<<<
|
|
* obj = <object>(buf_obj[0])
|
|
* if not isinstance(obj, Reference):
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v_buf_obj[0]) != NULL);
|
|
if (__pyx_t_1) {
|
|
__pyx_t_2 = ((__pyx_v_buf_obj[0]) != Py_None);
|
|
__pyx_t_3 = __pyx_t_2;
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_1;
|
|
}
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":281
|
|
*
|
|
* if buf_obj[0] != NULL and buf_obj[0] != Py_None:
|
|
* obj = <object>(buf_obj[0]) # <<<<<<<<<<<<<<
|
|
* if not isinstance(obj, Reference):
|
|
* raise TypeError("Can't convert incompatible object to HDF5 object reference")
|
|
*/
|
|
__pyx_t_4 = (__pyx_v_buf_obj[0]);
|
|
__Pyx_INCREF(((PyObject *)__pyx_t_4));
|
|
__Pyx_DECREF(__pyx_v_obj);
|
|
__pyx_v_obj = ((PyObject *)__pyx_t_4);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":282
|
|
* if buf_obj[0] != NULL and buf_obj[0] != Py_None:
|
|
* obj = <object>(buf_obj[0])
|
|
* if not isinstance(obj, Reference): # <<<<<<<<<<<<<<
|
|
* raise TypeError("Can't convert incompatible object to HDF5 object reference")
|
|
* ref = <Reference>(buf_obj[0])
|
|
*/
|
|
__pyx_t_3 = PyObject_TypeCheck(__pyx_v_obj, ((PyTypeObject *)((PyObject*)__pyx_ptype_4h5py_3h5r_Reference)));
|
|
__pyx_t_1 = (!__pyx_t_3);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":283
|
|
* obj = <object>(buf_obj[0])
|
|
* if not isinstance(obj, Reference):
|
|
* raise TypeError("Can't convert incompatible object to HDF5 object reference") # <<<<<<<<<<<<<<
|
|
* ref = <Reference>(buf_obj[0])
|
|
* buf_ref[0] = ref.ref.obj_ref
|
|
*/
|
|
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
|
|
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_4));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
|
|
__pyx_t_6 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_Raise(__pyx_t_6, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L4;
|
|
}
|
|
__pyx_L4:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":284
|
|
* if not isinstance(obj, Reference):
|
|
* raise TypeError("Can't convert incompatible object to HDF5 object reference")
|
|
* ref = <Reference>(buf_obj[0]) # <<<<<<<<<<<<<<
|
|
* buf_ref[0] = ref.ref.obj_ref
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = (__pyx_v_buf_obj[0]);
|
|
__Pyx_INCREF(((PyObject *)((struct __pyx_obj_4h5py_3h5r_Reference *)__pyx_t_4)));
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_ref));
|
|
__pyx_v_ref = ((struct __pyx_obj_4h5py_3h5r_Reference *)__pyx_t_4);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":285
|
|
* raise TypeError("Can't convert incompatible object to HDF5 object reference")
|
|
* ref = <Reference>(buf_obj[0])
|
|
* buf_ref[0] = ref.ref.obj_ref # <<<<<<<<<<<<<<
|
|
* else:
|
|
* memset(buf_ref, c'\0', sizeof(hobj_ref_t))
|
|
*/
|
|
(__pyx_v_buf_ref[0]) = __pyx_v_ref->ref.obj_ref;
|
|
goto __pyx_L3;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":287
|
|
* buf_ref[0] = ref.ref.obj_ref
|
|
* else:
|
|
* memset(buf_ref, c'\0', sizeof(hobj_ref_t)) # <<<<<<<<<<<<<<
|
|
*
|
|
* return 0
|
|
*/
|
|
memset(__pyx_v_buf_ref, '\x00', (sizeof(hobj_ref_t)));
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":289
|
|
* memset(buf_ref, c'\0', sizeof(hobj_ref_t))
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int conv_regref2pyref(void* ipt, void* opt, void* bkg, void* priv) except -1:
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("h5py._conv.conv_pyref2objref");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF(__pyx_v_obj);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_ref);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":291
|
|
* return 0
|
|
*
|
|
* cdef int conv_regref2pyref(void* ipt, void* opt, void* bkg, void* priv) except -1: # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>opt
|
|
*/
|
|
|
|
static int __pyx_f_4h5py_5_conv_conv_regref2pyref(void *__pyx_v_ipt, void *__pyx_v_opt, void *__pyx_v_bkg, void *__pyx_v_priv) {
|
|
PyObject **__pyx_v_buf_obj;
|
|
PyObject **__pyx_v_bkg_obj;
|
|
hdset_reg_ref_t *__pyx_v_buf_ref;
|
|
struct __pyx_obj_4h5py_3h5r_RegionReference *__pyx_v_ref = 0;
|
|
PyObject *__pyx_v_ref_ptr;
|
|
int __pyx_r;
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("conv_regref2pyref");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":293
|
|
* cdef int conv_regref2pyref(void* ipt, void* opt, void* bkg, void* priv) except -1:
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>opt # <<<<<<<<<<<<<<
|
|
* cdef PyObject** bkg_obj = <PyObject**>bkg
|
|
* cdef hdset_reg_ref_t* buf_ref = <hdset_reg_ref_t*>ipt
|
|
*/
|
|
__pyx_v_buf_obj = ((PyObject **)__pyx_v_opt);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":294
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>opt
|
|
* cdef PyObject** bkg_obj = <PyObject**>bkg # <<<<<<<<<<<<<<
|
|
* cdef hdset_reg_ref_t* buf_ref = <hdset_reg_ref_t*>ipt
|
|
*
|
|
*/
|
|
__pyx_v_bkg_obj = ((PyObject **)__pyx_v_bkg);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":295
|
|
* cdef PyObject** buf_obj = <PyObject**>opt
|
|
* cdef PyObject** bkg_obj = <PyObject**>bkg
|
|
* cdef hdset_reg_ref_t* buf_ref = <hdset_reg_ref_t*>ipt # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef RegionReference ref = RegionReference()
|
|
*/
|
|
__pyx_v_buf_ref = ((hdset_reg_ref_t *)__pyx_v_ipt);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":297
|
|
* cdef hdset_reg_ref_t* buf_ref = <hdset_reg_ref_t*>ipt
|
|
*
|
|
* cdef RegionReference ref = RegionReference() # <<<<<<<<<<<<<<
|
|
* cdef PyObject* ref_ptr = NULL
|
|
*
|
|
*/
|
|
__pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4h5py_3h5r_RegionReference)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v_ref = ((struct __pyx_obj_4h5py_3h5r_RegionReference *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":298
|
|
*
|
|
* cdef RegionReference ref = RegionReference()
|
|
* cdef PyObject* ref_ptr = NULL # <<<<<<<<<<<<<<
|
|
*
|
|
* memcpy(ref.ref.reg_ref, buf_ref, sizeof(hdset_reg_ref_t))
|
|
*/
|
|
__pyx_v_ref_ptr = NULL;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":300
|
|
* cdef PyObject* ref_ptr = NULL
|
|
*
|
|
* memcpy(ref.ref.reg_ref, buf_ref, sizeof(hdset_reg_ref_t)) # <<<<<<<<<<<<<<
|
|
*
|
|
* ref.typecode = H5R_DATASET_REGION
|
|
*/
|
|
memcpy(__pyx_v_ref->__pyx_base.ref.reg_ref, __pyx_v_buf_ref, (sizeof(hdset_reg_ref_t)));
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":302
|
|
* memcpy(ref.ref.reg_ref, buf_ref, sizeof(hdset_reg_ref_t))
|
|
*
|
|
* ref.typecode = H5R_DATASET_REGION # <<<<<<<<<<<<<<
|
|
*
|
|
* ref_ptr = <PyObject*>ref
|
|
*/
|
|
__pyx_v_ref->__pyx_base.typecode = H5R_DATASET_REGION;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":304
|
|
* ref.typecode = H5R_DATASET_REGION
|
|
*
|
|
* ref_ptr = <PyObject*>ref # <<<<<<<<<<<<<<
|
|
* Py_INCREF(ref_ptr) # because Cython discards its reference when the
|
|
* # function exits
|
|
*/
|
|
__pyx_v_ref_ptr = ((PyObject *)__pyx_v_ref);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":305
|
|
*
|
|
* ref_ptr = <PyObject*>ref
|
|
* Py_INCREF(ref_ptr) # because Cython discards its reference when the # <<<<<<<<<<<<<<
|
|
* # function exits
|
|
*
|
|
*/
|
|
Py_INCREF(__pyx_v_ref_ptr);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":308
|
|
* # function exits
|
|
*
|
|
* Py_XDECREF(bkg_obj[0]) # <<<<<<<<<<<<<<
|
|
* buf_obj[0] = ref_ptr
|
|
*
|
|
*/
|
|
Py_XDECREF((__pyx_v_bkg_obj[0]));
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":309
|
|
*
|
|
* Py_XDECREF(bkg_obj[0])
|
|
* buf_obj[0] = ref_ptr # <<<<<<<<<<<<<<
|
|
*
|
|
* return 0
|
|
*/
|
|
(__pyx_v_buf_obj[0]) = __pyx_v_ref_ptr;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":311
|
|
* buf_obj[0] = ref_ptr
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int conv_pyref2regref(void* ipt, void* opt, void* bkg, void* priv) except -1:
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("h5py._conv.conv_regref2pyref");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_ref);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":313
|
|
* return 0
|
|
*
|
|
* cdef int conv_pyref2regref(void* ipt, void* opt, void* bkg, void* priv) except -1: # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>ipt
|
|
*/
|
|
|
|
static int __pyx_f_4h5py_5_conv_conv_pyref2regref(void *__pyx_v_ipt, void *__pyx_v_opt, void *__pyx_v_bkg, void *__pyx_v_priv) {
|
|
PyObject **__pyx_v_buf_obj;
|
|
hdset_reg_ref_t *__pyx_v_buf_ref;
|
|
PyObject *__pyx_v_obj;
|
|
struct __pyx_obj_4h5py_3h5r_RegionReference *__pyx_v_ref;
|
|
int __pyx_r;
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("conv_pyref2regref");
|
|
__pyx_v_obj = Py_None; __Pyx_INCREF(Py_None);
|
|
__pyx_v_ref = ((struct __pyx_obj_4h5py_3h5r_RegionReference *)Py_None); __Pyx_INCREF(Py_None);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":315
|
|
* cdef int conv_pyref2regref(void* ipt, void* opt, void* bkg, void* priv) except -1:
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>ipt # <<<<<<<<<<<<<<
|
|
* cdef hdset_reg_ref_t* buf_ref = <hdset_reg_ref_t*>opt
|
|
*
|
|
*/
|
|
__pyx_v_buf_obj = ((PyObject **)__pyx_v_ipt);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":316
|
|
*
|
|
* cdef PyObject** buf_obj = <PyObject**>ipt
|
|
* cdef hdset_reg_ref_t* buf_ref = <hdset_reg_ref_t*>opt # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef object obj
|
|
*/
|
|
__pyx_v_buf_ref = ((hdset_reg_ref_t *)__pyx_v_opt);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":321
|
|
* cdef RegionReference ref
|
|
*
|
|
* if buf_obj[0] != NULL and buf_obj[0] != Py_None: # <<<<<<<<<<<<<<
|
|
* obj = <object>(buf_obj[0])
|
|
* if not isinstance(obj, RegionReference):
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v_buf_obj[0]) != NULL);
|
|
if (__pyx_t_1) {
|
|
__pyx_t_2 = ((__pyx_v_buf_obj[0]) != Py_None);
|
|
__pyx_t_3 = __pyx_t_2;
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_1;
|
|
}
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":322
|
|
*
|
|
* if buf_obj[0] != NULL and buf_obj[0] != Py_None:
|
|
* obj = <object>(buf_obj[0]) # <<<<<<<<<<<<<<
|
|
* if not isinstance(obj, RegionReference):
|
|
* raise TypeError("Can't convert incompatible object to HDF5 region reference")
|
|
*/
|
|
__pyx_t_4 = (__pyx_v_buf_obj[0]);
|
|
__Pyx_INCREF(((PyObject *)__pyx_t_4));
|
|
__Pyx_DECREF(__pyx_v_obj);
|
|
__pyx_v_obj = ((PyObject *)__pyx_t_4);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":323
|
|
* if buf_obj[0] != NULL and buf_obj[0] != Py_None:
|
|
* obj = <object>(buf_obj[0])
|
|
* if not isinstance(obj, RegionReference): # <<<<<<<<<<<<<<
|
|
* raise TypeError("Can't convert incompatible object to HDF5 region reference")
|
|
* ref = <RegionReference>(buf_obj[0])
|
|
*/
|
|
__pyx_t_3 = PyObject_TypeCheck(__pyx_v_obj, ((PyTypeObject *)((PyObject*)__pyx_ptype_4h5py_3h5r_RegionReference)));
|
|
__pyx_t_1 = (!__pyx_t_3);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":324
|
|
* obj = <object>(buf_obj[0])
|
|
* if not isinstance(obj, RegionReference):
|
|
* raise TypeError("Can't convert incompatible object to HDF5 region reference") # <<<<<<<<<<<<<<
|
|
* ref = <RegionReference>(buf_obj[0])
|
|
* memcpy(buf_ref, ref.ref.reg_ref, sizeof(hdset_reg_ref_t))
|
|
*/
|
|
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
|
|
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_5));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
|
|
__pyx_t_6 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_Raise(__pyx_t_6, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L4;
|
|
}
|
|
__pyx_L4:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":325
|
|
* if not isinstance(obj, RegionReference):
|
|
* raise TypeError("Can't convert incompatible object to HDF5 region reference")
|
|
* ref = <RegionReference>(buf_obj[0]) # <<<<<<<<<<<<<<
|
|
* memcpy(buf_ref, ref.ref.reg_ref, sizeof(hdset_reg_ref_t))
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = (__pyx_v_buf_obj[0]);
|
|
__Pyx_INCREF(((PyObject *)((struct __pyx_obj_4h5py_3h5r_RegionReference *)__pyx_t_4)));
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_ref));
|
|
__pyx_v_ref = ((struct __pyx_obj_4h5py_3h5r_RegionReference *)__pyx_t_4);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":326
|
|
* raise TypeError("Can't convert incompatible object to HDF5 region reference")
|
|
* ref = <RegionReference>(buf_obj[0])
|
|
* memcpy(buf_ref, ref.ref.reg_ref, sizeof(hdset_reg_ref_t)) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* memset(buf_ref, c'\0', sizeof(hdset_reg_ref_t))
|
|
*/
|
|
memcpy(__pyx_v_buf_ref, __pyx_v_ref->__pyx_base.ref.reg_ref, (sizeof(hdset_reg_ref_t)));
|
|
goto __pyx_L3;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":328
|
|
* memcpy(buf_ref, ref.ref.reg_ref, sizeof(hdset_reg_ref_t))
|
|
* else:
|
|
* memset(buf_ref, c'\0', sizeof(hdset_reg_ref_t)) # <<<<<<<<<<<<<<
|
|
*
|
|
* return 0
|
|
*/
|
|
memset(__pyx_v_buf_ref, '\x00', (sizeof(hdset_reg_ref_t)));
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":330
|
|
* memset(buf_ref, c'\0', sizeof(hdset_reg_ref_t))
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* # =============================================================================
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("h5py._conv.conv_pyref2regref");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF(__pyx_v_obj);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_ref);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":336
|
|
*
|
|
*
|
|
* cdef herr_t vlen2str(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
|
|
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
*/
|
|
|
|
static herr_t __pyx_f_4h5py_5_conv_vlen2str(hid_t __pyx_v_src_id, hid_t __pyx_v_dst_id, H5T_cdata_t *__pyx_v_cdata, size_t __pyx_v_nl, size_t __pyx_v_buf_stride, size_t __pyx_v_bkg_stride, void *__pyx_v_buf_i, void *__pyx_v_bkg_i, hid_t __pyx_v_dxpl) {
|
|
herr_t __pyx_r;
|
|
herr_t __pyx_t_1;
|
|
__Pyx_RefNannySetupContext("vlen2str");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":340
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
* return generic_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
|
|
* buf_i, bkg_i, dxpl, conv_vlen2str, init_generic, H5T_BKG_YES) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef herr_t str2vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
|
*/
|
|
__pyx_t_1 = __pyx_f_4h5py_5_conv_generic_converter(__pyx_v_src_id, __pyx_v_dst_id, __pyx_v_cdata, __pyx_v_nl, __pyx_v_buf_stride, __pyx_v_bkg_stride, __pyx_v_buf_i, __pyx_v_bkg_i, __pyx_v_dxpl, __pyx_f_4h5py_5_conv_conv_vlen2str, __pyx_f_4h5py_5_conv_init_generic, H5T_BKG_YES); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_r = __pyx_t_1;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.vlen2str");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":342
|
|
* buf_i, bkg_i, dxpl, conv_vlen2str, init_generic, H5T_BKG_YES)
|
|
*
|
|
* cdef herr_t str2vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
|
|
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
*/
|
|
|
|
static herr_t __pyx_f_4h5py_5_conv_str2vlen(hid_t __pyx_v_src_id, hid_t __pyx_v_dst_id, H5T_cdata_t *__pyx_v_cdata, size_t __pyx_v_nl, size_t __pyx_v_buf_stride, size_t __pyx_v_bkg_stride, void *__pyx_v_buf_i, void *__pyx_v_bkg_i, hid_t __pyx_v_dxpl) {
|
|
herr_t __pyx_r;
|
|
herr_t __pyx_t_1;
|
|
__Pyx_RefNannySetupContext("str2vlen");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":346
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
* return generic_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
|
|
* buf_i, bkg_i, dxpl, conv_str2vlen, init_generic, H5T_BKG_NO) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef herr_t vlen2fixed(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
|
*/
|
|
__pyx_t_1 = __pyx_f_4h5py_5_conv_generic_converter(__pyx_v_src_id, __pyx_v_dst_id, __pyx_v_cdata, __pyx_v_nl, __pyx_v_buf_stride, __pyx_v_bkg_stride, __pyx_v_buf_i, __pyx_v_bkg_i, __pyx_v_dxpl, __pyx_f_4h5py_5_conv_conv_str2vlen, __pyx_f_4h5py_5_conv_init_generic, H5T_BKG_NO); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_r = __pyx_t_1;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.str2vlen");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":348
|
|
* buf_i, bkg_i, dxpl, conv_str2vlen, init_generic, H5T_BKG_NO)
|
|
*
|
|
* cdef herr_t vlen2fixed(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
|
|
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
*/
|
|
|
|
static herr_t __pyx_f_4h5py_5_conv_vlen2fixed(hid_t __pyx_v_src_id, hid_t __pyx_v_dst_id, H5T_cdata_t *__pyx_v_cdata, size_t __pyx_v_nl, size_t __pyx_v_buf_stride, size_t __pyx_v_bkg_stride, void *__pyx_v_buf_i, void *__pyx_v_bkg_i, hid_t __pyx_v_dxpl) {
|
|
herr_t __pyx_r;
|
|
herr_t __pyx_t_1;
|
|
__Pyx_RefNannySetupContext("vlen2fixed");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":352
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
* return generic_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
|
|
* buf_i, bkg_i, dxpl, conv_vlen2fixed, init_vlen2fixed, H5T_BKG_NO) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef herr_t fixed2vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
|
*/
|
|
__pyx_t_1 = __pyx_f_4h5py_5_conv_generic_converter(__pyx_v_src_id, __pyx_v_dst_id, __pyx_v_cdata, __pyx_v_nl, __pyx_v_buf_stride, __pyx_v_bkg_stride, __pyx_v_buf_i, __pyx_v_bkg_i, __pyx_v_dxpl, __pyx_f_4h5py_5_conv_conv_vlen2fixed, __pyx_f_4h5py_5_conv_init_vlen2fixed, H5T_BKG_NO); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_r = __pyx_t_1;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.vlen2fixed");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":354
|
|
* buf_i, bkg_i, dxpl, conv_vlen2fixed, init_vlen2fixed, H5T_BKG_NO)
|
|
*
|
|
* cdef herr_t fixed2vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
|
|
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
*/
|
|
|
|
static herr_t __pyx_f_4h5py_5_conv_fixed2vlen(hid_t __pyx_v_src_id, hid_t __pyx_v_dst_id, H5T_cdata_t *__pyx_v_cdata, size_t __pyx_v_nl, size_t __pyx_v_buf_stride, size_t __pyx_v_bkg_stride, void *__pyx_v_buf_i, void *__pyx_v_bkg_i, hid_t __pyx_v_dxpl) {
|
|
herr_t __pyx_r;
|
|
herr_t __pyx_t_1;
|
|
__Pyx_RefNannySetupContext("fixed2vlen");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":358
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
* return generic_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
|
|
* buf_i, bkg_i, dxpl, conv_fixed2vlen, init_fixed2vlen, H5T_BKG_NO) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef herr_t objref2pyref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
|
*/
|
|
__pyx_t_1 = __pyx_f_4h5py_5_conv_generic_converter(__pyx_v_src_id, __pyx_v_dst_id, __pyx_v_cdata, __pyx_v_nl, __pyx_v_buf_stride, __pyx_v_bkg_stride, __pyx_v_buf_i, __pyx_v_bkg_i, __pyx_v_dxpl, __pyx_f_4h5py_5_conv_conv_fixed2vlen, __pyx_f_4h5py_5_conv_init_fixed2vlen, H5T_BKG_NO); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_r = __pyx_t_1;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.fixed2vlen");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":360
|
|
* buf_i, bkg_i, dxpl, conv_fixed2vlen, init_fixed2vlen, H5T_BKG_NO)
|
|
*
|
|
* cdef herr_t objref2pyref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
|
|
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
*/
|
|
|
|
static herr_t __pyx_f_4h5py_5_conv_objref2pyref(hid_t __pyx_v_src_id, hid_t __pyx_v_dst_id, H5T_cdata_t *__pyx_v_cdata, size_t __pyx_v_nl, size_t __pyx_v_buf_stride, size_t __pyx_v_bkg_stride, void *__pyx_v_buf_i, void *__pyx_v_bkg_i, hid_t __pyx_v_dxpl) {
|
|
herr_t __pyx_r;
|
|
herr_t __pyx_t_1;
|
|
__Pyx_RefNannySetupContext("objref2pyref");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":364
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
* return generic_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
|
|
* buf_i, bkg_i, dxpl, conv_objref2pyref, init_generic, H5T_BKG_YES) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef herr_t pyref2objref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
|
*/
|
|
__pyx_t_1 = __pyx_f_4h5py_5_conv_generic_converter(__pyx_v_src_id, __pyx_v_dst_id, __pyx_v_cdata, __pyx_v_nl, __pyx_v_buf_stride, __pyx_v_bkg_stride, __pyx_v_buf_i, __pyx_v_bkg_i, __pyx_v_dxpl, __pyx_f_4h5py_5_conv_conv_objref2pyref, __pyx_f_4h5py_5_conv_init_generic, H5T_BKG_YES); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_r = __pyx_t_1;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.objref2pyref");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":366
|
|
* buf_i, bkg_i, dxpl, conv_objref2pyref, init_generic, H5T_BKG_YES)
|
|
*
|
|
* cdef herr_t pyref2objref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
|
|
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
*/
|
|
|
|
static herr_t __pyx_f_4h5py_5_conv_pyref2objref(hid_t __pyx_v_src_id, hid_t __pyx_v_dst_id, H5T_cdata_t *__pyx_v_cdata, size_t __pyx_v_nl, size_t __pyx_v_buf_stride, size_t __pyx_v_bkg_stride, void *__pyx_v_buf_i, void *__pyx_v_bkg_i, hid_t __pyx_v_dxpl) {
|
|
herr_t __pyx_r;
|
|
herr_t __pyx_t_1;
|
|
__Pyx_RefNannySetupContext("pyref2objref");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":370
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
* return generic_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
|
|
* buf_i, bkg_i, dxpl, conv_pyref2objref, init_generic, H5T_BKG_NO) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef herr_t regref2pyref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
|
*/
|
|
__pyx_t_1 = __pyx_f_4h5py_5_conv_generic_converter(__pyx_v_src_id, __pyx_v_dst_id, __pyx_v_cdata, __pyx_v_nl, __pyx_v_buf_stride, __pyx_v_bkg_stride, __pyx_v_buf_i, __pyx_v_bkg_i, __pyx_v_dxpl, __pyx_f_4h5py_5_conv_conv_pyref2objref, __pyx_f_4h5py_5_conv_init_generic, H5T_BKG_NO); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_r = __pyx_t_1;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.pyref2objref");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":372
|
|
* buf_i, bkg_i, dxpl, conv_pyref2objref, init_generic, H5T_BKG_NO)
|
|
*
|
|
* cdef herr_t regref2pyref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
|
|
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
*/
|
|
|
|
static herr_t __pyx_f_4h5py_5_conv_regref2pyref(hid_t __pyx_v_src_id, hid_t __pyx_v_dst_id, H5T_cdata_t *__pyx_v_cdata, size_t __pyx_v_nl, size_t __pyx_v_buf_stride, size_t __pyx_v_bkg_stride, void *__pyx_v_buf_i, void *__pyx_v_bkg_i, hid_t __pyx_v_dxpl) {
|
|
herr_t __pyx_r;
|
|
herr_t __pyx_t_1;
|
|
__Pyx_RefNannySetupContext("regref2pyref");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":376
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
* return generic_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
|
|
* buf_i, bkg_i, dxpl, conv_regref2pyref, init_generic, H5T_BKG_YES) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef herr_t pyref2regref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
|
*/
|
|
__pyx_t_1 = __pyx_f_4h5py_5_conv_generic_converter(__pyx_v_src_id, __pyx_v_dst_id, __pyx_v_cdata, __pyx_v_nl, __pyx_v_buf_stride, __pyx_v_bkg_stride, __pyx_v_buf_i, __pyx_v_bkg_i, __pyx_v_dxpl, __pyx_f_4h5py_5_conv_conv_regref2pyref, __pyx_f_4h5py_5_conv_init_generic, H5T_BKG_YES); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_r = __pyx_t_1;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.regref2pyref");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":378
|
|
* buf_i, bkg_i, dxpl, conv_regref2pyref, init_generic, H5T_BKG_YES)
|
|
*
|
|
* cdef herr_t pyref2regref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
|
|
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
*/
|
|
|
|
static herr_t __pyx_f_4h5py_5_conv_pyref2regref(hid_t __pyx_v_src_id, hid_t __pyx_v_dst_id, H5T_cdata_t *__pyx_v_cdata, size_t __pyx_v_nl, size_t __pyx_v_buf_stride, size_t __pyx_v_bkg_stride, void *__pyx_v_buf_i, void *__pyx_v_bkg_i, hid_t __pyx_v_dxpl) {
|
|
herr_t __pyx_r;
|
|
herr_t __pyx_t_1;
|
|
__Pyx_RefNannySetupContext("pyref2regref");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":382
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
* return generic_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
|
|
* buf_i, bkg_i, dxpl, conv_pyref2regref, init_generic, H5T_BKG_NO) # <<<<<<<<<<<<<<
|
|
*
|
|
* # =============================================================================
|
|
*/
|
|
__pyx_t_1 = __pyx_f_4h5py_5_conv_generic_converter(__pyx_v_src_id, __pyx_v_dst_id, __pyx_v_cdata, __pyx_v_nl, __pyx_v_buf_stride, __pyx_v_bkg_stride, __pyx_v_buf_i, __pyx_v_bkg_i, __pyx_v_dxpl, __pyx_f_4h5py_5_conv_conv_pyref2regref, __pyx_f_4h5py_5_conv_init_generic, H5T_BKG_NO); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_r = __pyx_t_1;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.pyref2regref");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":394
|
|
*
|
|
* # Direction ("forward"): 1 = enum to int, 0 = int to enum
|
|
* cdef herr_t enum_int_converter(hid_t src, hid_t dst, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
|
|
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
|
|
* void *bkg_i, hid_t dxpl, int forward) except -1 with gil:
|
|
*/
|
|
|
|
static herr_t __pyx_f_4h5py_5_conv_enum_int_converter(hid_t __pyx_v_src, hid_t __pyx_v_dst, H5T_cdata_t *__pyx_v_cdata, size_t __pyx_v_nl, size_t __pyx_v_buf_stride, size_t __pyx_v_bkg_stride, void *__pyx_v_buf_i, void *__pyx_v_bkg_i, hid_t __pyx_v_dxpl, int __pyx_v_forward) {
|
|
int __pyx_v_command;
|
|
struct __pyx_t_4h5py_5_conv_conv_enum_t *__pyx_v_info;
|
|
size_t __pyx_v_nalloc;
|
|
int __pyx_v_i;
|
|
char *__pyx_v_cbuf;
|
|
char *__pyx_v_buf;
|
|
herr_t __pyx_r;
|
|
int __pyx_t_1;
|
|
struct __pyx_t_4h5py_5_conv_conv_enum_t *__pyx_t_2;
|
|
size_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
hid_t __pyx_t_5;
|
|
htri_t __pyx_t_6;
|
|
herr_t __pyx_t_7;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
PyGILState_STATE _save = PyGILState_Ensure();
|
|
__Pyx_RefNannySetupContext("enum_int_converter");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":398
|
|
* void *bkg_i, hid_t dxpl, int forward) except -1 with gil:
|
|
*
|
|
* cdef int command = cdata[0].command # <<<<<<<<<<<<<<
|
|
* cdef conv_enum_t *info
|
|
* cdef size_t nalloc
|
|
*/
|
|
__pyx_v_command = (__pyx_v_cdata[0]).command;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":402
|
|
* cdef size_t nalloc
|
|
* cdef int i
|
|
* cdef char* cbuf = NULL # <<<<<<<<<<<<<<
|
|
* cdef char* buf = <char*>buf_i
|
|
*
|
|
*/
|
|
__pyx_v_cbuf = NULL;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":403
|
|
* cdef int i
|
|
* cdef char* cbuf = NULL
|
|
* cdef char* buf = <char*>buf_i # <<<<<<<<<<<<<<
|
|
*
|
|
* if command == H5T_CONV_INIT:
|
|
*/
|
|
__pyx_v_buf = ((char *)__pyx_v_buf_i);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":405
|
|
* cdef char* buf = <char*>buf_i
|
|
*
|
|
* if command == H5T_CONV_INIT: # <<<<<<<<<<<<<<
|
|
* cdata[0].need_bkg = H5T_BKG_NO
|
|
* cdata[0].priv = info = <conv_enum_t*>malloc(sizeof(conv_enum_t))
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_command == H5T_CONV_INIT);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":406
|
|
*
|
|
* if command == H5T_CONV_INIT:
|
|
* cdata[0].need_bkg = H5T_BKG_NO # <<<<<<<<<<<<<<
|
|
* cdata[0].priv = info = <conv_enum_t*>malloc(sizeof(conv_enum_t))
|
|
* info[0].src_size = H5Tget_size(src)
|
|
*/
|
|
(__pyx_v_cdata[0]).need_bkg = H5T_BKG_NO;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":407
|
|
* if command == H5T_CONV_INIT:
|
|
* cdata[0].need_bkg = H5T_BKG_NO
|
|
* cdata[0].priv = info = <conv_enum_t*>malloc(sizeof(conv_enum_t)) # <<<<<<<<<<<<<<
|
|
* info[0].src_size = H5Tget_size(src)
|
|
* info[0].dst_size = H5Tget_size(dst)
|
|
*/
|
|
__pyx_t_2 = ((struct __pyx_t_4h5py_5_conv_conv_enum_t *)malloc((sizeof(struct __pyx_t_4h5py_5_conv_conv_enum_t))));
|
|
(__pyx_v_cdata[0]).priv = __pyx_t_2;
|
|
__pyx_v_info = __pyx_t_2;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":408
|
|
* cdata[0].need_bkg = H5T_BKG_NO
|
|
* cdata[0].priv = info = <conv_enum_t*>malloc(sizeof(conv_enum_t))
|
|
* info[0].src_size = H5Tget_size(src) # <<<<<<<<<<<<<<
|
|
* info[0].dst_size = H5Tget_size(dst)
|
|
* if forward:
|
|
*/
|
|
__pyx_t_3 = H5Tget_size(__pyx_v_src); if (unlikely(__pyx_t_3 == 0 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
(__pyx_v_info[0]).src_size = __pyx_t_3;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":409
|
|
* cdata[0].priv = info = <conv_enum_t*>malloc(sizeof(conv_enum_t))
|
|
* info[0].src_size = H5Tget_size(src)
|
|
* info[0].dst_size = H5Tget_size(dst) # <<<<<<<<<<<<<<
|
|
* if forward:
|
|
* info[0].supertype = H5Tget_super(src)
|
|
*/
|
|
__pyx_t_3 = H5Tget_size(__pyx_v_dst); if (unlikely(__pyx_t_3 == 0 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
(__pyx_v_info[0]).dst_size = __pyx_t_3;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":410
|
|
* info[0].src_size = H5Tget_size(src)
|
|
* info[0].dst_size = H5Tget_size(dst)
|
|
* if forward: # <<<<<<<<<<<<<<
|
|
* info[0].supertype = H5Tget_super(src)
|
|
* info[0].identical = H5Tequal(info[0].supertype, dst)
|
|
*/
|
|
__pyx_t_4 = __pyx_v_forward;
|
|
if (__pyx_t_4) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":411
|
|
* info[0].dst_size = H5Tget_size(dst)
|
|
* if forward:
|
|
* info[0].supertype = H5Tget_super(src) # <<<<<<<<<<<<<<
|
|
* info[0].identical = H5Tequal(info[0].supertype, dst)
|
|
* else:
|
|
*/
|
|
__pyx_t_5 = H5Tget_super(__pyx_v_src); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
(__pyx_v_info[0]).supertype = __pyx_t_5;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":412
|
|
* if forward:
|
|
* info[0].supertype = H5Tget_super(src)
|
|
* info[0].identical = H5Tequal(info[0].supertype, dst) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* info[0].supertype = H5Tget_super(dst)
|
|
*/
|
|
__pyx_t_6 = H5Tequal((__pyx_v_info[0]).supertype, __pyx_v_dst); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
(__pyx_v_info[0]).identical = __pyx_t_6;
|
|
goto __pyx_L4;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":414
|
|
* info[0].identical = H5Tequal(info[0].supertype, dst)
|
|
* else:
|
|
* info[0].supertype = H5Tget_super(dst) # <<<<<<<<<<<<<<
|
|
* info[0].identical = H5Tequal(info[0].supertype, src)
|
|
*
|
|
*/
|
|
__pyx_t_5 = H5Tget_super(__pyx_v_dst); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
(__pyx_v_info[0]).supertype = __pyx_t_5;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":415
|
|
* else:
|
|
* info[0].supertype = H5Tget_super(dst)
|
|
* info[0].identical = H5Tequal(info[0].supertype, src) # <<<<<<<<<<<<<<
|
|
*
|
|
* elif command == H5T_CONV_FREE:
|
|
*/
|
|
__pyx_t_6 = H5Tequal((__pyx_v_info[0]).supertype, __pyx_v_src); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
(__pyx_v_info[0]).identical = __pyx_t_6;
|
|
}
|
|
__pyx_L4:;
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":417
|
|
* info[0].identical = H5Tequal(info[0].supertype, src)
|
|
*
|
|
* elif command == H5T_CONV_FREE: # <<<<<<<<<<<<<<
|
|
*
|
|
* info = <conv_enum_t*>cdata[0].priv
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_command == H5T_CONV_FREE);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":419
|
|
* elif command == H5T_CONV_FREE:
|
|
*
|
|
* info = <conv_enum_t*>cdata[0].priv # <<<<<<<<<<<<<<
|
|
* #H5Tclose(info[0].supertype)
|
|
* free(info)
|
|
*/
|
|
__pyx_v_info = ((struct __pyx_t_4h5py_5_conv_conv_enum_t *)(__pyx_v_cdata[0]).priv);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":421
|
|
* info = <conv_enum_t*>cdata[0].priv
|
|
* #H5Tclose(info[0].supertype)
|
|
* free(info) # <<<<<<<<<<<<<<
|
|
* cdata[0].priv = NULL
|
|
*
|
|
*/
|
|
free(__pyx_v_info);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":422
|
|
* #H5Tclose(info[0].supertype)
|
|
* free(info)
|
|
* cdata[0].priv = NULL # <<<<<<<<<<<<<<
|
|
*
|
|
* elif command == H5T_CONV_CONV:
|
|
*/
|
|
(__pyx_v_cdata[0]).priv = NULL;
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":424
|
|
* cdata[0].priv = NULL
|
|
*
|
|
* elif command == H5T_CONV_CONV: # <<<<<<<<<<<<<<
|
|
*
|
|
* info = <conv_enum_t*>cdata[0].priv
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_command == H5T_CONV_CONV);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":426
|
|
* elif command == H5T_CONV_CONV:
|
|
*
|
|
* info = <conv_enum_t*>cdata[0].priv # <<<<<<<<<<<<<<
|
|
*
|
|
* # Short-circuit success
|
|
*/
|
|
__pyx_v_info = ((struct __pyx_t_4h5py_5_conv_conv_enum_t *)(__pyx_v_cdata[0]).priv);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":429
|
|
*
|
|
* # Short-circuit success
|
|
* if info[0].identical: # <<<<<<<<<<<<<<
|
|
* return 0
|
|
*
|
|
*/
|
|
__pyx_t_4 = (__pyx_v_info[0]).identical;
|
|
if (__pyx_t_4) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":430
|
|
* # Short-circuit success
|
|
* if info[0].identical:
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* if buf_stride == 0:
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
goto __pyx_L5;
|
|
}
|
|
__pyx_L5:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":432
|
|
* return 0
|
|
*
|
|
* if buf_stride == 0: # <<<<<<<<<<<<<<
|
|
* # Contiguous case: call H5Tconvert directly
|
|
* if forward:
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_buf_stride == 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":434
|
|
* if buf_stride == 0:
|
|
* # Contiguous case: call H5Tconvert directly
|
|
* if forward: # <<<<<<<<<<<<<<
|
|
* H5Tconvert(info[0].supertype, dst, nl, buf, NULL, dxpl)
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = __pyx_v_forward;
|
|
if (__pyx_t_4) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":435
|
|
* # Contiguous case: call H5Tconvert directly
|
|
* if forward:
|
|
* H5Tconvert(info[0].supertype, dst, nl, buf, NULL, dxpl) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* H5Tconvert(src, info[0].supertype, nl, buf, NULL, dxpl)
|
|
*/
|
|
__pyx_t_7 = H5Tconvert((__pyx_v_info[0]).supertype, __pyx_v_dst, __pyx_v_nl, __pyx_v_buf, NULL, __pyx_v_dxpl); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L7;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":437
|
|
* H5Tconvert(info[0].supertype, dst, nl, buf, NULL, dxpl)
|
|
* else:
|
|
* H5Tconvert(src, info[0].supertype, nl, buf, NULL, dxpl) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* # Non-contiguous: gather, convert and then scatter
|
|
*/
|
|
__pyx_t_7 = H5Tconvert(__pyx_v_src, (__pyx_v_info[0]).supertype, __pyx_v_nl, __pyx_v_buf, NULL, __pyx_v_dxpl); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
}
|
|
__pyx_L7:;
|
|
goto __pyx_L6;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":440
|
|
* else:
|
|
* # Non-contiguous: gather, convert and then scatter
|
|
* if info[0].src_size > info[0].dst_size: # <<<<<<<<<<<<<<
|
|
* nalloc = info[0].src_size*nl
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v_info[0]).src_size > (__pyx_v_info[0]).dst_size);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":441
|
|
* # Non-contiguous: gather, convert and then scatter
|
|
* if info[0].src_size > info[0].dst_size:
|
|
* nalloc = info[0].src_size*nl # <<<<<<<<<<<<<<
|
|
* else:
|
|
* nalloc = info[0].dst_size*nl
|
|
*/
|
|
__pyx_v_nalloc = ((__pyx_v_info[0]).src_size * __pyx_v_nl);
|
|
goto __pyx_L8;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":443
|
|
* nalloc = info[0].src_size*nl
|
|
* else:
|
|
* nalloc = info[0].dst_size*nl # <<<<<<<<<<<<<<
|
|
*
|
|
* cbuf = <char*>malloc(nalloc)
|
|
*/
|
|
__pyx_v_nalloc = ((__pyx_v_info[0]).dst_size * __pyx_v_nl);
|
|
}
|
|
__pyx_L8:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":445
|
|
* nalloc = info[0].dst_size*nl
|
|
*
|
|
* cbuf = <char*>malloc(nalloc) # <<<<<<<<<<<<<<
|
|
* if cbuf == NULL:
|
|
* raise MemoryError("Can't allocate conversion buffer")
|
|
*/
|
|
__pyx_v_cbuf = ((char *)malloc(__pyx_v_nalloc));
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":446
|
|
*
|
|
* cbuf = <char*>malloc(nalloc)
|
|
* if cbuf == NULL: # <<<<<<<<<<<<<<
|
|
* raise MemoryError("Can't allocate conversion buffer")
|
|
* try:
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_cbuf == NULL);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":447
|
|
* cbuf = <char*>malloc(nalloc)
|
|
* if cbuf == NULL:
|
|
* raise MemoryError("Can't allocate conversion buffer") # <<<<<<<<<<<<<<
|
|
* try:
|
|
* for i from 0<=i<nl:
|
|
*/
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_kp_s_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
|
|
__pyx_t_9 = PyObject_Call(__pyx_builtin_MemoryError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_Raise(__pyx_t_9, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L9;
|
|
}
|
|
__pyx_L9:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":448
|
|
* if cbuf == NULL:
|
|
* raise MemoryError("Can't allocate conversion buffer")
|
|
* try: # <<<<<<<<<<<<<<
|
|
* for i from 0<=i<nl:
|
|
* memcpy(cbuf + (i*info[0].src_size), buf + (i*buf_stride),
|
|
*/
|
|
/*try:*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":449
|
|
* raise MemoryError("Can't allocate conversion buffer")
|
|
* try:
|
|
* for i from 0<=i<nl: # <<<<<<<<<<<<<<
|
|
* memcpy(cbuf + (i*info[0].src_size), buf + (i*buf_stride),
|
|
* info[0].src_size)
|
|
*/
|
|
__pyx_t_3 = __pyx_v_nl;
|
|
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":451
|
|
* for i from 0<=i<nl:
|
|
* memcpy(cbuf + (i*info[0].src_size), buf + (i*buf_stride),
|
|
* info[0].src_size) # <<<<<<<<<<<<<<
|
|
*
|
|
* if forward:
|
|
*/
|
|
memcpy((__pyx_v_cbuf + (__pyx_v_i * (__pyx_v_info[0]).src_size)), (__pyx_v_buf + (__pyx_v_i * __pyx_v_buf_stride)), (__pyx_v_info[0]).src_size);
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":453
|
|
* info[0].src_size)
|
|
*
|
|
* if forward: # <<<<<<<<<<<<<<
|
|
* H5Tconvert(info[0].supertype, dst, nl, cbuf, NULL, dxpl)
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = __pyx_v_forward;
|
|
if (__pyx_t_4) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":454
|
|
*
|
|
* if forward:
|
|
* H5Tconvert(info[0].supertype, dst, nl, cbuf, NULL, dxpl) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* H5Tconvert(src, info[0].supertype, nl, cbuf, NULL, dxpl)
|
|
*/
|
|
__pyx_t_7 = H5Tconvert((__pyx_v_info[0]).supertype, __pyx_v_dst, __pyx_v_nl, __pyx_v_cbuf, NULL, __pyx_v_dxpl); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L11;}
|
|
goto __pyx_L15;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":456
|
|
* H5Tconvert(info[0].supertype, dst, nl, cbuf, NULL, dxpl)
|
|
* else:
|
|
* H5Tconvert(src, info[0].supertype, nl, cbuf, NULL, dxpl) # <<<<<<<<<<<<<<
|
|
*
|
|
* for i from 0<=i<nl:
|
|
*/
|
|
__pyx_t_7 = H5Tconvert(__pyx_v_src, (__pyx_v_info[0]).supertype, __pyx_v_nl, __pyx_v_cbuf, NULL, __pyx_v_dxpl); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L11;}
|
|
}
|
|
__pyx_L15:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":458
|
|
* H5Tconvert(src, info[0].supertype, nl, cbuf, NULL, dxpl)
|
|
*
|
|
* for i from 0<=i<nl: # <<<<<<<<<<<<<<
|
|
* memcpy(buf + (i*buf_stride), cbuf + (i*info[0].dst_size),
|
|
* info[0].dst_size)
|
|
*/
|
|
__pyx_t_3 = __pyx_v_nl;
|
|
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":460
|
|
* for i from 0<=i<nl:
|
|
* memcpy(buf + (i*buf_stride), cbuf + (i*info[0].dst_size),
|
|
* info[0].dst_size) # <<<<<<<<<<<<<<
|
|
* finally:
|
|
* free(cbuf)
|
|
*/
|
|
memcpy((__pyx_v_buf + (__pyx_v_i * __pyx_v_buf_stride)), (__pyx_v_cbuf + (__pyx_v_i * (__pyx_v_info[0]).dst_size)), (__pyx_v_info[0]).dst_size);
|
|
}
|
|
}
|
|
/*finally:*/ {
|
|
int __pyx_why;
|
|
PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
|
|
int __pyx_exc_lineno;
|
|
__pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
|
|
__pyx_why = 0; goto __pyx_L12;
|
|
__pyx_L11: {
|
|
__pyx_why = 4;
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
|
|
__pyx_exc_lineno = __pyx_lineno;
|
|
goto __pyx_L12;
|
|
}
|
|
__pyx_L12:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":462
|
|
* info[0].dst_size)
|
|
* finally:
|
|
* free(cbuf) # <<<<<<<<<<<<<<
|
|
* cbuf = NULL
|
|
* else:
|
|
*/
|
|
free(__pyx_v_cbuf);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":463
|
|
* finally:
|
|
* free(cbuf)
|
|
* cbuf = NULL # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return -2
|
|
*/
|
|
__pyx_v_cbuf = NULL;
|
|
switch (__pyx_why) {
|
|
case 4: {
|
|
__Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
|
|
__pyx_lineno = __pyx_exc_lineno;
|
|
__pyx_exc_type = 0;
|
|
__pyx_exc_value = 0;
|
|
__pyx_exc_tb = 0;
|
|
goto __pyx_L1_error;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
__pyx_L6:;
|
|
goto __pyx_L3;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":465
|
|
* cbuf = NULL
|
|
* else:
|
|
* return -2 # <<<<<<<<<<<<<<
|
|
*
|
|
* return 0
|
|
*/
|
|
__pyx_r = -2;
|
|
goto __pyx_L0;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":467
|
|
* return -2
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef herr_t enum2int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("h5py._conv.enum_int_converter");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
PyGILState_Release(_save);
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":469
|
|
* return 0
|
|
*
|
|
* cdef herr_t enum2int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
|
|
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
*/
|
|
|
|
static herr_t __pyx_f_4h5py_5_conv_enum2int(hid_t __pyx_v_src_id, hid_t __pyx_v_dst_id, H5T_cdata_t *__pyx_v_cdata, size_t __pyx_v_nl, size_t __pyx_v_buf_stride, size_t __pyx_v_bkg_stride, void *__pyx_v_buf_i, void *__pyx_v_bkg_i, hid_t __pyx_v_dxpl) {
|
|
herr_t __pyx_r;
|
|
herr_t __pyx_t_1;
|
|
__Pyx_RefNannySetupContext("enum2int");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":473
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
* return enum_int_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
|
|
* buf_i, bkg_i, dxpl, 1) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef herr_t int2enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
|
*/
|
|
__pyx_t_1 = __pyx_f_4h5py_5_conv_enum_int_converter(__pyx_v_src_id, __pyx_v_dst_id, __pyx_v_cdata, __pyx_v_nl, __pyx_v_buf_stride, __pyx_v_bkg_stride, __pyx_v_buf_i, __pyx_v_bkg_i, __pyx_v_dxpl, 1); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_r = __pyx_t_1;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.enum2int");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":475
|
|
* buf_i, bkg_i, dxpl, 1)
|
|
*
|
|
* cdef herr_t int2enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
|
|
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
*/
|
|
|
|
static herr_t __pyx_f_4h5py_5_conv_int2enum(hid_t __pyx_v_src_id, hid_t __pyx_v_dst_id, H5T_cdata_t *__pyx_v_cdata, size_t __pyx_v_nl, size_t __pyx_v_buf_stride, size_t __pyx_v_bkg_stride, void *__pyx_v_buf_i, void *__pyx_v_bkg_i, hid_t __pyx_v_dxpl) {
|
|
herr_t __pyx_r;
|
|
herr_t __pyx_t_1;
|
|
__Pyx_RefNannySetupContext("int2enum");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":479
|
|
* void *bkg_i, hid_t dxpl) except -1:
|
|
* return enum_int_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
|
|
* buf_i, bkg_i, dxpl, 0) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_f_4h5py_5_conv_enum_int_converter(__pyx_v_src_id, __pyx_v_dst_id, __pyx_v_cdata, __pyx_v_nl, __pyx_v_buf_stride, __pyx_v_bkg_stride, __pyx_v_buf_i, __pyx_v_bkg_i, __pyx_v_dxpl, 0); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_r = __pyx_t_1;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.int2enum");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":482
|
|
*
|
|
*
|
|
* cpdef int register_converters() except -1: # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef hid_t vlstring
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_4h5py_5_conv_register_converters(PyObject *__pyx_self, PyObject *unused); /*proto*/
|
|
static int __pyx_f_4h5py_5_conv_register_converters(int __pyx_skip_dispatch) {
|
|
hid_t __pyx_v_vlstring;
|
|
hid_t __pyx_v_pyobj;
|
|
hid_t __pyx_v_enum;
|
|
int __pyx_r;
|
|
hid_t __pyx_t_1;
|
|
herr_t __pyx_t_2;
|
|
__Pyx_RefNannySetupContext("register_converters");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":488
|
|
* cdef hid_t enum
|
|
*
|
|
* vlstring = H5Tcopy(H5T_C_S1) # <<<<<<<<<<<<<<
|
|
* H5Tset_size(vlstring, H5T_VARIABLE)
|
|
*
|
|
*/
|
|
__pyx_t_1 = H5Tcopy(H5T_C_S1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_v_vlstring = __pyx_t_1;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":489
|
|
*
|
|
* vlstring = H5Tcopy(H5T_C_S1)
|
|
* H5Tset_size(vlstring, H5T_VARIABLE) # <<<<<<<<<<<<<<
|
|
*
|
|
* enum = H5Tenum_create(H5T_STD_I32LE)
|
|
*/
|
|
__pyx_t_2 = H5Tset_size(__pyx_v_vlstring, H5T_VARIABLE); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":491
|
|
* H5Tset_size(vlstring, H5T_VARIABLE)
|
|
*
|
|
* enum = H5Tenum_create(H5T_STD_I32LE) # <<<<<<<<<<<<<<
|
|
*
|
|
* pyobj = get_python_obj()
|
|
*/
|
|
__pyx_t_1 = H5Tenum_create(H5T_STD_I32LE); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_v_enum = __pyx_t_1;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":493
|
|
* enum = H5Tenum_create(H5T_STD_I32LE)
|
|
*
|
|
* pyobj = get_python_obj() # <<<<<<<<<<<<<<
|
|
*
|
|
* H5Tregister(H5T_PERS_HARD, "vlen2str", vlstring, pyobj, vlen2str)
|
|
*/
|
|
__pyx_v_pyobj = __pyx_f_4h5py_5_conv_get_python_obj(0);
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":495
|
|
* pyobj = get_python_obj()
|
|
*
|
|
* H5Tregister(H5T_PERS_HARD, "vlen2str", vlstring, pyobj, vlen2str) # <<<<<<<<<<<<<<
|
|
* H5Tregister(H5T_PERS_HARD, "str2vlen", pyobj, vlstring, str2vlen)
|
|
*
|
|
*/
|
|
__pyx_t_2 = H5Tregister(H5T_PERS_HARD, __pyx_k__vlen2str, __pyx_v_vlstring, __pyx_v_pyobj, __pyx_f_4h5py_5_conv_vlen2str); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":496
|
|
*
|
|
* H5Tregister(H5T_PERS_HARD, "vlen2str", vlstring, pyobj, vlen2str)
|
|
* H5Tregister(H5T_PERS_HARD, "str2vlen", pyobj, vlstring, str2vlen) # <<<<<<<<<<<<<<
|
|
*
|
|
* H5Tregister(H5T_PERS_SOFT, "vlen2fixed", vlstring, H5T_C_S1, vlen2fixed)
|
|
*/
|
|
__pyx_t_2 = H5Tregister(H5T_PERS_HARD, __pyx_k__str2vlen, __pyx_v_pyobj, __pyx_v_vlstring, __pyx_f_4h5py_5_conv_str2vlen); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":498
|
|
* H5Tregister(H5T_PERS_HARD, "str2vlen", pyobj, vlstring, str2vlen)
|
|
*
|
|
* H5Tregister(H5T_PERS_SOFT, "vlen2fixed", vlstring, H5T_C_S1, vlen2fixed) # <<<<<<<<<<<<<<
|
|
* H5Tregister(H5T_PERS_SOFT, "fixed2vlen", H5T_C_S1, vlstring, fixed2vlen)
|
|
*
|
|
*/
|
|
__pyx_t_2 = H5Tregister(H5T_PERS_SOFT, __pyx_k__vlen2fixed, __pyx_v_vlstring, H5T_C_S1, __pyx_f_4h5py_5_conv_vlen2fixed); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":499
|
|
*
|
|
* H5Tregister(H5T_PERS_SOFT, "vlen2fixed", vlstring, H5T_C_S1, vlen2fixed)
|
|
* H5Tregister(H5T_PERS_SOFT, "fixed2vlen", H5T_C_S1, vlstring, fixed2vlen) # <<<<<<<<<<<<<<
|
|
*
|
|
* H5Tregister(H5T_PERS_HARD, "objref2pyref", H5T_STD_REF_OBJ, pyobj, objref2pyref)
|
|
*/
|
|
__pyx_t_2 = H5Tregister(H5T_PERS_SOFT, __pyx_k__fixed2vlen, H5T_C_S1, __pyx_v_vlstring, __pyx_f_4h5py_5_conv_fixed2vlen); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":501
|
|
* H5Tregister(H5T_PERS_SOFT, "fixed2vlen", H5T_C_S1, vlstring, fixed2vlen)
|
|
*
|
|
* H5Tregister(H5T_PERS_HARD, "objref2pyref", H5T_STD_REF_OBJ, pyobj, objref2pyref) # <<<<<<<<<<<<<<
|
|
* H5Tregister(H5T_PERS_HARD, "pyref2objref", pyobj, H5T_STD_REF_OBJ, pyref2objref)
|
|
*
|
|
*/
|
|
__pyx_t_2 = H5Tregister(H5T_PERS_HARD, __pyx_k__objref2pyref, H5T_STD_REF_OBJ, __pyx_v_pyobj, __pyx_f_4h5py_5_conv_objref2pyref); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":502
|
|
*
|
|
* H5Tregister(H5T_PERS_HARD, "objref2pyref", H5T_STD_REF_OBJ, pyobj, objref2pyref)
|
|
* H5Tregister(H5T_PERS_HARD, "pyref2objref", pyobj, H5T_STD_REF_OBJ, pyref2objref) # <<<<<<<<<<<<<<
|
|
*
|
|
* H5Tregister(H5T_PERS_HARD, "regref2pyref", H5T_STD_REF_DSETREG, pyobj, regref2pyref)
|
|
*/
|
|
__pyx_t_2 = H5Tregister(H5T_PERS_HARD, __pyx_k__pyref2objref, __pyx_v_pyobj, H5T_STD_REF_OBJ, __pyx_f_4h5py_5_conv_pyref2objref); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":504
|
|
* H5Tregister(H5T_PERS_HARD, "pyref2objref", pyobj, H5T_STD_REF_OBJ, pyref2objref)
|
|
*
|
|
* H5Tregister(H5T_PERS_HARD, "regref2pyref", H5T_STD_REF_DSETREG, pyobj, regref2pyref) # <<<<<<<<<<<<<<
|
|
* H5Tregister(H5T_PERS_HARD, "pyref2regref", pyobj, H5T_STD_REF_DSETREG, pyref2regref)
|
|
*
|
|
*/
|
|
__pyx_t_2 = H5Tregister(H5T_PERS_HARD, __pyx_k__regref2pyref, H5T_STD_REF_DSETREG, __pyx_v_pyobj, __pyx_f_4h5py_5_conv_regref2pyref); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":505
|
|
*
|
|
* H5Tregister(H5T_PERS_HARD, "regref2pyref", H5T_STD_REF_DSETREG, pyobj, regref2pyref)
|
|
* H5Tregister(H5T_PERS_HARD, "pyref2regref", pyobj, H5T_STD_REF_DSETREG, pyref2regref) # <<<<<<<<<<<<<<
|
|
*
|
|
* H5Tregister(H5T_PERS_SOFT, "enum2int", enum, H5T_STD_I32LE, enum2int)
|
|
*/
|
|
__pyx_t_2 = H5Tregister(H5T_PERS_HARD, __pyx_k__pyref2regref, __pyx_v_pyobj, H5T_STD_REF_DSETREG, __pyx_f_4h5py_5_conv_pyref2regref); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":507
|
|
* H5Tregister(H5T_PERS_HARD, "pyref2regref", pyobj, H5T_STD_REF_DSETREG, pyref2regref)
|
|
*
|
|
* H5Tregister(H5T_PERS_SOFT, "enum2int", enum, H5T_STD_I32LE, enum2int) # <<<<<<<<<<<<<<
|
|
* H5Tregister(H5T_PERS_SOFT, "int2enum", H5T_STD_I32LE, enum, int2enum)
|
|
*
|
|
*/
|
|
__pyx_t_2 = H5Tregister(H5T_PERS_SOFT, __pyx_k__enum2int, __pyx_v_enum, H5T_STD_I32LE, __pyx_f_4h5py_5_conv_enum2int); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":508
|
|
*
|
|
* H5Tregister(H5T_PERS_SOFT, "enum2int", enum, H5T_STD_I32LE, enum2int)
|
|
* H5Tregister(H5T_PERS_SOFT, "int2enum", H5T_STD_I32LE, enum, int2enum) # <<<<<<<<<<<<<<
|
|
*
|
|
* H5Tclose(vlstring)
|
|
*/
|
|
__pyx_t_2 = H5Tregister(H5T_PERS_SOFT, __pyx_k__int2enum, H5T_STD_I32LE, __pyx_v_enum, __pyx_f_4h5py_5_conv_int2enum); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":510
|
|
* H5Tregister(H5T_PERS_SOFT, "int2enum", H5T_STD_I32LE, enum, int2enum)
|
|
*
|
|
* H5Tclose(vlstring) # <<<<<<<<<<<<<<
|
|
* H5Tclose(enum)
|
|
*
|
|
*/
|
|
__pyx_t_2 = H5Tclose(__pyx_v_vlstring); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":511
|
|
*
|
|
* H5Tclose(vlstring)
|
|
* H5Tclose(enum) # <<<<<<<<<<<<<<
|
|
*
|
|
* return 0
|
|
*/
|
|
__pyx_t_2 = H5Tclose(__pyx_v_enum); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":513
|
|
* H5Tclose(enum)
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* cpdef int unregister_converters() except -1:
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.register_converters");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":482
|
|
*
|
|
*
|
|
* cpdef int register_converters() except -1: # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef hid_t vlstring
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_4h5py_5_conv_register_converters(PyObject *__pyx_self, PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pf_4h5py_5_conv_register_converters(PyObject *__pyx_self, PyObject *unused) {
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("register_converters");
|
|
__pyx_self = __pyx_self;
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_4h5py_5_conv_register_converters(0); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_2 = PyInt_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("h5py._conv.register_converters");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":515
|
|
* return 0
|
|
*
|
|
* cpdef int unregister_converters() except -1: # <<<<<<<<<<<<<<
|
|
*
|
|
* H5Tunregister(H5T_PERS_HARD, "vlen2str", -1, -1, vlen2str)
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_4h5py_5_conv_unregister_converters(PyObject *__pyx_self, PyObject *unused); /*proto*/
|
|
static int __pyx_f_4h5py_5_conv_unregister_converters(int __pyx_skip_dispatch) {
|
|
int __pyx_r;
|
|
herr_t __pyx_t_1;
|
|
__Pyx_RefNannySetupContext("unregister_converters");
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":517
|
|
* cpdef int unregister_converters() except -1:
|
|
*
|
|
* H5Tunregister(H5T_PERS_HARD, "vlen2str", -1, -1, vlen2str) # <<<<<<<<<<<<<<
|
|
* H5Tunregister(H5T_PERS_HARD, "str2vlen", -1, -1, str2vlen)
|
|
*
|
|
*/
|
|
__pyx_t_1 = H5Tunregister(H5T_PERS_HARD, __pyx_k__vlen2str, -1, -1, __pyx_f_4h5py_5_conv_vlen2str); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":518
|
|
*
|
|
* H5Tunregister(H5T_PERS_HARD, "vlen2str", -1, -1, vlen2str)
|
|
* H5Tunregister(H5T_PERS_HARD, "str2vlen", -1, -1, str2vlen) # <<<<<<<<<<<<<<
|
|
*
|
|
* H5Tunregister(H5T_PERS_SOFT, "vlen2fixed", -1, -1, vlen2fixed)
|
|
*/
|
|
__pyx_t_1 = H5Tunregister(H5T_PERS_HARD, __pyx_k__str2vlen, -1, -1, __pyx_f_4h5py_5_conv_str2vlen); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":520
|
|
* H5Tunregister(H5T_PERS_HARD, "str2vlen", -1, -1, str2vlen)
|
|
*
|
|
* H5Tunregister(H5T_PERS_SOFT, "vlen2fixed", -1, -1, vlen2fixed) # <<<<<<<<<<<<<<
|
|
* H5Tunregister(H5T_PERS_SOFT, "fixed2vlen", -1, -1, fixed2vlen)
|
|
*
|
|
*/
|
|
__pyx_t_1 = H5Tunregister(H5T_PERS_SOFT, __pyx_k__vlen2fixed, -1, -1, __pyx_f_4h5py_5_conv_vlen2fixed); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":521
|
|
*
|
|
* H5Tunregister(H5T_PERS_SOFT, "vlen2fixed", -1, -1, vlen2fixed)
|
|
* H5Tunregister(H5T_PERS_SOFT, "fixed2vlen", -1, -1, fixed2vlen) # <<<<<<<<<<<<<<
|
|
*
|
|
* H5Tunregister(H5T_PERS_HARD, "objref2pyref", -1, -1, objref2pyref)
|
|
*/
|
|
__pyx_t_1 = H5Tunregister(H5T_PERS_SOFT, __pyx_k__fixed2vlen, -1, -1, __pyx_f_4h5py_5_conv_fixed2vlen); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":523
|
|
* H5Tunregister(H5T_PERS_SOFT, "fixed2vlen", -1, -1, fixed2vlen)
|
|
*
|
|
* H5Tunregister(H5T_PERS_HARD, "objref2pyref", -1, -1, objref2pyref) # <<<<<<<<<<<<<<
|
|
* H5Tunregister(H5T_PERS_HARD, "pyref2objref", -1, -1, pyref2objref)
|
|
*
|
|
*/
|
|
__pyx_t_1 = H5Tunregister(H5T_PERS_HARD, __pyx_k__objref2pyref, -1, -1, __pyx_f_4h5py_5_conv_objref2pyref); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":524
|
|
*
|
|
* H5Tunregister(H5T_PERS_HARD, "objref2pyref", -1, -1, objref2pyref)
|
|
* H5Tunregister(H5T_PERS_HARD, "pyref2objref", -1, -1, pyref2objref) # <<<<<<<<<<<<<<
|
|
*
|
|
* H5Tunregister(H5T_PERS_HARD, "regref2pyref", -1, -1, regref2pyref)
|
|
*/
|
|
__pyx_t_1 = H5Tunregister(H5T_PERS_HARD, __pyx_k__pyref2objref, -1, -1, __pyx_f_4h5py_5_conv_pyref2objref); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":526
|
|
* H5Tunregister(H5T_PERS_HARD, "pyref2objref", -1, -1, pyref2objref)
|
|
*
|
|
* H5Tunregister(H5T_PERS_HARD, "regref2pyref", -1, -1, regref2pyref) # <<<<<<<<<<<<<<
|
|
* H5Tunregister(H5T_PERS_HARD, "pyref2regref", -1, -1, pyref2regref)
|
|
*
|
|
*/
|
|
__pyx_t_1 = H5Tunregister(H5T_PERS_HARD, __pyx_k__regref2pyref, -1, -1, __pyx_f_4h5py_5_conv_regref2pyref); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":527
|
|
*
|
|
* H5Tunregister(H5T_PERS_HARD, "regref2pyref", -1, -1, regref2pyref)
|
|
* H5Tunregister(H5T_PERS_HARD, "pyref2regref", -1, -1, pyref2regref) # <<<<<<<<<<<<<<
|
|
*
|
|
* H5Tunregister(H5T_PERS_SOFT, "enum2int", -1, -1, enum2int)
|
|
*/
|
|
__pyx_t_1 = H5Tunregister(H5T_PERS_HARD, __pyx_k__pyref2regref, -1, -1, __pyx_f_4h5py_5_conv_pyref2regref); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":529
|
|
* H5Tunregister(H5T_PERS_HARD, "pyref2regref", -1, -1, pyref2regref)
|
|
*
|
|
* H5Tunregister(H5T_PERS_SOFT, "enum2int", -1, -1, enum2int) # <<<<<<<<<<<<<<
|
|
* H5Tunregister(H5T_PERS_SOFT, "int2enum", -1, -1, int2enum)
|
|
*
|
|
*/
|
|
__pyx_t_1 = H5Tunregister(H5T_PERS_SOFT, __pyx_k__enum2int, -1, -1, __pyx_f_4h5py_5_conv_enum2int); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":530
|
|
*
|
|
* H5Tunregister(H5T_PERS_SOFT, "enum2int", -1, -1, enum2int)
|
|
* H5Tunregister(H5T_PERS_SOFT, "int2enum", -1, -1, int2enum) # <<<<<<<<<<<<<<
|
|
*
|
|
* return 0
|
|
*/
|
|
__pyx_t_1 = H5Tunregister(H5T_PERS_SOFT, __pyx_k__int2enum, -1, -1, __pyx_f_4h5py_5_conv_int2enum); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":532
|
|
* H5Tunregister(H5T_PERS_SOFT, "int2enum", -1, -1, int2enum)
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("h5py._conv.unregister_converters");
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":515
|
|
* return 0
|
|
*
|
|
* cpdef int unregister_converters() except -1: # <<<<<<<<<<<<<<
|
|
*
|
|
* H5Tunregister(H5T_PERS_HARD, "vlen2str", -1, -1, vlen2str)
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_4h5py_5_conv_unregister_converters(PyObject *__pyx_self, PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pf_4h5py_5_conv_unregister_converters(PyObject *__pyx_self, PyObject *unused) {
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("unregister_converters");
|
|
__pyx_self = __pyx_self;
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_4h5py_5_conv_unregister_converters(0); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_2 = PyInt_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("h5py._conv.unregister_converters");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static struct PyMethodDef __pyx_methods[] = {
|
|
{__Pyx_NAMESTR("get_python_obj"), (PyCFunction)__pyx_pf_4h5py_5_conv_get_python_obj, METH_NOARGS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("register_converters"), (PyCFunction)__pyx_pf_4h5py_5_conv_register_converters, METH_NOARGS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("unregister_converters"), (PyCFunction)__pyx_pf_4h5py_5_conv_unregister_converters, METH_NOARGS, __Pyx_DOCSTR(0)},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static void __pyx_init_filenames(void); /*proto*/
|
|
|
|
#if PY_MAJOR_VERSION >= 3
|
|
static struct PyModuleDef __pyx_moduledef = {
|
|
PyModuleDef_HEAD_INIT,
|
|
__Pyx_NAMESTR("_conv"),
|
|
__Pyx_DOCSTR(__pyx_k_7), /* m_doc */
|
|
-1, /* m_size */
|
|
__pyx_methods /* m_methods */,
|
|
NULL, /* m_reload */
|
|
NULL, /* m_traverse */
|
|
NULL, /* m_clear */
|
|
NULL /* m_free */
|
|
};
|
|
#endif
|
|
|
|
static __Pyx_StringTabEntry __pyx_string_tab[] = {
|
|
{&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
|
|
{&__pyx_n_s__MemoryError, __pyx_k__MemoryError, sizeof(__pyx_k__MemoryError), 0, 0, 1, 1},
|
|
{&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
|
|
{&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
|
|
{&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
|
|
{&__pyx_n_s__command, __pyx_k__command, sizeof(__pyx_k__command), 0, 0, 1, 1},
|
|
{&__pyx_n_s__dst_size, __pyx_k__dst_size, sizeof(__pyx_k__dst_size), 0, 0, 1, 1},
|
|
{&__pyx_n_s__identical, __pyx_k__identical, sizeof(__pyx_k__identical), 0, 0, 1, 1},
|
|
{&__pyx_n_s__need_bkg, __pyx_k__need_bkg, sizeof(__pyx_k__need_bkg), 0, 0, 1, 1},
|
|
{&__pyx_n_s__obj_ref, __pyx_k__obj_ref, sizeof(__pyx_k__obj_ref), 0, 0, 1, 1},
|
|
{&__pyx_n_s__priv, __pyx_k__priv, sizeof(__pyx_k__priv), 0, 0, 1, 1},
|
|
{&__pyx_n_s__ref, __pyx_k__ref, sizeof(__pyx_k__ref), 0, 0, 1, 1},
|
|
{&__pyx_n_s__reg_ref, __pyx_k__reg_ref, sizeof(__pyx_k__reg_ref), 0, 0, 1, 1},
|
|
{&__pyx_n_s__src_size, __pyx_k__src_size, sizeof(__pyx_k__src_size), 0, 0, 1, 1},
|
|
{&__pyx_n_s__supertype, __pyx_k__supertype, sizeof(__pyx_k__supertype), 0, 0, 1, 1},
|
|
{&__pyx_n_s__typecode, __pyx_k__typecode, sizeof(__pyx_k__typecode), 0, 0, 1, 1},
|
|
{0, 0, 0, 0, 0, 0, 0}
|
|
};
|
|
static int __Pyx_InitCachedBuiltins(void) {
|
|
__pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_builtin_MemoryError = __Pyx_GetName(__pyx_b, __pyx_n_s__MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
return 0;
|
|
__pyx_L1_error:;
|
|
return -1;
|
|
}
|
|
|
|
static int __Pyx_InitGlobals(void) {
|
|
if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
return 0;
|
|
__pyx_L1_error:;
|
|
return -1;
|
|
}
|
|
|
|
#if PY_MAJOR_VERSION < 3
|
|
PyMODINIT_FUNC init_conv(void); /*proto*/
|
|
PyMODINIT_FUNC init_conv(void)
|
|
#else
|
|
PyMODINIT_FUNC PyInit__conv(void); /*proto*/
|
|
PyMODINIT_FUNC PyInit__conv(void)
|
|
#endif
|
|
{
|
|
#if CYTHON_REFNANNY
|
|
void* __pyx_refnanny = NULL;
|
|
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
|
|
if (!__Pyx_RefNanny) {
|
|
PyErr_Clear();
|
|
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
|
|
if (!__Pyx_RefNanny)
|
|
Py_FatalError("failed to import 'refnanny' module");
|
|
}
|
|
__pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit__conv(void)", __LINE__, __FILE__);
|
|
#endif
|
|
__pyx_init_filenames();
|
|
__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
#if PY_MAJOR_VERSION < 3
|
|
__pyx_empty_bytes = PyString_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
#else
|
|
__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
#endif
|
|
/*--- Library function declarations ---*/
|
|
/*--- Threads initialization code ---*/
|
|
#if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
|
|
#ifdef WITH_THREAD /* Python build with threading support? */
|
|
PyEval_InitThreads();
|
|
#endif
|
|
#endif
|
|
/*--- Module creation code ---*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
__pyx_m = Py_InitModule4(__Pyx_NAMESTR("_conv"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_7), 0, PYTHON_API_VERSION);
|
|
#else
|
|
__pyx_m = PyModule_Create(&__pyx_moduledef);
|
|
#endif
|
|
if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
#if PY_MAJOR_VERSION < 3
|
|
Py_INCREF(__pyx_m);
|
|
#endif
|
|
__pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
|
|
if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
/*--- Initialize various global constants etc. ---*/
|
|
if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_module_is_main_h5py___conv) {
|
|
if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
}
|
|
/*--- Builtin init code ---*/
|
|
if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
/*--- Global init code ---*/
|
|
/*--- Function export code ---*/
|
|
/*--- Type init code ---*/
|
|
/*--- Type import code ---*/
|
|
__pyx_ptype_4h5py_3h5r_Reference = __Pyx_ImportType("h5py.h5r", "Reference", sizeof(struct __pyx_obj_4h5py_3h5r_Reference)); if (unlikely(!__pyx_ptype_4h5py_3h5r_Reference)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_ptype_4h5py_3h5r_RegionReference = __Pyx_ImportType("h5py.h5r", "RegionReference", sizeof(struct __pyx_obj_4h5py_3h5r_RegionReference)); if (unlikely(!__pyx_ptype_4h5py_3h5r_RegionReference)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
/*--- Function import code ---*/
|
|
/*--- Execution code ---*/
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":22
|
|
*
|
|
* # Create Python object equivalents
|
|
* cdef hid_t H5PY_OBJ = 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* cpdef hid_t get_python_obj():
|
|
*/
|
|
__pyx_v_4h5py_5_conv_H5PY_OBJ = 0;
|
|
|
|
/* "/home/tachyon/slave/unix-release/build/h5py/h5r.pxd":1
|
|
* #+ # <<<<<<<<<<<<<<
|
|
* #
|
|
* # This file is part of h5py, a low-level Python interface to the HDF5 library.
|
|
*/
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
if (__pyx_m) {
|
|
__Pyx_AddTraceback("init h5py._conv");
|
|
Py_DECREF(__pyx_m); __pyx_m = 0;
|
|
} else if (!PyErr_Occurred()) {
|
|
PyErr_SetString(PyExc_ImportError, "init h5py._conv");
|
|
}
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
#if PY_MAJOR_VERSION < 3
|
|
return;
|
|
#else
|
|
return __pyx_m;
|
|
#endif
|
|
}
|
|
|
|
static const char *__pyx_filenames[] = {
|
|
"_conv.pyx",
|
|
"h5r.pxd",
|
|
};
|
|
|
|
/* Runtime support code */
|
|
|
|
static void __pyx_init_filenames(void) {
|
|
__pyx_f = __pyx_filenames;
|
|
}
|
|
|
|
static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
|
|
PyObject *tmp_type, *tmp_value, *tmp_tb;
|
|
PyThreadState *tstate = PyThreadState_GET();
|
|
|
|
tmp_type = tstate->curexc_type;
|
|
tmp_value = tstate->curexc_value;
|
|
tmp_tb = tstate->curexc_traceback;
|
|
tstate->curexc_type = type;
|
|
tstate->curexc_value = value;
|
|
tstate->curexc_traceback = tb;
|
|
Py_XDECREF(tmp_type);
|
|
Py_XDECREF(tmp_value);
|
|
Py_XDECREF(tmp_tb);
|
|
}
|
|
|
|
static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
|
|
PyThreadState *tstate = PyThreadState_GET();
|
|
*type = tstate->curexc_type;
|
|
*value = tstate->curexc_value;
|
|
*tb = tstate->curexc_traceback;
|
|
|
|
tstate->curexc_type = 0;
|
|
tstate->curexc_value = 0;
|
|
tstate->curexc_traceback = 0;
|
|
}
|
|
|
|
|
|
static INLINE PyObject *__Pyx_PyInt_to_py_hid_t(hid_t val) {
|
|
const hid_t neg_one = (hid_t)-1, const_zero = 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
if (sizeof(hid_t) < sizeof(long)) {
|
|
return PyInt_FromLong((long)val);
|
|
} else if (sizeof(hid_t) == sizeof(long)) {
|
|
if (is_unsigned)
|
|
return PyLong_FromUnsignedLong((unsigned long)val);
|
|
else
|
|
return PyInt_FromLong((long)val);
|
|
} else { /* (sizeof(hid_t) > sizeof(long)) */
|
|
if (is_unsigned)
|
|
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
|
|
else
|
|
return PyLong_FromLongLong((PY_LONG_LONG)val);
|
|
}
|
|
}
|
|
|
|
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
|
|
PyObject *result;
|
|
result = PyObject_GetAttr(dict, name);
|
|
if (!result)
|
|
PyErr_SetObject(PyExc_NameError, name);
|
|
return result;
|
|
}
|
|
|
|
#if PY_MAJOR_VERSION < 3
|
|
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
|
|
Py_XINCREF(type);
|
|
Py_XINCREF(value);
|
|
Py_XINCREF(tb);
|
|
/* First, check the traceback argument, replacing None with NULL. */
|
|
if (tb == Py_None) {
|
|
Py_DECREF(tb);
|
|
tb = 0;
|
|
}
|
|
else if (tb != NULL && !PyTraceBack_Check(tb)) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"raise: arg 3 must be a traceback or None");
|
|
goto raise_error;
|
|
}
|
|
/* Next, replace a missing value with None */
|
|
if (value == NULL) {
|
|
value = Py_None;
|
|
Py_INCREF(value);
|
|
}
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
if (!PyClass_Check(type))
|
|
#else
|
|
if (!PyType_Check(type))
|
|
#endif
|
|
{
|
|
/* Raising an instance. The value should be a dummy. */
|
|
if (value != Py_None) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"instance exception may not have a separate value");
|
|
goto raise_error;
|
|
}
|
|
/* Normalize to raise <class>, <instance> */
|
|
Py_DECREF(value);
|
|
value = type;
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
if (PyInstance_Check(type)) {
|
|
type = (PyObject*) ((PyInstanceObject*)type)->in_class;
|
|
Py_INCREF(type);
|
|
}
|
|
else {
|
|
type = 0;
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"raise: exception must be an old-style class or instance");
|
|
goto raise_error;
|
|
}
|
|
#else
|
|
type = (PyObject*) Py_TYPE(type);
|
|
Py_INCREF(type);
|
|
if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"raise: exception class must be a subclass of BaseException");
|
|
goto raise_error;
|
|
}
|
|
#endif
|
|
}
|
|
|
|
__Pyx_ErrRestore(type, value, tb);
|
|
return;
|
|
raise_error:
|
|
Py_XDECREF(value);
|
|
Py_XDECREF(type);
|
|
Py_XDECREF(tb);
|
|
return;
|
|
}
|
|
|
|
#else /* Python 3+ */
|
|
|
|
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
|
|
if (tb == Py_None) {
|
|
tb = 0;
|
|
} else if (tb && !PyTraceBack_Check(tb)) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"raise: arg 3 must be a traceback or None");
|
|
goto bad;
|
|
}
|
|
if (value == Py_None)
|
|
value = 0;
|
|
|
|
if (PyExceptionInstance_Check(type)) {
|
|
if (value) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"instance exception may not have a separate value");
|
|
goto bad;
|
|
}
|
|
value = type;
|
|
type = (PyObject*) Py_TYPE(value);
|
|
} else if (!PyExceptionClass_Check(type)) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"raise: exception class must be a subclass of BaseException");
|
|
goto bad;
|
|
}
|
|
|
|
PyErr_SetObject(type, value);
|
|
|
|
if (tb) {
|
|
PyThreadState *tstate = PyThreadState_GET();
|
|
PyObject* tmp_tb = tstate->curexc_traceback;
|
|
if (tb != tmp_tb) {
|
|
Py_INCREF(tb);
|
|
tstate->curexc_traceback = tb;
|
|
Py_XDECREF(tmp_tb);
|
|
}
|
|
}
|
|
|
|
bad:
|
|
return;
|
|
}
|
|
#endif
|
|
|
|
static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
|
|
const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
if (sizeof(unsigned char) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(unsigned char)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(is_unsigned && unlikely(val < 0)) ?
|
|
"can't convert negative value to unsigned char" :
|
|
"value too large to convert to unsigned char");
|
|
}
|
|
return (unsigned char)-1;
|
|
}
|
|
return (unsigned char)val;
|
|
}
|
|
return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
|
|
}
|
|
|
|
static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
|
|
const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
if (sizeof(unsigned short) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(unsigned short)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(is_unsigned && unlikely(val < 0)) ?
|
|
"can't convert negative value to unsigned short" :
|
|
"value too large to convert to unsigned short");
|
|
}
|
|
return (unsigned short)-1;
|
|
}
|
|
return (unsigned short)val;
|
|
}
|
|
return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
|
|
}
|
|
|
|
static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
|
|
const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
if (sizeof(unsigned int) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(unsigned int)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(is_unsigned && unlikely(val < 0)) ?
|
|
"can't convert negative value to unsigned int" :
|
|
"value too large to convert to unsigned int");
|
|
}
|
|
return (unsigned int)-1;
|
|
}
|
|
return (unsigned int)val;
|
|
}
|
|
return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
|
|
}
|
|
|
|
static INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
|
|
const char neg_one = (char)-1, const_zero = 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
if (sizeof(char) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(char)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(is_unsigned && unlikely(val < 0)) ?
|
|
"can't convert negative value to char" :
|
|
"value too large to convert to char");
|
|
}
|
|
return (char)-1;
|
|
}
|
|
return (char)val;
|
|
}
|
|
return (char)__Pyx_PyInt_AsLong(x);
|
|
}
|
|
|
|
static INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
|
|
const short neg_one = (short)-1, const_zero = 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
if (sizeof(short) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(short)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(is_unsigned && unlikely(val < 0)) ?
|
|
"can't convert negative value to short" :
|
|
"value too large to convert to short");
|
|
}
|
|
return (short)-1;
|
|
}
|
|
return (short)val;
|
|
}
|
|
return (short)__Pyx_PyInt_AsLong(x);
|
|
}
|
|
|
|
static INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
|
|
const int neg_one = (int)-1, const_zero = 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
if (sizeof(int) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(int)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(is_unsigned && unlikely(val < 0)) ?
|
|
"can't convert negative value to int" :
|
|
"value too large to convert to int");
|
|
}
|
|
return (int)-1;
|
|
}
|
|
return (int)val;
|
|
}
|
|
return (int)__Pyx_PyInt_AsLong(x);
|
|
}
|
|
|
|
static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
|
|
const signed char neg_one = (signed char)-1, const_zero = 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
if (sizeof(signed char) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(signed char)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(is_unsigned && unlikely(val < 0)) ?
|
|
"can't convert negative value to signed char" :
|
|
"value too large to convert to signed char");
|
|
}
|
|
return (signed char)-1;
|
|
}
|
|
return (signed char)val;
|
|
}
|
|
return (signed char)__Pyx_PyInt_AsSignedLong(x);
|
|
}
|
|
|
|
static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
|
|
const signed short neg_one = (signed short)-1, const_zero = 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
if (sizeof(signed short) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(signed short)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(is_unsigned && unlikely(val < 0)) ?
|
|
"can't convert negative value to signed short" :
|
|
"value too large to convert to signed short");
|
|
}
|
|
return (signed short)-1;
|
|
}
|
|
return (signed short)val;
|
|
}
|
|
return (signed short)__Pyx_PyInt_AsSignedLong(x);
|
|
}
|
|
|
|
static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
|
|
const signed int neg_one = (signed int)-1, const_zero = 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
if (sizeof(signed int) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(signed int)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(is_unsigned && unlikely(val < 0)) ?
|
|
"can't convert negative value to signed int" :
|
|
"value too large to convert to signed int");
|
|
}
|
|
return (signed int)-1;
|
|
}
|
|
return (signed int)val;
|
|
}
|
|
return (signed int)__Pyx_PyInt_AsSignedLong(x);
|
|
}
|
|
|
|
static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
|
|
const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (likely(PyInt_Check(x))) {
|
|
long val = PyInt_AS_LONG(x);
|
|
if (is_unsigned && unlikely(val < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to unsigned long");
|
|
return (unsigned long)-1;
|
|
}
|
|
return (unsigned long)val;
|
|
} else
|
|
#endif
|
|
if (likely(PyLong_Check(x))) {
|
|
if (is_unsigned) {
|
|
if (unlikely(Py_SIZE(x) < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to unsigned long");
|
|
return (unsigned long)-1;
|
|
}
|
|
return PyLong_AsUnsignedLong(x);
|
|
} else {
|
|
return PyLong_AsLong(x);
|
|
}
|
|
} else {
|
|
unsigned long val;
|
|
PyObject *tmp = __Pyx_PyNumber_Int(x);
|
|
if (!tmp) return (unsigned long)-1;
|
|
val = __Pyx_PyInt_AsUnsignedLong(tmp);
|
|
Py_DECREF(tmp);
|
|
return val;
|
|
}
|
|
}
|
|
|
|
static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
|
|
const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (likely(PyInt_Check(x))) {
|
|
long val = PyInt_AS_LONG(x);
|
|
if (is_unsigned && unlikely(val < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to unsigned PY_LONG_LONG");
|
|
return (unsigned PY_LONG_LONG)-1;
|
|
}
|
|
return (unsigned PY_LONG_LONG)val;
|
|
} else
|
|
#endif
|
|
if (likely(PyLong_Check(x))) {
|
|
if (is_unsigned) {
|
|
if (unlikely(Py_SIZE(x) < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to unsigned PY_LONG_LONG");
|
|
return (unsigned PY_LONG_LONG)-1;
|
|
}
|
|
return PyLong_AsUnsignedLongLong(x);
|
|
} else {
|
|
return PyLong_AsLongLong(x);
|
|
}
|
|
} else {
|
|
unsigned PY_LONG_LONG val;
|
|
PyObject *tmp = __Pyx_PyNumber_Int(x);
|
|
if (!tmp) return (unsigned PY_LONG_LONG)-1;
|
|
val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
|
|
Py_DECREF(tmp);
|
|
return val;
|
|
}
|
|
}
|
|
|
|
static INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
|
|
const long neg_one = (long)-1, const_zero = 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (likely(PyInt_Check(x))) {
|
|
long val = PyInt_AS_LONG(x);
|
|
if (is_unsigned && unlikely(val < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to long");
|
|
return (long)-1;
|
|
}
|
|
return (long)val;
|
|
} else
|
|
#endif
|
|
if (likely(PyLong_Check(x))) {
|
|
if (is_unsigned) {
|
|
if (unlikely(Py_SIZE(x) < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to long");
|
|
return (long)-1;
|
|
}
|
|
return PyLong_AsUnsignedLong(x);
|
|
} else {
|
|
return PyLong_AsLong(x);
|
|
}
|
|
} else {
|
|
long val;
|
|
PyObject *tmp = __Pyx_PyNumber_Int(x);
|
|
if (!tmp) return (long)-1;
|
|
val = __Pyx_PyInt_AsLong(tmp);
|
|
Py_DECREF(tmp);
|
|
return val;
|
|
}
|
|
}
|
|
|
|
static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
|
|
const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (likely(PyInt_Check(x))) {
|
|
long val = PyInt_AS_LONG(x);
|
|
if (is_unsigned && unlikely(val < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to PY_LONG_LONG");
|
|
return (PY_LONG_LONG)-1;
|
|
}
|
|
return (PY_LONG_LONG)val;
|
|
} else
|
|
#endif
|
|
if (likely(PyLong_Check(x))) {
|
|
if (is_unsigned) {
|
|
if (unlikely(Py_SIZE(x) < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to PY_LONG_LONG");
|
|
return (PY_LONG_LONG)-1;
|
|
}
|
|
return PyLong_AsUnsignedLongLong(x);
|
|
} else {
|
|
return PyLong_AsLongLong(x);
|
|
}
|
|
} else {
|
|
PY_LONG_LONG val;
|
|
PyObject *tmp = __Pyx_PyNumber_Int(x);
|
|
if (!tmp) return (PY_LONG_LONG)-1;
|
|
val = __Pyx_PyInt_AsLongLong(tmp);
|
|
Py_DECREF(tmp);
|
|
return val;
|
|
}
|
|
}
|
|
|
|
static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
|
|
const signed long neg_one = (signed long)-1, const_zero = 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (likely(PyInt_Check(x))) {
|
|
long val = PyInt_AS_LONG(x);
|
|
if (is_unsigned && unlikely(val < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to signed long");
|
|
return (signed long)-1;
|
|
}
|
|
return (signed long)val;
|
|
} else
|
|
#endif
|
|
if (likely(PyLong_Check(x))) {
|
|
if (is_unsigned) {
|
|
if (unlikely(Py_SIZE(x) < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to signed long");
|
|
return (signed long)-1;
|
|
}
|
|
return PyLong_AsUnsignedLong(x);
|
|
} else {
|
|
return PyLong_AsLong(x);
|
|
}
|
|
} else {
|
|
signed long val;
|
|
PyObject *tmp = __Pyx_PyNumber_Int(x);
|
|
if (!tmp) return (signed long)-1;
|
|
val = __Pyx_PyInt_AsSignedLong(tmp);
|
|
Py_DECREF(tmp);
|
|
return val;
|
|
}
|
|
}
|
|
|
|
static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
|
|
const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (likely(PyInt_Check(x))) {
|
|
long val = PyInt_AS_LONG(x);
|
|
if (is_unsigned && unlikely(val < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to signed PY_LONG_LONG");
|
|
return (signed PY_LONG_LONG)-1;
|
|
}
|
|
return (signed PY_LONG_LONG)val;
|
|
} else
|
|
#endif
|
|
if (likely(PyLong_Check(x))) {
|
|
if (is_unsigned) {
|
|
if (unlikely(Py_SIZE(x) < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to signed PY_LONG_LONG");
|
|
return (signed PY_LONG_LONG)-1;
|
|
}
|
|
return PyLong_AsUnsignedLongLong(x);
|
|
} else {
|
|
return PyLong_AsLongLong(x);
|
|
}
|
|
} else {
|
|
signed PY_LONG_LONG val;
|
|
PyObject *tmp = __Pyx_PyNumber_Int(x);
|
|
if (!tmp) return (signed PY_LONG_LONG)-1;
|
|
val = __Pyx_PyInt_AsSignedLongLong(tmp);
|
|
Py_DECREF(tmp);
|
|
return val;
|
|
}
|
|
}
|
|
|
|
static void __Pyx_WriteUnraisable(const char *name) {
|
|
PyObject *old_exc, *old_val, *old_tb;
|
|
PyObject *ctx;
|
|
__Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
|
|
#if PY_MAJOR_VERSION < 3
|
|
ctx = PyString_FromString(name);
|
|
#else
|
|
ctx = PyUnicode_FromString(name);
|
|
#endif
|
|
__Pyx_ErrRestore(old_exc, old_val, old_tb);
|
|
if (!ctx) {
|
|
PyErr_WriteUnraisable(Py_None);
|
|
} else {
|
|
PyErr_WriteUnraisable(ctx);
|
|
Py_DECREF(ctx);
|
|
}
|
|
}
|
|
|
|
#ifndef __PYX_HAVE_RT_ImportType
|
|
#define __PYX_HAVE_RT_ImportType
|
|
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
|
|
long size)
|
|
{
|
|
PyObject *py_module = 0;
|
|
PyObject *result = 0;
|
|
PyObject *py_name = 0;
|
|
|
|
py_module = __Pyx_ImportModule(module_name);
|
|
if (!py_module)
|
|
goto bad;
|
|
#if PY_MAJOR_VERSION < 3
|
|
py_name = PyString_FromString(class_name);
|
|
#else
|
|
py_name = PyUnicode_FromString(class_name);
|
|
#endif
|
|
if (!py_name)
|
|
goto bad;
|
|
result = PyObject_GetAttr(py_module, py_name);
|
|
Py_DECREF(py_name);
|
|
py_name = 0;
|
|
Py_DECREF(py_module);
|
|
py_module = 0;
|
|
if (!result)
|
|
goto bad;
|
|
if (!PyType_Check(result)) {
|
|
PyErr_Format(PyExc_TypeError,
|
|
"%s.%s is not a type object",
|
|
module_name, class_name);
|
|
goto bad;
|
|
}
|
|
if (((PyTypeObject *)result)->tp_basicsize != size) {
|
|
PyErr_Format(PyExc_ValueError,
|
|
"%s.%s does not appear to be the correct type object",
|
|
module_name, class_name);
|
|
goto bad;
|
|
}
|
|
return (PyTypeObject *)result;
|
|
bad:
|
|
Py_XDECREF(py_module);
|
|
Py_XDECREF(result);
|
|
return 0;
|
|
}
|
|
#endif
|
|
|
|
#ifndef __PYX_HAVE_RT_ImportModule
|
|
#define __PYX_HAVE_RT_ImportModule
|
|
static PyObject *__Pyx_ImportModule(const char *name) {
|
|
PyObject *py_name = 0;
|
|
PyObject *py_module = 0;
|
|
|
|
#if PY_MAJOR_VERSION < 3
|
|
py_name = PyString_FromString(name);
|
|
#else
|
|
py_name = PyUnicode_FromString(name);
|
|
#endif
|
|
if (!py_name)
|
|
goto bad;
|
|
py_module = PyImport_Import(py_name);
|
|
Py_DECREF(py_name);
|
|
return py_module;
|
|
bad:
|
|
Py_XDECREF(py_name);
|
|
return 0;
|
|
}
|
|
#endif
|
|
|
|
#include "compile.h"
|
|
#include "frameobject.h"
|
|
#include "traceback.h"
|
|
|
|
static void __Pyx_AddTraceback(const char *funcname) {
|
|
PyObject *py_srcfile = 0;
|
|
PyObject *py_funcname = 0;
|
|
PyObject *py_globals = 0;
|
|
PyCodeObject *py_code = 0;
|
|
PyFrameObject *py_frame = 0;
|
|
|
|
#if PY_MAJOR_VERSION < 3
|
|
py_srcfile = PyString_FromString(__pyx_filename);
|
|
#else
|
|
py_srcfile = PyUnicode_FromString(__pyx_filename);
|
|
#endif
|
|
if (!py_srcfile) goto bad;
|
|
if (__pyx_clineno) {
|
|
#if PY_MAJOR_VERSION < 3
|
|
py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
|
|
#else
|
|
py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
|
|
#endif
|
|
}
|
|
else {
|
|
#if PY_MAJOR_VERSION < 3
|
|
py_funcname = PyString_FromString(funcname);
|
|
#else
|
|
py_funcname = PyUnicode_FromString(funcname);
|
|
#endif
|
|
}
|
|
if (!py_funcname) goto bad;
|
|
py_globals = PyModule_GetDict(__pyx_m);
|
|
if (!py_globals) goto bad;
|
|
py_code = PyCode_New(
|
|
0, /*int argcount,*/
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*int kwonlyargcount,*/
|
|
#endif
|
|
0, /*int nlocals,*/
|
|
0, /*int stacksize,*/
|
|
0, /*int flags,*/
|
|
__pyx_empty_bytes, /*PyObject *code,*/
|
|
__pyx_empty_tuple, /*PyObject *consts,*/
|
|
__pyx_empty_tuple, /*PyObject *names,*/
|
|
__pyx_empty_tuple, /*PyObject *varnames,*/
|
|
__pyx_empty_tuple, /*PyObject *freevars,*/
|
|
__pyx_empty_tuple, /*PyObject *cellvars,*/
|
|
py_srcfile, /*PyObject *filename,*/
|
|
py_funcname, /*PyObject *name,*/
|
|
__pyx_lineno, /*int firstlineno,*/
|
|
__pyx_empty_bytes /*PyObject *lnotab*/
|
|
);
|
|
if (!py_code) goto bad;
|
|
py_frame = PyFrame_New(
|
|
PyThreadState_GET(), /*PyThreadState *tstate,*/
|
|
py_code, /*PyCodeObject *code,*/
|
|
py_globals, /*PyObject *globals,*/
|
|
0 /*PyObject *locals*/
|
|
);
|
|
if (!py_frame) goto bad;
|
|
py_frame->f_lineno = __pyx_lineno;
|
|
PyTraceBack_Here(py_frame);
|
|
bad:
|
|
Py_XDECREF(py_srcfile);
|
|
Py_XDECREF(py_funcname);
|
|
Py_XDECREF(py_code);
|
|
Py_XDECREF(py_frame);
|
|
}
|
|
|
|
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
|
|
while (t->p) {
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (t->is_unicode) {
|
|
*t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
|
|
} else if (t->intern) {
|
|
*t->p = PyString_InternFromString(t->s);
|
|
} else {
|
|
*t->p = PyString_FromStringAndSize(t->s, t->n - 1);
|
|
}
|
|
#else /* Python 3+ has unicode identifiers */
|
|
if (t->is_unicode | t->is_str) {
|
|
if (t->intern) {
|
|
*t->p = PyUnicode_InternFromString(t->s);
|
|
} else if (t->encoding) {
|
|
*t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
|
|
} else {
|
|
*t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
|
|
}
|
|
} else {
|
|
*t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
|
|
}
|
|
#endif
|
|
if (!*t->p)
|
|
return -1;
|
|
++t;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
/* Type Conversion Functions */
|
|
|
|
static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
|
|
if (x == Py_True) return 1;
|
|
else if ((x == Py_False) | (x == Py_None)) return 0;
|
|
else return PyObject_IsTrue(x);
|
|
}
|
|
|
|
static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
|
|
PyNumberMethods *m;
|
|
const char *name = NULL;
|
|
PyObject *res = NULL;
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (PyInt_Check(x) || PyLong_Check(x))
|
|
#else
|
|
if (PyLong_Check(x))
|
|
#endif
|
|
return Py_INCREF(x), x;
|
|
m = Py_TYPE(x)->tp_as_number;
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (m && m->nb_int) {
|
|
name = "int";
|
|
res = PyNumber_Int(x);
|
|
}
|
|
else if (m && m->nb_long) {
|
|
name = "long";
|
|
res = PyNumber_Long(x);
|
|
}
|
|
#else
|
|
if (m && m->nb_int) {
|
|
name = "int";
|
|
res = PyNumber_Long(x);
|
|
}
|
|
#endif
|
|
if (res) {
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (!PyInt_Check(res) && !PyLong_Check(res)) {
|
|
#else
|
|
if (!PyLong_Check(res)) {
|
|
#endif
|
|
PyErr_Format(PyExc_TypeError,
|
|
"__%s__ returned non-%s (type %.200s)",
|
|
name, name, Py_TYPE(res)->tp_name);
|
|
Py_DECREF(res);
|
|
return NULL;
|
|
}
|
|
}
|
|
else if (!PyErr_Occurred()) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"an integer is required");
|
|
}
|
|
return res;
|
|
}
|
|
|
|
static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
|
|
Py_ssize_t ival;
|
|
PyObject* x = PyNumber_Index(b);
|
|
if (!x) return -1;
|
|
ival = PyInt_AsSsize_t(x);
|
|
Py_DECREF(x);
|
|
return ival;
|
|
}
|
|
|
|
static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
if (ival <= LONG_MAX)
|
|
return PyInt_FromLong((long)ival);
|
|
else {
|
|
unsigned char *bytes = (unsigned char *) &ival;
|
|
int one = 1; int little = (int)*(unsigned char*)&one;
|
|
return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
|
|
}
|
|
#else
|
|
return PyInt_FromSize_t(ival);
|
|
#endif
|
|
}
|
|
|
|
static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
|
|
unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
|
|
if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
|
|
return (size_t)-1;
|
|
} else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"value too large to convert to size_t");
|
|
return (size_t)-1;
|
|
}
|
|
return (size_t)val;
|
|
}
|
|
|
|
|
|
#endif /* Py_PYTHON_H */
|