1
/* Generated by Cython 0.12 on Sun Mar 14 21:50:17 2010 */
3
#define PY_SSIZE_T_CLEAN
5
#include "structmember.h"
7
#error Python headers needed to compile C extensions, please install development version of Python.
10
#define PY_LONG_LONG LONG_LONG
13
#define DL_EXPORT(t) t
15
#if PY_VERSION_HEX < 0x02040000
16
#define METH_COEXIST 0
17
#define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
18
#define PyDict_Contains(d,o) PySequence_Contains(d,o)
20
#if PY_VERSION_HEX < 0x02050000
21
typedef int Py_ssize_t;
22
#define PY_SSIZE_T_MAX INT_MAX
23
#define PY_SSIZE_T_MIN INT_MIN
24
#define PY_FORMAT_SIZE_T ""
25
#define PyInt_FromSsize_t(z) PyInt_FromLong(z)
26
#define PyInt_AsSsize_t(o) PyInt_AsLong(o)
27
#define PyNumber_Index(o) PyNumber_Int(o)
28
#define PyIndex_Check(o) PyNumber_Check(o)
30
#if PY_VERSION_HEX < 0x02060000
31
#define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
32
#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
33
#define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size)
34
#define PyVarObject_HEAD_INIT(type, size) \
35
PyObject_HEAD_INIT(type) size,
36
#define PyType_Modified(t)
48
Py_ssize_t *suboffsets;
52
#define PyBUF_SIMPLE 0
53
#define PyBUF_WRITABLE 0x0001
54
#define PyBUF_FORMAT 0x0004
55
#define PyBUF_ND 0x0008
56
#define PyBUF_STRIDES (0x0010 | PyBUF_ND)
57
#define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
58
#define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
59
#define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
60
#define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
63
#if PY_MAJOR_VERSION < 3
64
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
66
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
68
#if PY_MAJOR_VERSION >= 3
69
#define Py_TPFLAGS_CHECKTYPES 0
70
#define Py_TPFLAGS_HAVE_INDEX 0
72
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
73
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
75
#if PY_MAJOR_VERSION >= 3
76
#define PyBaseString_Type PyUnicode_Type
77
#define PyString_Type PyUnicode_Type
78
#define PyString_CheckExact PyUnicode_CheckExact
80
#define PyBytes_Type PyString_Type
81
#define PyBytes_CheckExact PyString_CheckExact
83
#if PY_MAJOR_VERSION >= 3
84
#define PyInt_Type PyLong_Type
85
#define PyInt_Check(op) PyLong_Check(op)
86
#define PyInt_CheckExact(op) PyLong_CheckExact(op)
87
#define PyInt_FromString PyLong_FromString
88
#define PyInt_FromUnicode PyLong_FromUnicode
89
#define PyInt_FromLong PyLong_FromLong
90
#define PyInt_FromSize_t PyLong_FromSize_t
91
#define PyInt_FromSsize_t PyLong_FromSsize_t
92
#define PyInt_AsLong PyLong_AsLong
93
#define PyInt_AS_LONG PyLong_AS_LONG
94
#define PyInt_AsSsize_t PyLong_AsSsize_t
95
#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
96
#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
97
#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
98
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
100
#define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
101
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
103
#if PY_MAJOR_VERSION >= 3
104
#define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
106
#if !defined(WIN32) && !defined(MS_WINDOWS)
117
#define _USE_MATH_DEFINES
119
#if PY_VERSION_HEX < 0x02050000
120
#define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n)))
121
#define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
122
#define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n)))
124
#define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n))
125
#define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
126
#define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n))
128
#if PY_VERSION_HEX < 0x02050000
129
#define __Pyx_NAMESTR(n) ((char *)(n))
130
#define __Pyx_DOCSTR(n) ((char *)(n))
132
#define __Pyx_NAMESTR(n) (n)
133
#define __Pyx_DOCSTR(n) (n)
136
#define __PYX_EXTERN_C extern "C"
138
#define __PYX_EXTERN_C extern
141
#define __PYX_HAVE_API__h5py___conv
148
#include "lzf_filter.h"
152
#define INLINE __inline__
154
#define INLINE __inline
159
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*/
162
/* Type Conversion Predeclarations */
164
#if PY_MAJOR_VERSION < 3
165
#define __Pyx_PyBytes_FromString PyString_FromString
166
#define __Pyx_PyBytes_FromStringAndSize PyString_FromStringAndSize
167
#define __Pyx_PyBytes_AsString PyString_AsString
169
#define __Pyx_PyBytes_FromString PyBytes_FromString
170
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
171
#define __Pyx_PyBytes_AsString PyBytes_AsString
174
#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s)
175
#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) __Pyx_PyBytes_AsString(s))
177
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
178
static INLINE int __Pyx_PyObject_IsTrue(PyObject*);
179
static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
181
#if !defined(T_PYSSIZET)
182
#if PY_VERSION_HEX < 0x02050000
183
#define T_PYSSIZET T_INT
184
#elif !defined(T_LONGLONG)
186
((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
187
((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1))
190
((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
191
((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : \
192
((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))
197
#if !defined(T_ULONGLONG)
198
#define __Pyx_T_UNSIGNED_INT(x) \
199
((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \
200
((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
201
((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \
202
((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : -1))))
204
#define __Pyx_T_UNSIGNED_INT(x) \
205
((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \
206
((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
207
((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \
208
((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : \
209
((sizeof(x) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))))
211
#if !defined(T_LONGLONG)
212
#define __Pyx_T_SIGNED_INT(x) \
213
((sizeof(x) == sizeof(char)) ? T_BYTE : \
214
((sizeof(x) == sizeof(short)) ? T_SHORT : \
215
((sizeof(x) == sizeof(int)) ? T_INT : \
216
((sizeof(x) == sizeof(long)) ? T_LONG : -1))))
218
#define __Pyx_T_SIGNED_INT(x) \
219
((sizeof(x) == sizeof(char)) ? T_BYTE : \
220
((sizeof(x) == sizeof(short)) ? T_SHORT : \
221
((sizeof(x) == sizeof(int)) ? T_INT : \
222
((sizeof(x) == sizeof(long)) ? T_LONG : \
223
((sizeof(x) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))))
226
#define __Pyx_T_FLOATING(x) \
227
((sizeof(x) == sizeof(float)) ? T_FLOAT : \
228
((sizeof(x) == sizeof(double)) ? T_DOUBLE : -1))
230
#if !defined(T_SIZET)
231
#if !defined(T_ULONGLONG)
233
((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
234
((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1))
237
((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
238
((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : \
239
((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))
243
static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
244
static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
245
static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
247
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
251
/* Test for GCC > 2.95 */
252
#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
253
#define likely(x) __builtin_expect(!!(x), 1)
254
#define unlikely(x) __builtin_expect(!!(x), 0)
255
#else /* __GNUC__ > 2 ... */
256
#define likely(x) (x)
257
#define unlikely(x) (x)
258
#endif /* __GNUC__ > 2 ... */
260
#define likely(x) (x)
261
#define unlikely(x) (x)
262
#endif /* __GNUC__ */
264
static PyObject *__pyx_m;
265
static PyObject *__pyx_b;
266
static PyObject *__pyx_empty_tuple;
267
static PyObject *__pyx_empty_bytes;
268
static int __pyx_lineno;
269
static int __pyx_clineno = 0;
270
static const char * __pyx_cfilenm= __FILE__;
271
static const char *__pyx_filename;
272
static const char **__pyx_f;
275
/* Type declarations */
277
/* "/home/tachyon/slave/unix-release/build/h5py/h5r.pxd":20
278
* ctypedef unsigned char hdset_reg_ref_t[12]
280
* cdef union ref_u: # <<<<<<<<<<<<<<
282
* hdset_reg_ref_t reg_ref
285
union __pyx_t_4h5py_3h5r_ref_u {
287
hdset_reg_ref_t reg_ref;
290
typedef int (*__pyx_t_4h5py_5_conv_conv_operator_t)(void *, void *, void *, void *);
292
typedef herr_t (*__pyx_t_4h5py_5_conv_init_operator_t)(hid_t, hid_t, void **);
294
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":107
295
* # String to VLEN routines
297
* ctypedef struct conv_size_t: # <<<<<<<<<<<<<<
305
} __pyx_t_4h5py_5_conv_conv_size_t;
307
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":387
308
* # Enum to integer converter
310
* cdef struct conv_enum_t: # <<<<<<<<<<<<<<
315
struct __pyx_t_4h5py_5_conv_conv_enum_t {
322
/* "/home/tachyon/slave/unix-release/build/h5py/h5r.pxd":24
323
* hdset_reg_ref_t reg_ref
325
* cdef class Reference: # <<<<<<<<<<<<<<
330
struct __pyx_obj_4h5py_3h5r_Reference {
332
union __pyx_t_4h5py_3h5r_ref_u ref;
337
/* "/home/tachyon/slave/unix-release/build/h5py/h5r.pxd":30
338
* cdef readonly size_t typesize
340
* cdef class RegionReference(Reference): # <<<<<<<<<<<<<<
345
struct __pyx_obj_4h5py_3h5r_RegionReference {
346
struct __pyx_obj_4h5py_3h5r_Reference __pyx_base;
349
#ifndef CYTHON_REFNANNY
350
#define CYTHON_REFNANNY 0
355
void (*INCREF)(void*, PyObject*, int);
356
void (*DECREF)(void*, PyObject*, int);
357
void (*GOTREF)(void*, PyObject*, int);
358
void (*GIVEREF)(void*, PyObject*, int);
359
void* (*SetupContext)(const char*, int, const char*);
360
void (*FinishContext)(void**);
361
} __Pyx_RefNannyAPIStruct;
362
static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
363
static __Pyx_RefNannyAPIStruct * __Pyx_RefNannyImportAPI(const char *modname) {
364
PyObject *m = NULL, *p = NULL;
366
m = PyImport_ImportModule((char *)modname);
368
p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
370
r = PyLong_AsVoidPtr(p);
374
return (__Pyx_RefNannyAPIStruct *)r;
376
#define __Pyx_RefNannySetupContext(name) void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
377
#define __Pyx_RefNannyFinishContext() __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
378
#define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
379
#define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
380
#define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
381
#define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
382
#define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0)
384
#define __Pyx_RefNannySetupContext(name)
385
#define __Pyx_RefNannyFinishContext()
386
#define __Pyx_INCREF(r) Py_INCREF(r)
387
#define __Pyx_DECREF(r) Py_DECREF(r)
388
#define __Pyx_GOTREF(r)
389
#define __Pyx_GIVEREF(r)
390
#define __Pyx_XDECREF(r) Py_XDECREF(r)
391
#endif /* CYTHON_REFNANNY */
392
#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
393
#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)
395
static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
396
static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
398
static INLINE PyObject *__Pyx_PyInt_to_py_hid_t(hid_t);
400
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
402
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
404
static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
406
static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
408
static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
410
static INLINE char __Pyx_PyInt_AsChar(PyObject *);
412
static INLINE short __Pyx_PyInt_AsShort(PyObject *);
414
static INLINE int __Pyx_PyInt_AsInt(PyObject *);
416
static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
418
static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
420
static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
422
static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
424
static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
426
static INLINE long __Pyx_PyInt_AsLong(PyObject *);
428
static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
430
static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
432
static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
434
static void __Pyx_WriteUnraisable(const char *name); /*proto*/
436
#ifndef __PYX_FORCE_INIT_THREADS
437
#if PY_VERSION_HEX < 0x02040200
438
#define __PYX_FORCE_INIT_THREADS 1
440
#define __PYX_FORCE_INIT_THREADS 0
444
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size); /*proto*/
446
static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
448
static void __Pyx_AddTraceback(const char *funcname); /*proto*/
450
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
451
/* Module declarations from h5py.h5r */
453
static PyTypeObject *__pyx_ptype_4h5py_3h5r_Reference = 0;
454
static PyTypeObject *__pyx_ptype_4h5py_3h5r_RegionReference = 0;
455
/* Module declarations from h5py._conv */
457
static hid_t __pyx_v_4h5py_5_conv_H5PY_OBJ;
458
static hid_t __pyx_f_4h5py_5_conv_get_python_obj(int __pyx_skip_dispatch); /*proto*/
459
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*/
460
static herr_t __pyx_f_4h5py_5_conv_init_generic(hid_t, hid_t, void **); /*proto*/
461
static int __pyx_f_4h5py_5_conv_conv_vlen2str(void *, void *, void *, void *); /*proto*/
462
static int __pyx_f_4h5py_5_conv_conv_str2vlen(void *, void *, void *, void *); /*proto*/
463
static herr_t __pyx_f_4h5py_5_conv_init_vlen2fixed(hid_t, hid_t, void **); /*proto*/
464
static herr_t __pyx_f_4h5py_5_conv_init_fixed2vlen(hid_t, hid_t, void **); /*proto*/
465
static int __pyx_f_4h5py_5_conv_conv_vlen2fixed(void *, void *, void *, void *); /*proto*/
466
static int __pyx_f_4h5py_5_conv_conv_fixed2vlen(void *, void *, void *, void *); /*proto*/
467
static int __pyx_f_4h5py_5_conv_conv_objref2pyref(void *, void *, void *, void *); /*proto*/
468
static int __pyx_f_4h5py_5_conv_conv_pyref2objref(void *, void *, void *, void *); /*proto*/
469
static int __pyx_f_4h5py_5_conv_conv_regref2pyref(void *, void *, void *, void *); /*proto*/
470
static int __pyx_f_4h5py_5_conv_conv_pyref2regref(void *, void *, void *, void *); /*proto*/
471
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*/
472
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*/
473
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*/
474
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*/
475
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*/
476
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*/
477
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*/
478
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*/
479
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*/
480
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*/
481
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*/
482
static int __pyx_f_4h5py_5_conv_register_converters(int __pyx_skip_dispatch); /*proto*/
483
static int __pyx_f_4h5py_5_conv_unregister_converters(int __pyx_skip_dispatch); /*proto*/
484
#define __Pyx_MODULE_NAME "h5py._conv"
485
int __pyx_module_is_main_h5py___conv = 0;
487
/* Implementation of h5py._conv */
488
static PyObject *__pyx_builtin_ValueError;
489
static PyObject *__pyx_builtin_TypeError;
490
static PyObject *__pyx_builtin_MemoryError;
491
static char __pyx_k_1[] = "PYTHON:OBJECT";
492
static char __pyx_k_2[] = "";
493
static char __pyx_k_3[] = "VLEN strings do not support embedded NULLs";
494
static char __pyx_k_4[] = "Can't convert incompatible object to HDF5 object reference";
495
static char __pyx_k_5[] = "Can't convert incompatible object to HDF5 region reference";
496
static char __pyx_k_6[] = "Can't allocate conversion buffer";
497
static char __pyx_k_7[] = "\n Low-level type-conversion routines.\n";
498
static char __pyx_k__ref[] = "ref";
499
static char __pyx_k__priv[] = "priv";
500
static char __pyx_k__command[] = "command";
501
static char __pyx_k__obj_ref[] = "obj_ref";
502
static char __pyx_k__reg_ref[] = "reg_ref";
503
static char __pyx_k____main__[] = "__main__";
504
static char __pyx_k__dst_size[] = "dst_size";
505
static char __pyx_k__enum2int[] = "enum2int";
506
static char __pyx_k__int2enum[] = "int2enum";
507
static char __pyx_k__need_bkg[] = "need_bkg";
508
static char __pyx_k__src_size[] = "src_size";
509
static char __pyx_k__str2vlen[] = "str2vlen";
510
static char __pyx_k__typecode[] = "typecode";
511
static char __pyx_k__vlen2str[] = "vlen2str";
512
static char __pyx_k__TypeError[] = "TypeError";
513
static char __pyx_k__identical[] = "identical";
514
static char __pyx_k__supertype[] = "supertype";
515
static char __pyx_k__ValueError[] = "ValueError";
516
static char __pyx_k__fixed2vlen[] = "fixed2vlen";
517
static char __pyx_k__vlen2fixed[] = "vlen2fixed";
518
static char __pyx_k__MemoryError[] = "MemoryError";
519
static char __pyx_k__objref2pyref[] = "objref2pyref";
520
static char __pyx_k__pyref2objref[] = "pyref2objref";
521
static char __pyx_k__pyref2regref[] = "pyref2regref";
522
static char __pyx_k__regref2pyref[] = "regref2pyref";
523
static PyObject *__pyx_kp_s_3;
524
static PyObject *__pyx_kp_s_4;
525
static PyObject *__pyx_kp_s_5;
526
static PyObject *__pyx_kp_s_6;
527
static PyObject *__pyx_n_s__MemoryError;
528
static PyObject *__pyx_n_s__TypeError;
529
static PyObject *__pyx_n_s__ValueError;
530
static PyObject *__pyx_n_s____main__;
531
static PyObject *__pyx_n_s__command;
532
static PyObject *__pyx_n_s__dst_size;
533
static PyObject *__pyx_n_s__identical;
534
static PyObject *__pyx_n_s__need_bkg;
535
static PyObject *__pyx_n_s__obj_ref;
536
static PyObject *__pyx_n_s__priv;
537
static PyObject *__pyx_n_s__ref;
538
static PyObject *__pyx_n_s__reg_ref;
539
static PyObject *__pyx_n_s__src_size;
540
static PyObject *__pyx_n_s__supertype;
541
static PyObject *__pyx_n_s__typecode;
543
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":24
544
* cdef hid_t H5PY_OBJ = 0
546
* cpdef hid_t get_python_obj(): # <<<<<<<<<<<<<<
551
static PyObject *__pyx_pf_4h5py_5_conv_get_python_obj(PyObject *__pyx_self, PyObject *unused); /*proto*/
552
static hid_t __pyx_f_4h5py_5_conv_get_python_obj(int __pyx_skip_dispatch) {
557
__Pyx_RefNannySetupContext("get_python_obj");
559
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":26
560
* cpdef hid_t get_python_obj():
562
* if H5PY_OBJ <= 0: # <<<<<<<<<<<<<<
563
* H5PY_OBJ = H5Tcreate(H5T_OPAQUE, sizeof(PyObject*))
564
* H5Tset_tag(H5PY_OBJ, "PYTHON:OBJECT")
566
__pyx_t_1 = (__pyx_v_4h5py_5_conv_H5PY_OBJ <= 0);
569
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":27
572
* H5PY_OBJ = H5Tcreate(H5T_OPAQUE, sizeof(PyObject*)) # <<<<<<<<<<<<<<
573
* H5Tset_tag(H5PY_OBJ, "PYTHON:OBJECT")
576
__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;}
577
__pyx_v_4h5py_5_conv_H5PY_OBJ = __pyx_t_2;
579
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":28
581
* H5PY_OBJ = H5Tcreate(H5T_OPAQUE, sizeof(PyObject*))
582
* H5Tset_tag(H5PY_OBJ, "PYTHON:OBJECT") # <<<<<<<<<<<<<<
586
__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;}
588
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":29
589
* H5PY_OBJ = H5Tcreate(H5T_OPAQUE, sizeof(PyObject*))
590
* H5Tset_tag(H5PY_OBJ, "PYTHON:OBJECT")
591
* H5Tlock(H5PY_OBJ) # <<<<<<<<<<<<<<
595
__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;}
600
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":30
601
* H5Tset_tag(H5PY_OBJ, "PYTHON:OBJECT")
603
* return H5PY_OBJ # <<<<<<<<<<<<<<
605
* ctypedef int (*conv_operator_t)(void* ipt, void* opt, void* bkg, void* priv) except -1
607
__pyx_r = __pyx_v_4h5py_5_conv_H5PY_OBJ;
613
__Pyx_WriteUnraisable("h5py._conv.get_python_obj");
616
__Pyx_RefNannyFinishContext();
620
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":24
621
* cdef hid_t H5PY_OBJ = 0
623
* cpdef hid_t get_python_obj(): # <<<<<<<<<<<<<<
628
static PyObject *__pyx_pf_4h5py_5_conv_get_python_obj(PyObject *__pyx_self, PyObject *unused); /*proto*/
629
static PyObject *__pyx_pf_4h5py_5_conv_get_python_obj(PyObject *__pyx_self, PyObject *unused) {
630
PyObject *__pyx_r = NULL;
631
PyObject *__pyx_t_1 = NULL;
632
__Pyx_RefNannySetupContext("get_python_obj");
633
__pyx_self = __pyx_self;
634
__Pyx_XDECREF(__pyx_r);
635
__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;}
636
__Pyx_GOTREF(__pyx_t_1);
641
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
644
__Pyx_XDECREF(__pyx_t_1);
645
__Pyx_AddTraceback("h5py._conv.get_python_obj");
648
__Pyx_XGIVEREF(__pyx_r);
649
__Pyx_RefNannyFinishContext();
653
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":44
654
* # likely small compared to the cost of the Python-side API calls required to
655
* # implement the conversions.
656
* cdef herr_t generic_converter(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
657
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
658
* void *bkg_i, hid_t dxpl, conv_operator_t op,
661
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) {
663
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_v_sizes;
672
__Pyx_RefNannySetupContext("generic_converter");
674
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":49
675
* init_operator_t initop, H5T_bkg_t need_bkg) except -1:
677
* cdef int command = cdata[0].command # <<<<<<<<<<<<<<
678
* cdef conv_size_t *sizes
681
__pyx_v_command = (__pyx_v_cdata[0]).command;
683
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":53
686
* cdef char* buf = <char*>buf_i # <<<<<<<<<<<<<<
687
* cdef char* bkg = <char*>bkg_i
690
__pyx_v_buf = ((char *)__pyx_v_buf_i);
692
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":54
694
* cdef char* buf = <char*>buf_i
695
* cdef char* bkg = <char*>bkg_i # <<<<<<<<<<<<<<
697
* if command == H5T_CONV_INIT:
699
__pyx_v_bkg = ((char *)__pyx_v_bkg_i);
701
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":56
702
* cdef char* bkg = <char*>bkg_i
704
* if command == H5T_CONV_INIT: # <<<<<<<<<<<<<<
706
* cdata[0].need_bkg = need_bkg
708
__pyx_t_1 = (__pyx_v_command == H5T_CONV_INIT);
711
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":58
712
* if command == H5T_CONV_INIT:
714
* cdata[0].need_bkg = need_bkg # <<<<<<<<<<<<<<
715
* return initop(src_id, dst_id, &(cdata[0].priv))
718
(__pyx_v_cdata[0]).need_bkg = __pyx_v_need_bkg;
720
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":59
722
* cdata[0].need_bkg = need_bkg
723
* return initop(src_id, dst_id, &(cdata[0].priv)) # <<<<<<<<<<<<<<
725
* elif command == H5T_CONV_FREE:
727
__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;}
733
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":61
734
* return initop(src_id, dst_id, &(cdata[0].priv))
736
* elif command == H5T_CONV_FREE: # <<<<<<<<<<<<<<
738
* free(cdata[0].priv)
740
__pyx_t_1 = (__pyx_v_command == H5T_CONV_FREE);
743
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":63
744
* elif command == H5T_CONV_FREE:
746
* free(cdata[0].priv) # <<<<<<<<<<<<<<
747
* cdata[0].priv = NULL
750
free((__pyx_v_cdata[0]).priv);
752
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":64
754
* free(cdata[0].priv)
755
* cdata[0].priv = NULL # <<<<<<<<<<<<<<
757
* elif command == H5T_CONV_CONV:
759
(__pyx_v_cdata[0]).priv = NULL;
763
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":66
764
* cdata[0].priv = NULL
766
* elif command == H5T_CONV_CONV: # <<<<<<<<<<<<<<
768
* sizes = <conv_size_t*>cdata[0].priv
770
__pyx_t_1 = (__pyx_v_command == H5T_CONV_CONV);
773
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":68
774
* elif command == H5T_CONV_CONV:
776
* sizes = <conv_size_t*>cdata[0].priv # <<<<<<<<<<<<<<
778
* if bkg_stride==0: bkg_stride = sizes[0].dst_size;
780
__pyx_v_sizes = ((__pyx_t_4h5py_5_conv_conv_size_t *)(__pyx_v_cdata[0]).priv);
782
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":70
783
* sizes = <conv_size_t*>cdata[0].priv
785
* if bkg_stride==0: bkg_stride = sizes[0].dst_size; # <<<<<<<<<<<<<<
787
* if buf_stride == 0:
789
__pyx_t_1 = (__pyx_v_bkg_stride == 0);
791
__pyx_v_bkg_stride = (__pyx_v_sizes[0]).dst_size;
796
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":72
797
* if bkg_stride==0: bkg_stride = sizes[0].dst_size;
799
* if buf_stride == 0: # <<<<<<<<<<<<<<
800
* # No explicit stride seems to mean that the elements are packed
801
* # contiguously in the buffer. In this case we must be careful
803
__pyx_t_1 = (__pyx_v_buf_stride == 0);
806
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":78
807
* # of a larger size.
809
* if sizes[0].src_size >= sizes[0].dst_size: # <<<<<<<<<<<<<<
810
* for i from 0<=i<nl:
811
* op( buf + (i*sizes[0].src_size), # input pointer
813
__pyx_t_1 = ((__pyx_v_sizes[0]).src_size >= (__pyx_v_sizes[0]).dst_size);
816
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":79
818
* if sizes[0].src_size >= sizes[0].dst_size:
819
* for i from 0<=i<nl: # <<<<<<<<<<<<<<
820
* op( buf + (i*sizes[0].src_size), # input pointer
821
* buf + (i*sizes[0].dst_size), # output pointer
823
__pyx_t_3 = __pyx_v_nl;
824
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
826
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":83
827
* buf + (i*sizes[0].dst_size), # output pointer
828
* bkg + (i*bkg_stride), # backing buffer
829
* cdata[0].priv) # conversion context # <<<<<<<<<<<<<<
831
* for i from nl>i>=0:
833
__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;}
839
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":85
840
* cdata[0].priv) # conversion context
842
* for i from nl>i>=0: # <<<<<<<<<<<<<<
843
* op( buf + (i*sizes[0].src_size),
844
* buf + (i*sizes[0].dst_size),
846
for (__pyx_v_i = __pyx_v_nl-1; __pyx_v_i >= 0; __pyx_v_i--) {
848
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":89
849
* buf + (i*sizes[0].dst_size),
850
* bkg + (i*bkg_stride),
851
* cdata[0].priv) # <<<<<<<<<<<<<<
853
* # With explicit strides, we assume that the library knows the
855
__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;}
863
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":94
864
* # alignment better than us. Therefore we use the given stride
865
* # offsets exclusively.
866
* for i from 0<=i<nl: # <<<<<<<<<<<<<<
867
* op( buf + (i*buf_stride),
868
* buf + (i*buf_stride), # note this is the same!
870
__pyx_t_3 = __pyx_v_nl;
871
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
873
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":98
874
* buf + (i*buf_stride), # note this is the same!
875
* bkg + (i*bkg_stride),
876
* cdata[0].priv) # <<<<<<<<<<<<<<
878
* return -2 # Unrecognized command. Note this is NOT an exception.
880
__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;}
888
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":100
891
* return -2 # Unrecognized command. Note this is NOT an exception. # <<<<<<<<<<<<<<
900
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":102
901
* return -2 # Unrecognized command. Note this is NOT an exception.
903
* return 0 # <<<<<<<<<<<<<<
905
* # =============================================================================
913
__Pyx_AddTraceback("h5py._conv.generic_converter");
916
__Pyx_RefNannyFinishContext();
920
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":111
923
* cdef herr_t init_generic(hid_t src, hid_t dst, void** priv) except -1: # <<<<<<<<<<<<<<
925
* cdef conv_size_t *sizes
928
static herr_t __pyx_f_4h5py_5_conv_init_generic(hid_t __pyx_v_src, hid_t __pyx_v_dst, void **__pyx_v_priv) {
929
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_v_sizes;
931
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_t_1;
933
__Pyx_RefNannySetupContext("init_generic");
935
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":114
937
* cdef conv_size_t *sizes
938
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t)) # <<<<<<<<<<<<<<
939
* sizes[0].src_size = H5Tget_size(src)
940
* sizes[0].dst_size = H5Tget_size(dst)
942
__pyx_t_1 = ((__pyx_t_4h5py_5_conv_conv_size_t *)malloc((sizeof(__pyx_t_4h5py_5_conv_conv_size_t))));
943
(__pyx_v_priv[0]) = __pyx_t_1;
944
__pyx_v_sizes = __pyx_t_1;
946
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":115
947
* cdef conv_size_t *sizes
948
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t))
949
* sizes[0].src_size = H5Tget_size(src) # <<<<<<<<<<<<<<
950
* sizes[0].dst_size = H5Tget_size(dst)
953
__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;}
954
(__pyx_v_sizes[0]).src_size = __pyx_t_2;
956
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":116
957
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t))
958
* sizes[0].src_size = H5Tget_size(src)
959
* sizes[0].dst_size = H5Tget_size(dst) # <<<<<<<<<<<<<<
963
__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;}
964
(__pyx_v_sizes[0]).dst_size = __pyx_t_2;
966
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":118
967
* sizes[0].dst_size = H5Tget_size(dst)
969
* return 0 # <<<<<<<<<<<<<<
971
* cdef int conv_vlen2str(void* ipt, void* opt, void* bkg, void* priv) except -1:
979
__Pyx_AddTraceback("h5py._conv.init_generic");
982
__Pyx_RefNannyFinishContext();
986
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":120
989
* cdef int conv_vlen2str(void* ipt, void* opt, void* bkg, void* priv) except -1: # <<<<<<<<<<<<<<
991
* cdef PyObject** buf_obj = <PyObject**>opt
994
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) {
995
PyObject **__pyx_v_buf_obj;
996
PyObject **__pyx_v_bkg_obj;
997
char **__pyx_v_buf_cstring;
998
PyObject *__pyx_v_temp_obj;
1001
PyObject *__pyx_t_2;
1002
__Pyx_RefNannySetupContext("conv_vlen2str");
1004
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":122
1005
* cdef int conv_vlen2str(void* ipt, void* opt, void* bkg, void* priv) except -1:
1007
* cdef PyObject** buf_obj = <PyObject**>opt # <<<<<<<<<<<<<<
1008
* cdef PyObject** bkg_obj = <PyObject**>bkg
1009
* cdef char** buf_cstring = <char**>ipt
1011
__pyx_v_buf_obj = ((PyObject **)__pyx_v_opt);
1013
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":123
1015
* cdef PyObject** buf_obj = <PyObject**>opt
1016
* cdef PyObject** bkg_obj = <PyObject**>bkg # <<<<<<<<<<<<<<
1017
* cdef char** buf_cstring = <char**>ipt
1018
* cdef PyObject* temp_obj = NULL
1020
__pyx_v_bkg_obj = ((PyObject **)__pyx_v_bkg);
1022
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":124
1023
* cdef PyObject** buf_obj = <PyObject**>opt
1024
* cdef PyObject** bkg_obj = <PyObject**>bkg
1025
* cdef char** buf_cstring = <char**>ipt # <<<<<<<<<<<<<<
1026
* cdef PyObject* temp_obj = NULL
1029
__pyx_v_buf_cstring = ((char **)__pyx_v_ipt);
1031
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":125
1032
* cdef PyObject** bkg_obj = <PyObject**>bkg
1033
* cdef char** buf_cstring = <char**>ipt
1034
* cdef PyObject* temp_obj = NULL # <<<<<<<<<<<<<<
1036
* if buf_cstring[0] == NULL:
1038
__pyx_v_temp_obj = NULL;
1040
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":127
1041
* cdef PyObject* temp_obj = NULL
1043
* if buf_cstring[0] == NULL: # <<<<<<<<<<<<<<
1044
* temp_obj = PyString_FromString("")
1047
__pyx_t_1 = ((__pyx_v_buf_cstring[0]) == NULL);
1050
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":128
1052
* if buf_cstring[0] == NULL:
1053
* temp_obj = PyString_FromString("") # <<<<<<<<<<<<<<
1055
* temp_obj = PyString_FromString(buf_cstring[0])
1057
__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;}
1058
__pyx_v_temp_obj = __pyx_t_2;
1063
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":130
1064
* temp_obj = PyString_FromString("")
1066
* temp_obj = PyString_FromString(buf_cstring[0]) # <<<<<<<<<<<<<<
1068
* # Since all data conversions are by definition in-place, it
1070
__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;}
1071
__pyx_v_temp_obj = __pyx_t_2;
1075
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":134
1076
* # Since all data conversions are by definition in-place, it
1077
* # is our responsibility to free the memory used by the vlens.
1078
* free(buf_cstring[0]) # <<<<<<<<<<<<<<
1080
* # HDF5 will eventuallly overwrite this target location, so we
1082
free((__pyx_v_buf_cstring[0]));
1084
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":138
1085
* # HDF5 will eventuallly overwrite this target location, so we
1086
* # make sure to decref the object there.
1087
* Py_XDECREF(bkg_obj[0]) # <<<<<<<<<<<<<<
1089
* # Write the new string object to the buffer in-place
1091
Py_XDECREF((__pyx_v_bkg_obj[0]));
1093
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":141
1095
* # Write the new string object to the buffer in-place
1096
* buf_obj[0] = temp_obj # <<<<<<<<<<<<<<
1100
(__pyx_v_buf_obj[0]) = __pyx_v_temp_obj;
1102
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":143
1103
* buf_obj[0] = temp_obj
1105
* return 0 # <<<<<<<<<<<<<<
1107
* cdef int conv_str2vlen(void* ipt, void* opt, void* bkg, void* priv) except -1:
1115
__Pyx_AddTraceback("h5py._conv.conv_vlen2str");
1118
__Pyx_RefNannyFinishContext();
1122
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":145
1125
* cdef int conv_str2vlen(void* ipt, void* opt, void* bkg, void* priv) except -1: # <<<<<<<<<<<<<<
1127
* cdef PyObject** buf_obj = <PyObject**>ipt
1130
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) {
1131
PyObject **__pyx_v_buf_obj;
1132
char **__pyx_v_buf_cstring;
1133
PyObject *__pyx_v_temp_object;
1134
char *__pyx_v_temp_string;
1135
size_t __pyx_v_temp_string_len;
1142
PyObject *__pyx_t_6;
1143
PyObject *__pyx_t_7 = NULL;
1144
PyObject *__pyx_t_8 = NULL;
1145
__Pyx_RefNannySetupContext("conv_str2vlen");
1147
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":147
1148
* cdef int conv_str2vlen(void* ipt, void* opt, void* bkg, void* priv) except -1:
1150
* cdef PyObject** buf_obj = <PyObject**>ipt # <<<<<<<<<<<<<<
1151
* cdef char** buf_cstring = <char**>opt
1154
__pyx_v_buf_obj = ((PyObject **)__pyx_v_ipt);
1156
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":148
1158
* cdef PyObject** buf_obj = <PyObject**>ipt
1159
* cdef char** buf_cstring = <char**>opt # <<<<<<<<<<<<<<
1161
* cdef PyObject* temp_object = NULL
1163
__pyx_v_buf_cstring = ((char **)__pyx_v_opt);
1165
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":150
1166
* cdef char** buf_cstring = <char**>opt
1168
* cdef PyObject* temp_object = NULL # <<<<<<<<<<<<<<
1169
* cdef char* temp_string = NULL
1170
* cdef size_t temp_string_len = 0 # Not including null term
1172
__pyx_v_temp_object = NULL;
1174
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":151
1176
* cdef PyObject* temp_object = NULL
1177
* cdef char* temp_string = NULL # <<<<<<<<<<<<<<
1178
* cdef size_t temp_string_len = 0 # Not including null term
1181
__pyx_v_temp_string = NULL;
1183
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":152
1184
* cdef PyObject* temp_object = NULL
1185
* cdef char* temp_string = NULL
1186
* cdef size_t temp_string_len = 0 # Not including null term # <<<<<<<<<<<<<<
1190
__pyx_v_temp_string_len = 0;
1192
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":154
1193
* cdef size_t temp_string_len = 0 # Not including null term
1195
* try: # <<<<<<<<<<<<<<
1196
* if buf_obj[0] == NULL or buf_obj[0] == Py_None:
1201
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":155
1204
* if buf_obj[0] == NULL or buf_obj[0] == Py_None: # <<<<<<<<<<<<<<
1206
* temp_string_len = 0
1208
__pyx_t_1 = ((__pyx_v_buf_obj[0]) == NULL);
1210
__pyx_t_2 = ((__pyx_v_buf_obj[0]) == Py_None);
1211
__pyx_t_3 = __pyx_t_2;
1213
__pyx_t_3 = __pyx_t_1;
1217
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":156
1219
* if buf_obj[0] == NULL or buf_obj[0] == Py_None:
1220
* temp_string = "" # <<<<<<<<<<<<<<
1221
* temp_string_len = 0
1224
__pyx_v_temp_string = __pyx_k_2;
1226
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":157
1227
* if buf_obj[0] == NULL or buf_obj[0] == Py_None:
1229
* temp_string_len = 0 # <<<<<<<<<<<<<<
1231
* if PyString_CheckExact(buf_obj[0]):
1233
__pyx_v_temp_string_len = 0;
1238
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":159
1239
* temp_string_len = 0
1241
* if PyString_CheckExact(buf_obj[0]): # <<<<<<<<<<<<<<
1242
* temp_object = buf_obj[0]
1243
* Py_INCREF(temp_object)
1245
__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;}
1248
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":160
1250
* if PyString_CheckExact(buf_obj[0]):
1251
* temp_object = buf_obj[0] # <<<<<<<<<<<<<<
1252
* Py_INCREF(temp_object)
1253
* temp_string = PyString_AsString(temp_object)
1255
__pyx_v_temp_object = (__pyx_v_buf_obj[0]);
1257
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":161
1258
* if PyString_CheckExact(buf_obj[0]):
1259
* temp_object = buf_obj[0]
1260
* Py_INCREF(temp_object) # <<<<<<<<<<<<<<
1261
* temp_string = PyString_AsString(temp_object)
1262
* temp_string_len = PyString_Size(temp_object)
1264
Py_INCREF(__pyx_v_temp_object);
1266
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":162
1267
* temp_object = buf_obj[0]
1268
* Py_INCREF(temp_object)
1269
* temp_string = PyString_AsString(temp_object) # <<<<<<<<<<<<<<
1270
* temp_string_len = PyString_Size(temp_object)
1273
__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;}
1274
__pyx_v_temp_string = __pyx_t_5;
1276
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":163
1277
* Py_INCREF(temp_object)
1278
* temp_string = PyString_AsString(temp_object)
1279
* temp_string_len = PyString_Size(temp_object) # <<<<<<<<<<<<<<
1281
* temp_object = PyObject_Str(buf_obj[0])
1283
__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;}
1284
__pyx_v_temp_string_len = __pyx_t_4;
1289
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":165
1290
* temp_string_len = PyString_Size(temp_object)
1292
* temp_object = PyObject_Str(buf_obj[0]) # <<<<<<<<<<<<<<
1293
* temp_string = PyString_AsString(temp_object)
1294
* temp_string_len = PyString_Size(temp_object)
1296
__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;}
1297
__pyx_v_temp_object = __pyx_t_6;
1299
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":166
1301
* temp_object = PyObject_Str(buf_obj[0])
1302
* temp_string = PyString_AsString(temp_object) # <<<<<<<<<<<<<<
1303
* temp_string_len = PyString_Size(temp_object)
1306
__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;}
1307
__pyx_v_temp_string = __pyx_t_5;
1309
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":167
1310
* temp_object = PyObject_Str(buf_obj[0])
1311
* temp_string = PyString_AsString(temp_object)
1312
* temp_string_len = PyString_Size(temp_object) # <<<<<<<<<<<<<<
1314
* if strlen(temp_string) != temp_string_len:
1316
__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;}
1317
__pyx_v_temp_string_len = __pyx_t_4;
1323
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":169
1324
* temp_string_len = PyString_Size(temp_object)
1326
* if strlen(temp_string) != temp_string_len: # <<<<<<<<<<<<<<
1327
* raise ValueError("VLEN strings do not support embedded NULLs")
1330
__pyx_t_3 = (strlen(__pyx_v_temp_string) != __pyx_v_temp_string_len);
1333
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":170
1335
* if strlen(temp_string) != temp_string_len:
1336
* raise ValueError("VLEN strings do not support embedded NULLs") # <<<<<<<<<<<<<<
1338
* buf_cstring[0] = <char*>malloc(temp_string_len+1)
1340
__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;}
1341
__Pyx_GOTREF(__pyx_t_7);
1342
__Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
1343
PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_kp_s_3));
1344
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
1345
__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;}
1346
__Pyx_GOTREF(__pyx_t_8);
1347
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
1348
__Pyx_Raise(__pyx_t_8, 0, 0);
1349
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
1350
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L4;}
1355
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":172
1356
* raise ValueError("VLEN strings do not support embedded NULLs")
1358
* buf_cstring[0] = <char*>malloc(temp_string_len+1) # <<<<<<<<<<<<<<
1359
* memcpy(buf_cstring[0], temp_string, temp_string_len+1)
1362
(__pyx_v_buf_cstring[0]) = ((char *)malloc((__pyx_v_temp_string_len + 1)));
1364
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":173
1366
* buf_cstring[0] = <char*>malloc(temp_string_len+1)
1367
* memcpy(buf_cstring[0], temp_string, temp_string_len+1) # <<<<<<<<<<<<<<
1371
memcpy((__pyx_v_buf_cstring[0]), __pyx_v_temp_string, (__pyx_v_temp_string_len + 1));
1373
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":175
1374
* memcpy(buf_cstring[0], temp_string, temp_string_len+1)
1376
* return 0 # <<<<<<<<<<<<<<
1378
* Py_XDECREF(temp_object)
1385
PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
1386
int __pyx_exc_lineno;
1387
__pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
1388
__pyx_why = 0; goto __pyx_L5;
1389
__pyx_L3: __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
1390
__pyx_why = 3; goto __pyx_L5;
1393
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
1394
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
1395
__Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
1396
__pyx_exc_lineno = __pyx_lineno;
1401
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":177
1404
* Py_XDECREF(temp_object) # <<<<<<<<<<<<<<
1408
Py_XDECREF(__pyx_v_temp_object);
1409
switch (__pyx_why) {
1410
case 3: goto __pyx_L0;
1412
__Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
1413
__pyx_lineno = __pyx_exc_lineno;
1415
__pyx_exc_value = 0;
1417
goto __pyx_L1_error;
1425
__Pyx_XDECREF(__pyx_t_7);
1426
__Pyx_XDECREF(__pyx_t_8);
1427
__Pyx_AddTraceback("h5py._conv.conv_str2vlen");
1430
__Pyx_RefNannyFinishContext();
1434
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":183
1435
* # VLEN to fixed-width strings
1437
* cdef herr_t init_vlen2fixed(hid_t src, hid_t dst, void** priv) except -1: # <<<<<<<<<<<<<<
1439
* cdef conv_size_t *sizes
1442
static herr_t __pyx_f_4h5py_5_conv_init_vlen2fixed(hid_t __pyx_v_src, hid_t __pyx_v_dst, void **__pyx_v_priv) {
1443
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_v_sizes;
1449
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_t_5;
1451
__Pyx_RefNannySetupContext("init_vlen2fixed");
1453
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":187
1454
* cdef conv_size_t *sizes
1456
* if not (H5Tis_variable_str(src) and (not H5Tis_variable_str(dst))): # <<<<<<<<<<<<<<
1460
__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;}
1462
__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;}
1463
__pyx_t_3 = (!__pyx_t_2);
1464
__pyx_t_4 = __pyx_t_3;
1466
__pyx_t_4 = __pyx_t_1;
1468
__pyx_t_3 = (!__pyx_t_4);
1471
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":188
1473
* if not (H5Tis_variable_str(src) and (not H5Tis_variable_str(dst))):
1474
* return -2 # <<<<<<<<<<<<<<
1476
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t))
1484
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":190
1487
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t)) # <<<<<<<<<<<<<<
1488
* sizes[0].src_size = H5Tget_size(src)
1489
* sizes[0].dst_size = H5Tget_size(dst)
1491
__pyx_t_5 = ((__pyx_t_4h5py_5_conv_conv_size_t *)malloc((sizeof(__pyx_t_4h5py_5_conv_conv_size_t))));
1492
(__pyx_v_priv[0]) = __pyx_t_5;
1493
__pyx_v_sizes = __pyx_t_5;
1495
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":191
1497
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t))
1498
* sizes[0].src_size = H5Tget_size(src) # <<<<<<<<<<<<<<
1499
* sizes[0].dst_size = H5Tget_size(dst)
1502
__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;}
1503
(__pyx_v_sizes[0]).src_size = __pyx_t_6;
1505
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":192
1506
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t))
1507
* sizes[0].src_size = H5Tget_size(src)
1508
* sizes[0].dst_size = H5Tget_size(dst) # <<<<<<<<<<<<<<
1512
__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;}
1513
(__pyx_v_sizes[0]).dst_size = __pyx_t_6;
1515
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":194
1516
* sizes[0].dst_size = H5Tget_size(dst)
1518
* return 0 # <<<<<<<<<<<<<<
1520
* cdef herr_t init_fixed2vlen(hid_t src, hid_t dst, void** priv) except -1:
1528
__Pyx_AddTraceback("h5py._conv.init_vlen2fixed");
1531
__Pyx_RefNannyFinishContext();
1535
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":196
1538
* cdef herr_t init_fixed2vlen(hid_t src, hid_t dst, void** priv) except -1: # <<<<<<<<<<<<<<
1540
* cdef conv_size_t *sizes
1543
static herr_t __pyx_f_4h5py_5_conv_init_fixed2vlen(hid_t __pyx_v_src, hid_t __pyx_v_dst, void **__pyx_v_priv) {
1544
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_v_sizes;
1550
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_t_5;
1552
__Pyx_RefNannySetupContext("init_fixed2vlen");
1554
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":200
1555
* cdef conv_size_t *sizes
1557
* if not (H5Tis_variable_str(dst) and (not H5Tis_variable_str(src))): # <<<<<<<<<<<<<<
1561
__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;}
1563
__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;}
1564
__pyx_t_3 = (!__pyx_t_2);
1565
__pyx_t_4 = __pyx_t_3;
1567
__pyx_t_4 = __pyx_t_1;
1569
__pyx_t_3 = (!__pyx_t_4);
1572
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":201
1574
* if not (H5Tis_variable_str(dst) and (not H5Tis_variable_str(src))):
1575
* return -2 # <<<<<<<<<<<<<<
1577
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t))
1585
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":203
1588
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t)) # <<<<<<<<<<<<<<
1589
* sizes[0].src_size = H5Tget_size(src)
1590
* sizes[0].dst_size = H5Tget_size(dst)
1592
__pyx_t_5 = ((__pyx_t_4h5py_5_conv_conv_size_t *)malloc((sizeof(__pyx_t_4h5py_5_conv_conv_size_t))));
1593
(__pyx_v_priv[0]) = __pyx_t_5;
1594
__pyx_v_sizes = __pyx_t_5;
1596
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":204
1598
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t))
1599
* sizes[0].src_size = H5Tget_size(src) # <<<<<<<<<<<<<<
1600
* sizes[0].dst_size = H5Tget_size(dst)
1603
__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;}
1604
(__pyx_v_sizes[0]).src_size = __pyx_t_6;
1606
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":205
1607
* priv[0] = sizes = <conv_size_t*>malloc(sizeof(conv_size_t))
1608
* sizes[0].src_size = H5Tget_size(src)
1609
* sizes[0].dst_size = H5Tget_size(dst) # <<<<<<<<<<<<<<
1613
__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;}
1614
(__pyx_v_sizes[0]).dst_size = __pyx_t_6;
1616
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":207
1617
* sizes[0].dst_size = H5Tget_size(dst)
1619
* return 0 # <<<<<<<<<<<<<<
1621
* cdef int conv_vlen2fixed(void* ipt, void* opt, void* bkg, void* priv) except -1:
1629
__Pyx_AddTraceback("h5py._conv.init_fixed2vlen");
1632
__Pyx_RefNannyFinishContext();
1636
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":209
1639
* cdef int conv_vlen2fixed(void* ipt, void* opt, void* bkg, void* priv) except -1: # <<<<<<<<<<<<<<
1641
* cdef char** buf_vlen = <char**>ipt
1644
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) {
1645
char **__pyx_v_buf_vlen;
1646
char *__pyx_v_buf_fixed;
1647
char *__pyx_v_temp_string;
1648
size_t __pyx_v_temp_string_len;
1649
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_v_sizes;
1652
__Pyx_RefNannySetupContext("conv_vlen2fixed");
1654
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":211
1655
* cdef int conv_vlen2fixed(void* ipt, void* opt, void* bkg, void* priv) except -1:
1657
* cdef char** buf_vlen = <char**>ipt # <<<<<<<<<<<<<<
1658
* cdef char* buf_fixed = <char*>opt
1659
* cdef char* temp_string = NULL
1661
__pyx_v_buf_vlen = ((char **)__pyx_v_ipt);
1663
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":212
1665
* cdef char** buf_vlen = <char**>ipt
1666
* cdef char* buf_fixed = <char*>opt # <<<<<<<<<<<<<<
1667
* cdef char* temp_string = NULL
1668
* cdef size_t temp_string_len = 0 # Without null term
1670
__pyx_v_buf_fixed = ((char *)__pyx_v_opt);
1672
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":213
1673
* cdef char** buf_vlen = <char**>ipt
1674
* cdef char* buf_fixed = <char*>opt
1675
* cdef char* temp_string = NULL # <<<<<<<<<<<<<<
1676
* cdef size_t temp_string_len = 0 # Without null term
1677
* cdef conv_size_t *sizes = <conv_size_t*>priv
1679
__pyx_v_temp_string = NULL;
1681
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":214
1682
* cdef char* buf_fixed = <char*>opt
1683
* cdef char* temp_string = NULL
1684
* cdef size_t temp_string_len = 0 # Without null term # <<<<<<<<<<<<<<
1685
* cdef conv_size_t *sizes = <conv_size_t*>priv
1688
__pyx_v_temp_string_len = 0;
1690
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":215
1691
* cdef char* temp_string = NULL
1692
* cdef size_t temp_string_len = 0 # Without null term
1693
* cdef conv_size_t *sizes = <conv_size_t*>priv # <<<<<<<<<<<<<<
1695
* if buf_vlen[0] != NULL:
1697
__pyx_v_sizes = ((__pyx_t_4h5py_5_conv_conv_size_t *)__pyx_v_priv);
1699
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":217
1700
* cdef conv_size_t *sizes = <conv_size_t*>priv
1702
* if buf_vlen[0] != NULL: # <<<<<<<<<<<<<<
1703
* temp_string = buf_vlen[0]
1704
* temp_string_len = strlen(temp_string)
1706
__pyx_t_1 = ((__pyx_v_buf_vlen[0]) != NULL);
1709
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":218
1711
* if buf_vlen[0] != NULL:
1712
* temp_string = buf_vlen[0] # <<<<<<<<<<<<<<
1713
* temp_string_len = strlen(temp_string)
1716
__pyx_v_temp_string = (__pyx_v_buf_vlen[0]);
1718
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":219
1719
* if buf_vlen[0] != NULL:
1720
* temp_string = buf_vlen[0]
1721
* temp_string_len = strlen(temp_string) # <<<<<<<<<<<<<<
1723
* if temp_string_len <= sizes[0].dst_size:
1725
__pyx_v_temp_string_len = strlen(__pyx_v_temp_string);
1727
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":221
1728
* temp_string_len = strlen(temp_string)
1730
* if temp_string_len <= sizes[0].dst_size: # <<<<<<<<<<<<<<
1732
* memcpy(buf_fixed, temp_string, temp_string_len)
1734
__pyx_t_1 = (__pyx_v_temp_string_len <= (__pyx_v_sizes[0]).dst_size);
1737
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":223
1738
* if temp_string_len <= sizes[0].dst_size:
1740
* memcpy(buf_fixed, temp_string, temp_string_len) # <<<<<<<<<<<<<<
1741
* memset(buf_fixed + temp_string_len, c'\0', sizes[0].dst_size - temp_string_len)
1744
memcpy(__pyx_v_buf_fixed, __pyx_v_temp_string, __pyx_v_temp_string_len);
1746
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":224
1748
* memcpy(buf_fixed, temp_string, temp_string_len)
1749
* memset(buf_fixed + temp_string_len, c'\0', sizes[0].dst_size - temp_string_len) # <<<<<<<<<<<<<<
1751
* # Simply truncate the string
1753
memset((__pyx_v_buf_fixed + __pyx_v_temp_string_len), '\x00', ((__pyx_v_sizes[0]).dst_size - __pyx_v_temp_string_len));
1758
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":227
1760
* # Simply truncate the string
1761
* memcpy(buf_fixed, temp_string, sizes[0].dst_size) # <<<<<<<<<<<<<<
1763
* memset(buf_fixed, c'\0', sizes[0].dst_size)
1765
memcpy(__pyx_v_buf_fixed, __pyx_v_temp_string, (__pyx_v_sizes[0]).dst_size);
1772
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":229
1773
* memcpy(buf_fixed, temp_string, sizes[0].dst_size)
1775
* memset(buf_fixed, c'\0', sizes[0].dst_size) # <<<<<<<<<<<<<<
1779
memset(__pyx_v_buf_fixed, '\x00', (__pyx_v_sizes[0]).dst_size);
1783
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":231
1784
* memset(buf_fixed, c'\0', sizes[0].dst_size)
1786
* return 0 # <<<<<<<<<<<<<<
1788
* cdef int conv_fixed2vlen(void* ipt, void* opt, void* bkg, void* priv) except -1:
1795
__Pyx_RefNannyFinishContext();
1799
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":233
1802
* cdef int conv_fixed2vlen(void* ipt, void* opt, void* bkg, void* priv) except -1: # <<<<<<<<<<<<<<
1804
* cdef char** buf_vlen = <char**>opt
1807
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) {
1808
char **__pyx_v_buf_vlen;
1809
char *__pyx_v_buf_fixed;
1810
char *__pyx_v_temp_string;
1811
__pyx_t_4h5py_5_conv_conv_size_t *__pyx_v_sizes;
1813
__Pyx_RefNannySetupContext("conv_fixed2vlen");
1815
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":235
1816
* cdef int conv_fixed2vlen(void* ipt, void* opt, void* bkg, void* priv) except -1:
1818
* cdef char** buf_vlen = <char**>opt # <<<<<<<<<<<<<<
1819
* cdef char* buf_fixed = <char*>ipt
1820
* cdef char* temp_string = NULL
1822
__pyx_v_buf_vlen = ((char **)__pyx_v_opt);
1824
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":236
1826
* cdef char** buf_vlen = <char**>opt
1827
* cdef char* buf_fixed = <char*>ipt # <<<<<<<<<<<<<<
1828
* cdef char* temp_string = NULL
1829
* cdef conv_size_t *sizes = <conv_size_t*>priv
1831
__pyx_v_buf_fixed = ((char *)__pyx_v_ipt);
1833
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":237
1834
* cdef char** buf_vlen = <char**>opt
1835
* cdef char* buf_fixed = <char*>ipt
1836
* cdef char* temp_string = NULL # <<<<<<<<<<<<<<
1837
* cdef conv_size_t *sizes = <conv_size_t*>priv
1840
__pyx_v_temp_string = NULL;
1842
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":238
1843
* cdef char* buf_fixed = <char*>ipt
1844
* cdef char* temp_string = NULL
1845
* cdef conv_size_t *sizes = <conv_size_t*>priv # <<<<<<<<<<<<<<
1847
* temp_string = <char*>malloc(sizes[0].src_size+1)
1849
__pyx_v_sizes = ((__pyx_t_4h5py_5_conv_conv_size_t *)__pyx_v_priv);
1851
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":240
1852
* cdef conv_size_t *sizes = <conv_size_t*>priv
1854
* temp_string = <char*>malloc(sizes[0].src_size+1) # <<<<<<<<<<<<<<
1855
* memcpy(temp_string, buf_fixed, sizes[0].src_size)
1856
* temp_string[sizes[0].src_size] = c'\0'
1858
__pyx_v_temp_string = ((char *)malloc(((__pyx_v_sizes[0]).src_size + 1)));
1860
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":241
1862
* temp_string = <char*>malloc(sizes[0].src_size+1)
1863
* memcpy(temp_string, buf_fixed, sizes[0].src_size) # <<<<<<<<<<<<<<
1864
* temp_string[sizes[0].src_size] = c'\0'
1867
memcpy(__pyx_v_temp_string, __pyx_v_buf_fixed, (__pyx_v_sizes[0]).src_size);
1869
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":242
1870
* temp_string = <char*>malloc(sizes[0].src_size+1)
1871
* memcpy(temp_string, buf_fixed, sizes[0].src_size)
1872
* temp_string[sizes[0].src_size] = c'\0' # <<<<<<<<<<<<<<
1874
* buf_vlen[0] = temp_string
1876
(__pyx_v_temp_string[(__pyx_v_sizes[0]).src_size]) = '\x00';
1878
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":244
1879
* temp_string[sizes[0].src_size] = c'\0'
1881
* buf_vlen[0] = temp_string # <<<<<<<<<<<<<<
1885
(__pyx_v_buf_vlen[0]) = __pyx_v_temp_string;
1887
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":246
1888
* buf_vlen[0] = temp_string
1890
* return 0 # <<<<<<<<<<<<<<
1892
* # =============================================================================
1899
__Pyx_RefNannyFinishContext();
1903
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":251
1904
* # HDF5 references to Python instances of h5r.Reference
1906
* cdef int conv_objref2pyref(void* ipt, void* opt, void* bkg, void* priv) except -1: # <<<<<<<<<<<<<<
1908
* cdef PyObject** buf_obj = <PyObject**>opt
1911
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) {
1912
PyObject **__pyx_v_buf_obj;
1913
PyObject **__pyx_v_bkg_obj;
1914
hobj_ref_t *__pyx_v_buf_ref;
1915
struct __pyx_obj_4h5py_3h5r_Reference *__pyx_v_ref = 0;
1916
PyObject *__pyx_v_ref_ptr;
1918
PyObject *__pyx_t_1 = NULL;
1919
__Pyx_RefNannySetupContext("conv_objref2pyref");
1921
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":253
1922
* cdef int conv_objref2pyref(void* ipt, void* opt, void* bkg, void* priv) except -1:
1924
* cdef PyObject** buf_obj = <PyObject**>opt # <<<<<<<<<<<<<<
1925
* cdef PyObject** bkg_obj = <PyObject**>bkg
1926
* cdef hobj_ref_t* buf_ref = <hobj_ref_t*>ipt
1928
__pyx_v_buf_obj = ((PyObject **)__pyx_v_opt);
1930
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":254
1932
* cdef PyObject** buf_obj = <PyObject**>opt
1933
* cdef PyObject** bkg_obj = <PyObject**>bkg # <<<<<<<<<<<<<<
1934
* cdef hobj_ref_t* buf_ref = <hobj_ref_t*>ipt
1937
__pyx_v_bkg_obj = ((PyObject **)__pyx_v_bkg);
1939
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":255
1940
* cdef PyObject** buf_obj = <PyObject**>opt
1941
* cdef PyObject** bkg_obj = <PyObject**>bkg
1942
* cdef hobj_ref_t* buf_ref = <hobj_ref_t*>ipt # <<<<<<<<<<<<<<
1944
* cdef Reference ref = Reference()
1946
__pyx_v_buf_ref = ((hobj_ref_t *)__pyx_v_ipt);
1948
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":257
1949
* cdef hobj_ref_t* buf_ref = <hobj_ref_t*>ipt
1951
* cdef Reference ref = Reference() # <<<<<<<<<<<<<<
1952
* cdef PyObject* ref_ptr = NULL
1955
__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;}
1956
__Pyx_GOTREF(__pyx_t_1);
1957
__pyx_v_ref = ((struct __pyx_obj_4h5py_3h5r_Reference *)__pyx_t_1);
1960
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":258
1962
* cdef Reference ref = Reference()
1963
* cdef PyObject* ref_ptr = NULL # <<<<<<<<<<<<<<
1965
* ref.ref.obj_ref = buf_ref[0]
1967
__pyx_v_ref_ptr = NULL;
1969
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":260
1970
* cdef PyObject* ref_ptr = NULL
1972
* ref.ref.obj_ref = buf_ref[0] # <<<<<<<<<<<<<<
1973
* ref.typecode = H5R_OBJECT
1976
__pyx_v_ref->ref.obj_ref = (__pyx_v_buf_ref[0]);
1978
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":261
1980
* ref.ref.obj_ref = buf_ref[0]
1981
* ref.typecode = H5R_OBJECT # <<<<<<<<<<<<<<
1983
* ref_ptr = <PyObject*>ref
1985
__pyx_v_ref->typecode = H5R_OBJECT;
1987
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":263
1988
* ref.typecode = H5R_OBJECT
1990
* ref_ptr = <PyObject*>ref # <<<<<<<<<<<<<<
1991
* Py_INCREF(ref_ptr) # because Cython discards its reference when the
1994
__pyx_v_ref_ptr = ((PyObject *)__pyx_v_ref);
1996
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":264
1998
* ref_ptr = <PyObject*>ref
1999
* Py_INCREF(ref_ptr) # because Cython discards its reference when the # <<<<<<<<<<<<<<
2003
Py_INCREF(__pyx_v_ref_ptr);
2005
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":267
2008
* Py_XDECREF(bkg_obj[0]) # <<<<<<<<<<<<<<
2009
* buf_obj[0] = ref_ptr
2012
Py_XDECREF((__pyx_v_bkg_obj[0]));
2014
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":268
2016
* Py_XDECREF(bkg_obj[0])
2017
* buf_obj[0] = ref_ptr # <<<<<<<<<<<<<<
2021
(__pyx_v_buf_obj[0]) = __pyx_v_ref_ptr;
2023
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":270
2024
* buf_obj[0] = ref_ptr
2026
* return 0 # <<<<<<<<<<<<<<
2028
* cdef int conv_pyref2objref(void* ipt, void* opt, void* bkg, void* priv) except -1:
2036
__Pyx_XDECREF(__pyx_t_1);
2037
__Pyx_AddTraceback("h5py._conv.conv_objref2pyref");
2040
__Pyx_XDECREF((PyObject *)__pyx_v_ref);
2041
__Pyx_RefNannyFinishContext();
2045
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":272
2048
* cdef int conv_pyref2objref(void* ipt, void* opt, void* bkg, void* priv) except -1: # <<<<<<<<<<<<<<
2050
* cdef PyObject** buf_obj = <PyObject**>ipt
2053
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) {
2054
PyObject **__pyx_v_buf_obj;
2055
hobj_ref_t *__pyx_v_buf_ref;
2056
PyObject *__pyx_v_obj;
2057
struct __pyx_obj_4h5py_3h5r_Reference *__pyx_v_ref;
2062
PyObject *__pyx_t_4;
2063
PyObject *__pyx_t_5 = NULL;
2064
PyObject *__pyx_t_6 = NULL;
2065
__Pyx_RefNannySetupContext("conv_pyref2objref");
2066
__pyx_v_obj = Py_None; __Pyx_INCREF(Py_None);
2067
__pyx_v_ref = ((struct __pyx_obj_4h5py_3h5r_Reference *)Py_None); __Pyx_INCREF(Py_None);
2069
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":274
2070
* cdef int conv_pyref2objref(void* ipt, void* opt, void* bkg, void* priv) except -1:
2072
* cdef PyObject** buf_obj = <PyObject**>ipt # <<<<<<<<<<<<<<
2073
* cdef hobj_ref_t* buf_ref = <hobj_ref_t*>opt
2076
__pyx_v_buf_obj = ((PyObject **)__pyx_v_ipt);
2078
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":275
2080
* cdef PyObject** buf_obj = <PyObject**>ipt
2081
* cdef hobj_ref_t* buf_ref = <hobj_ref_t*>opt # <<<<<<<<<<<<<<
2085
__pyx_v_buf_ref = ((hobj_ref_t *)__pyx_v_opt);
2087
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":280
2088
* cdef Reference ref
2090
* if buf_obj[0] != NULL and buf_obj[0] != Py_None: # <<<<<<<<<<<<<<
2091
* obj = <object>(buf_obj[0])
2092
* if not isinstance(obj, Reference):
2094
__pyx_t_1 = ((__pyx_v_buf_obj[0]) != NULL);
2096
__pyx_t_2 = ((__pyx_v_buf_obj[0]) != Py_None);
2097
__pyx_t_3 = __pyx_t_2;
2099
__pyx_t_3 = __pyx_t_1;
2103
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":281
2105
* if buf_obj[0] != NULL and buf_obj[0] != Py_None:
2106
* obj = <object>(buf_obj[0]) # <<<<<<<<<<<<<<
2107
* if not isinstance(obj, Reference):
2108
* raise TypeError("Can't convert incompatible object to HDF5 object reference")
2110
__pyx_t_4 = (__pyx_v_buf_obj[0]);
2111
__Pyx_INCREF(((PyObject *)__pyx_t_4));
2112
__Pyx_DECREF(__pyx_v_obj);
2113
__pyx_v_obj = ((PyObject *)__pyx_t_4);
2115
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":282
2116
* if buf_obj[0] != NULL and buf_obj[0] != Py_None:
2117
* obj = <object>(buf_obj[0])
2118
* if not isinstance(obj, Reference): # <<<<<<<<<<<<<<
2119
* raise TypeError("Can't convert incompatible object to HDF5 object reference")
2120
* ref = <Reference>(buf_obj[0])
2122
__pyx_t_3 = PyObject_TypeCheck(__pyx_v_obj, ((PyTypeObject *)((PyObject*)__pyx_ptype_4h5py_3h5r_Reference)));
2123
__pyx_t_1 = (!__pyx_t_3);
2126
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":283
2127
* obj = <object>(buf_obj[0])
2128
* if not isinstance(obj, Reference):
2129
* raise TypeError("Can't convert incompatible object to HDF5 object reference") # <<<<<<<<<<<<<<
2130
* ref = <Reference>(buf_obj[0])
2131
* buf_ref[0] = ref.ref.obj_ref
2133
__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;}
2134
__Pyx_GOTREF(__pyx_t_5);
2135
__Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
2136
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_4));
2137
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
2138
__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;}
2139
__Pyx_GOTREF(__pyx_t_6);
2140
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2141
__Pyx_Raise(__pyx_t_6, 0, 0);
2142
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2143
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2148
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":284
2149
* if not isinstance(obj, Reference):
2150
* raise TypeError("Can't convert incompatible object to HDF5 object reference")
2151
* ref = <Reference>(buf_obj[0]) # <<<<<<<<<<<<<<
2152
* buf_ref[0] = ref.ref.obj_ref
2155
__pyx_t_4 = (__pyx_v_buf_obj[0]);
2156
__Pyx_INCREF(((PyObject *)((struct __pyx_obj_4h5py_3h5r_Reference *)__pyx_t_4)));
2157
__Pyx_DECREF(((PyObject *)__pyx_v_ref));
2158
__pyx_v_ref = ((struct __pyx_obj_4h5py_3h5r_Reference *)__pyx_t_4);
2160
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":285
2161
* raise TypeError("Can't convert incompatible object to HDF5 object reference")
2162
* ref = <Reference>(buf_obj[0])
2163
* buf_ref[0] = ref.ref.obj_ref # <<<<<<<<<<<<<<
2165
* memset(buf_ref, c'\0', sizeof(hobj_ref_t))
2167
(__pyx_v_buf_ref[0]) = __pyx_v_ref->ref.obj_ref;
2172
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":287
2173
* buf_ref[0] = ref.ref.obj_ref
2175
* memset(buf_ref, c'\0', sizeof(hobj_ref_t)) # <<<<<<<<<<<<<<
2179
memset(__pyx_v_buf_ref, '\x00', (sizeof(hobj_ref_t)));
2183
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":289
2184
* memset(buf_ref, c'\0', sizeof(hobj_ref_t))
2186
* return 0 # <<<<<<<<<<<<<<
2188
* cdef int conv_regref2pyref(void* ipt, void* opt, void* bkg, void* priv) except -1:
2196
__Pyx_XDECREF(__pyx_t_5);
2197
__Pyx_XDECREF(__pyx_t_6);
2198
__Pyx_AddTraceback("h5py._conv.conv_pyref2objref");
2201
__Pyx_DECREF(__pyx_v_obj);
2202
__Pyx_DECREF((PyObject *)__pyx_v_ref);
2203
__Pyx_RefNannyFinishContext();
2207
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":291
2210
* cdef int conv_regref2pyref(void* ipt, void* opt, void* bkg, void* priv) except -1: # <<<<<<<<<<<<<<
2212
* cdef PyObject** buf_obj = <PyObject**>opt
2215
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) {
2216
PyObject **__pyx_v_buf_obj;
2217
PyObject **__pyx_v_bkg_obj;
2218
hdset_reg_ref_t *__pyx_v_buf_ref;
2219
struct __pyx_obj_4h5py_3h5r_RegionReference *__pyx_v_ref = 0;
2220
PyObject *__pyx_v_ref_ptr;
2222
PyObject *__pyx_t_1 = NULL;
2223
__Pyx_RefNannySetupContext("conv_regref2pyref");
2225
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":293
2226
* cdef int conv_regref2pyref(void* ipt, void* opt, void* bkg, void* priv) except -1:
2228
* cdef PyObject** buf_obj = <PyObject**>opt # <<<<<<<<<<<<<<
2229
* cdef PyObject** bkg_obj = <PyObject**>bkg
2230
* cdef hdset_reg_ref_t* buf_ref = <hdset_reg_ref_t*>ipt
2232
__pyx_v_buf_obj = ((PyObject **)__pyx_v_opt);
2234
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":294
2236
* cdef PyObject** buf_obj = <PyObject**>opt
2237
* cdef PyObject** bkg_obj = <PyObject**>bkg # <<<<<<<<<<<<<<
2238
* cdef hdset_reg_ref_t* buf_ref = <hdset_reg_ref_t*>ipt
2241
__pyx_v_bkg_obj = ((PyObject **)__pyx_v_bkg);
2243
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":295
2244
* cdef PyObject** buf_obj = <PyObject**>opt
2245
* cdef PyObject** bkg_obj = <PyObject**>bkg
2246
* cdef hdset_reg_ref_t* buf_ref = <hdset_reg_ref_t*>ipt # <<<<<<<<<<<<<<
2248
* cdef RegionReference ref = RegionReference()
2250
__pyx_v_buf_ref = ((hdset_reg_ref_t *)__pyx_v_ipt);
2252
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":297
2253
* cdef hdset_reg_ref_t* buf_ref = <hdset_reg_ref_t*>ipt
2255
* cdef RegionReference ref = RegionReference() # <<<<<<<<<<<<<<
2256
* cdef PyObject* ref_ptr = NULL
2259
__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;}
2260
__Pyx_GOTREF(__pyx_t_1);
2261
__pyx_v_ref = ((struct __pyx_obj_4h5py_3h5r_RegionReference *)__pyx_t_1);
2264
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":298
2266
* cdef RegionReference ref = RegionReference()
2267
* cdef PyObject* ref_ptr = NULL # <<<<<<<<<<<<<<
2269
* memcpy(ref.ref.reg_ref, buf_ref, sizeof(hdset_reg_ref_t))
2271
__pyx_v_ref_ptr = NULL;
2273
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":300
2274
* cdef PyObject* ref_ptr = NULL
2276
* memcpy(ref.ref.reg_ref, buf_ref, sizeof(hdset_reg_ref_t)) # <<<<<<<<<<<<<<
2278
* ref.typecode = H5R_DATASET_REGION
2280
memcpy(__pyx_v_ref->__pyx_base.ref.reg_ref, __pyx_v_buf_ref, (sizeof(hdset_reg_ref_t)));
2282
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":302
2283
* memcpy(ref.ref.reg_ref, buf_ref, sizeof(hdset_reg_ref_t))
2285
* ref.typecode = H5R_DATASET_REGION # <<<<<<<<<<<<<<
2287
* ref_ptr = <PyObject*>ref
2289
__pyx_v_ref->__pyx_base.typecode = H5R_DATASET_REGION;
2291
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":304
2292
* ref.typecode = H5R_DATASET_REGION
2294
* ref_ptr = <PyObject*>ref # <<<<<<<<<<<<<<
2295
* Py_INCREF(ref_ptr) # because Cython discards its reference when the
2298
__pyx_v_ref_ptr = ((PyObject *)__pyx_v_ref);
2300
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":305
2302
* ref_ptr = <PyObject*>ref
2303
* Py_INCREF(ref_ptr) # because Cython discards its reference when the # <<<<<<<<<<<<<<
2307
Py_INCREF(__pyx_v_ref_ptr);
2309
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":308
2312
* Py_XDECREF(bkg_obj[0]) # <<<<<<<<<<<<<<
2313
* buf_obj[0] = ref_ptr
2316
Py_XDECREF((__pyx_v_bkg_obj[0]));
2318
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":309
2320
* Py_XDECREF(bkg_obj[0])
2321
* buf_obj[0] = ref_ptr # <<<<<<<<<<<<<<
2325
(__pyx_v_buf_obj[0]) = __pyx_v_ref_ptr;
2327
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":311
2328
* buf_obj[0] = ref_ptr
2330
* return 0 # <<<<<<<<<<<<<<
2332
* cdef int conv_pyref2regref(void* ipt, void* opt, void* bkg, void* priv) except -1:
2340
__Pyx_XDECREF(__pyx_t_1);
2341
__Pyx_AddTraceback("h5py._conv.conv_regref2pyref");
2344
__Pyx_XDECREF((PyObject *)__pyx_v_ref);
2345
__Pyx_RefNannyFinishContext();
2349
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":313
2352
* cdef int conv_pyref2regref(void* ipt, void* opt, void* bkg, void* priv) except -1: # <<<<<<<<<<<<<<
2354
* cdef PyObject** buf_obj = <PyObject**>ipt
2357
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) {
2358
PyObject **__pyx_v_buf_obj;
2359
hdset_reg_ref_t *__pyx_v_buf_ref;
2360
PyObject *__pyx_v_obj;
2361
struct __pyx_obj_4h5py_3h5r_RegionReference *__pyx_v_ref;
2366
PyObject *__pyx_t_4;
2367
PyObject *__pyx_t_5 = NULL;
2368
PyObject *__pyx_t_6 = NULL;
2369
__Pyx_RefNannySetupContext("conv_pyref2regref");
2370
__pyx_v_obj = Py_None; __Pyx_INCREF(Py_None);
2371
__pyx_v_ref = ((struct __pyx_obj_4h5py_3h5r_RegionReference *)Py_None); __Pyx_INCREF(Py_None);
2373
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":315
2374
* cdef int conv_pyref2regref(void* ipt, void* opt, void* bkg, void* priv) except -1:
2376
* cdef PyObject** buf_obj = <PyObject**>ipt # <<<<<<<<<<<<<<
2377
* cdef hdset_reg_ref_t* buf_ref = <hdset_reg_ref_t*>opt
2380
__pyx_v_buf_obj = ((PyObject **)__pyx_v_ipt);
2382
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":316
2384
* cdef PyObject** buf_obj = <PyObject**>ipt
2385
* cdef hdset_reg_ref_t* buf_ref = <hdset_reg_ref_t*>opt # <<<<<<<<<<<<<<
2389
__pyx_v_buf_ref = ((hdset_reg_ref_t *)__pyx_v_opt);
2391
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":321
2392
* cdef RegionReference ref
2394
* if buf_obj[0] != NULL and buf_obj[0] != Py_None: # <<<<<<<<<<<<<<
2395
* obj = <object>(buf_obj[0])
2396
* if not isinstance(obj, RegionReference):
2398
__pyx_t_1 = ((__pyx_v_buf_obj[0]) != NULL);
2400
__pyx_t_2 = ((__pyx_v_buf_obj[0]) != Py_None);
2401
__pyx_t_3 = __pyx_t_2;
2403
__pyx_t_3 = __pyx_t_1;
2407
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":322
2409
* if buf_obj[0] != NULL and buf_obj[0] != Py_None:
2410
* obj = <object>(buf_obj[0]) # <<<<<<<<<<<<<<
2411
* if not isinstance(obj, RegionReference):
2412
* raise TypeError("Can't convert incompatible object to HDF5 region reference")
2414
__pyx_t_4 = (__pyx_v_buf_obj[0]);
2415
__Pyx_INCREF(((PyObject *)__pyx_t_4));
2416
__Pyx_DECREF(__pyx_v_obj);
2417
__pyx_v_obj = ((PyObject *)__pyx_t_4);
2419
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":323
2420
* if buf_obj[0] != NULL and buf_obj[0] != Py_None:
2421
* obj = <object>(buf_obj[0])
2422
* if not isinstance(obj, RegionReference): # <<<<<<<<<<<<<<
2423
* raise TypeError("Can't convert incompatible object to HDF5 region reference")
2424
* ref = <RegionReference>(buf_obj[0])
2426
__pyx_t_3 = PyObject_TypeCheck(__pyx_v_obj, ((PyTypeObject *)((PyObject*)__pyx_ptype_4h5py_3h5r_RegionReference)));
2427
__pyx_t_1 = (!__pyx_t_3);
2430
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":324
2431
* obj = <object>(buf_obj[0])
2432
* if not isinstance(obj, RegionReference):
2433
* raise TypeError("Can't convert incompatible object to HDF5 region reference") # <<<<<<<<<<<<<<
2434
* ref = <RegionReference>(buf_obj[0])
2435
* memcpy(buf_ref, ref.ref.reg_ref, sizeof(hdset_reg_ref_t))
2437
__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;}
2438
__Pyx_GOTREF(__pyx_t_5);
2439
__Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
2440
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_5));
2441
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
2442
__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;}
2443
__Pyx_GOTREF(__pyx_t_6);
2444
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2445
__Pyx_Raise(__pyx_t_6, 0, 0);
2446
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2447
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2452
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":325
2453
* if not isinstance(obj, RegionReference):
2454
* raise TypeError("Can't convert incompatible object to HDF5 region reference")
2455
* ref = <RegionReference>(buf_obj[0]) # <<<<<<<<<<<<<<
2456
* memcpy(buf_ref, ref.ref.reg_ref, sizeof(hdset_reg_ref_t))
2459
__pyx_t_4 = (__pyx_v_buf_obj[0]);
2460
__Pyx_INCREF(((PyObject *)((struct __pyx_obj_4h5py_3h5r_RegionReference *)__pyx_t_4)));
2461
__Pyx_DECREF(((PyObject *)__pyx_v_ref));
2462
__pyx_v_ref = ((struct __pyx_obj_4h5py_3h5r_RegionReference *)__pyx_t_4);
2464
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":326
2465
* raise TypeError("Can't convert incompatible object to HDF5 region reference")
2466
* ref = <RegionReference>(buf_obj[0])
2467
* memcpy(buf_ref, ref.ref.reg_ref, sizeof(hdset_reg_ref_t)) # <<<<<<<<<<<<<<
2469
* memset(buf_ref, c'\0', sizeof(hdset_reg_ref_t))
2471
memcpy(__pyx_v_buf_ref, __pyx_v_ref->__pyx_base.ref.reg_ref, (sizeof(hdset_reg_ref_t)));
2476
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":328
2477
* memcpy(buf_ref, ref.ref.reg_ref, sizeof(hdset_reg_ref_t))
2479
* memset(buf_ref, c'\0', sizeof(hdset_reg_ref_t)) # <<<<<<<<<<<<<<
2483
memset(__pyx_v_buf_ref, '\x00', (sizeof(hdset_reg_ref_t)));
2487
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":330
2488
* memset(buf_ref, c'\0', sizeof(hdset_reg_ref_t))
2490
* return 0 # <<<<<<<<<<<<<<
2492
* # =============================================================================
2500
__Pyx_XDECREF(__pyx_t_5);
2501
__Pyx_XDECREF(__pyx_t_6);
2502
__Pyx_AddTraceback("h5py._conv.conv_pyref2regref");
2505
__Pyx_DECREF(__pyx_v_obj);
2506
__Pyx_DECREF((PyObject *)__pyx_v_ref);
2507
__Pyx_RefNannyFinishContext();
2511
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":336
2514
* cdef herr_t vlen2str(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
2515
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
2516
* void *bkg_i, hid_t dxpl) except -1:
2519
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) {
2522
__Pyx_RefNannySetupContext("vlen2str");
2524
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":340
2525
* void *bkg_i, hid_t dxpl) except -1:
2526
* return generic_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
2527
* buf_i, bkg_i, dxpl, conv_vlen2str, init_generic, H5T_BKG_YES) # <<<<<<<<<<<<<<
2529
* cdef herr_t str2vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
2531
__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;}
2532
__pyx_r = __pyx_t_1;
2538
__Pyx_AddTraceback("h5py._conv.vlen2str");
2541
__Pyx_RefNannyFinishContext();
2545
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":342
2546
* buf_i, bkg_i, dxpl, conv_vlen2str, init_generic, H5T_BKG_YES)
2548
* cdef herr_t str2vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
2549
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
2550
* void *bkg_i, hid_t dxpl) except -1:
2553
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) {
2556
__Pyx_RefNannySetupContext("str2vlen");
2558
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":346
2559
* void *bkg_i, hid_t dxpl) except -1:
2560
* return generic_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
2561
* buf_i, bkg_i, dxpl, conv_str2vlen, init_generic, H5T_BKG_NO) # <<<<<<<<<<<<<<
2563
* cdef herr_t vlen2fixed(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
2565
__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;}
2566
__pyx_r = __pyx_t_1;
2572
__Pyx_AddTraceback("h5py._conv.str2vlen");
2575
__Pyx_RefNannyFinishContext();
2579
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":348
2580
* buf_i, bkg_i, dxpl, conv_str2vlen, init_generic, H5T_BKG_NO)
2582
* cdef herr_t vlen2fixed(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
2583
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
2584
* void *bkg_i, hid_t dxpl) except -1:
2587
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) {
2590
__Pyx_RefNannySetupContext("vlen2fixed");
2592
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":352
2593
* void *bkg_i, hid_t dxpl) except -1:
2594
* return generic_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
2595
* buf_i, bkg_i, dxpl, conv_vlen2fixed, init_vlen2fixed, H5T_BKG_NO) # <<<<<<<<<<<<<<
2597
* cdef herr_t fixed2vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
2599
__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;}
2600
__pyx_r = __pyx_t_1;
2606
__Pyx_AddTraceback("h5py._conv.vlen2fixed");
2609
__Pyx_RefNannyFinishContext();
2613
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":354
2614
* buf_i, bkg_i, dxpl, conv_vlen2fixed, init_vlen2fixed, H5T_BKG_NO)
2616
* cdef herr_t fixed2vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
2617
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
2618
* void *bkg_i, hid_t dxpl) except -1:
2621
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) {
2624
__Pyx_RefNannySetupContext("fixed2vlen");
2626
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":358
2627
* void *bkg_i, hid_t dxpl) except -1:
2628
* return generic_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
2629
* buf_i, bkg_i, dxpl, conv_fixed2vlen, init_fixed2vlen, H5T_BKG_NO) # <<<<<<<<<<<<<<
2631
* cdef herr_t objref2pyref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
2633
__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;}
2634
__pyx_r = __pyx_t_1;
2640
__Pyx_AddTraceback("h5py._conv.fixed2vlen");
2643
__Pyx_RefNannyFinishContext();
2647
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":360
2648
* buf_i, bkg_i, dxpl, conv_fixed2vlen, init_fixed2vlen, H5T_BKG_NO)
2650
* cdef herr_t objref2pyref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
2651
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
2652
* void *bkg_i, hid_t dxpl) except -1:
2655
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) {
2658
__Pyx_RefNannySetupContext("objref2pyref");
2660
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":364
2661
* void *bkg_i, hid_t dxpl) except -1:
2662
* return generic_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
2663
* buf_i, bkg_i, dxpl, conv_objref2pyref, init_generic, H5T_BKG_YES) # <<<<<<<<<<<<<<
2665
* cdef herr_t pyref2objref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
2667
__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;}
2668
__pyx_r = __pyx_t_1;
2674
__Pyx_AddTraceback("h5py._conv.objref2pyref");
2677
__Pyx_RefNannyFinishContext();
2681
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":366
2682
* buf_i, bkg_i, dxpl, conv_objref2pyref, init_generic, H5T_BKG_YES)
2684
* cdef herr_t pyref2objref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
2685
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
2686
* void *bkg_i, hid_t dxpl) except -1:
2689
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) {
2692
__Pyx_RefNannySetupContext("pyref2objref");
2694
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":370
2695
* void *bkg_i, hid_t dxpl) except -1:
2696
* return generic_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
2697
* buf_i, bkg_i, dxpl, conv_pyref2objref, init_generic, H5T_BKG_NO) # <<<<<<<<<<<<<<
2699
* cdef herr_t regref2pyref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
2701
__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;}
2702
__pyx_r = __pyx_t_1;
2708
__Pyx_AddTraceback("h5py._conv.pyref2objref");
2711
__Pyx_RefNannyFinishContext();
2715
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":372
2716
* buf_i, bkg_i, dxpl, conv_pyref2objref, init_generic, H5T_BKG_NO)
2718
* cdef herr_t regref2pyref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
2719
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
2720
* void *bkg_i, hid_t dxpl) except -1:
2723
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) {
2726
__Pyx_RefNannySetupContext("regref2pyref");
2728
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":376
2729
* void *bkg_i, hid_t dxpl) except -1:
2730
* return generic_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
2731
* buf_i, bkg_i, dxpl, conv_regref2pyref, init_generic, H5T_BKG_YES) # <<<<<<<<<<<<<<
2733
* cdef herr_t pyref2regref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
2735
__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;}
2736
__pyx_r = __pyx_t_1;
2742
__Pyx_AddTraceback("h5py._conv.regref2pyref");
2745
__Pyx_RefNannyFinishContext();
2749
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":378
2750
* buf_i, bkg_i, dxpl, conv_regref2pyref, init_generic, H5T_BKG_YES)
2752
* cdef herr_t pyref2regref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
2753
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
2754
* void *bkg_i, hid_t dxpl) except -1:
2757
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) {
2760
__Pyx_RefNannySetupContext("pyref2regref");
2762
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":382
2763
* void *bkg_i, hid_t dxpl) except -1:
2764
* return generic_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
2765
* buf_i, bkg_i, dxpl, conv_pyref2regref, init_generic, H5T_BKG_NO) # <<<<<<<<<<<<<<
2767
* # =============================================================================
2769
__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;}
2770
__pyx_r = __pyx_t_1;
2776
__Pyx_AddTraceback("h5py._conv.pyref2regref");
2779
__Pyx_RefNannyFinishContext();
2783
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":394
2785
* # Direction ("forward"): 1 = enum to int, 0 = int to enum
2786
* cdef herr_t enum_int_converter(hid_t src, hid_t dst, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
2787
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
2788
* void *bkg_i, hid_t dxpl, int forward) except -1 with gil:
2791
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) {
2792
int __pyx_v_command;
2793
struct __pyx_t_4h5py_5_conv_conv_enum_t *__pyx_v_info;
2794
size_t __pyx_v_nalloc;
2800
struct __pyx_t_4h5py_5_conv_conv_enum_t *__pyx_t_2;
2806
PyObject *__pyx_t_8 = NULL;
2807
PyObject *__pyx_t_9 = NULL;
2808
PyGILState_STATE _save = PyGILState_Ensure();
2809
__Pyx_RefNannySetupContext("enum_int_converter");
2811
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":398
2812
* void *bkg_i, hid_t dxpl, int forward) except -1 with gil:
2814
* cdef int command = cdata[0].command # <<<<<<<<<<<<<<
2815
* cdef conv_enum_t *info
2816
* cdef size_t nalloc
2818
__pyx_v_command = (__pyx_v_cdata[0]).command;
2820
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":402
2821
* cdef size_t nalloc
2823
* cdef char* cbuf = NULL # <<<<<<<<<<<<<<
2824
* cdef char* buf = <char*>buf_i
2827
__pyx_v_cbuf = NULL;
2829
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":403
2831
* cdef char* cbuf = NULL
2832
* cdef char* buf = <char*>buf_i # <<<<<<<<<<<<<<
2834
* if command == H5T_CONV_INIT:
2836
__pyx_v_buf = ((char *)__pyx_v_buf_i);
2838
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":405
2839
* cdef char* buf = <char*>buf_i
2841
* if command == H5T_CONV_INIT: # <<<<<<<<<<<<<<
2842
* cdata[0].need_bkg = H5T_BKG_NO
2843
* cdata[0].priv = info = <conv_enum_t*>malloc(sizeof(conv_enum_t))
2845
__pyx_t_1 = (__pyx_v_command == H5T_CONV_INIT);
2848
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":406
2850
* if command == H5T_CONV_INIT:
2851
* cdata[0].need_bkg = H5T_BKG_NO # <<<<<<<<<<<<<<
2852
* cdata[0].priv = info = <conv_enum_t*>malloc(sizeof(conv_enum_t))
2853
* info[0].src_size = H5Tget_size(src)
2855
(__pyx_v_cdata[0]).need_bkg = H5T_BKG_NO;
2857
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":407
2858
* if command == H5T_CONV_INIT:
2859
* cdata[0].need_bkg = H5T_BKG_NO
2860
* cdata[0].priv = info = <conv_enum_t*>malloc(sizeof(conv_enum_t)) # <<<<<<<<<<<<<<
2861
* info[0].src_size = H5Tget_size(src)
2862
* info[0].dst_size = H5Tget_size(dst)
2864
__pyx_t_2 = ((struct __pyx_t_4h5py_5_conv_conv_enum_t *)malloc((sizeof(struct __pyx_t_4h5py_5_conv_conv_enum_t))));
2865
(__pyx_v_cdata[0]).priv = __pyx_t_2;
2866
__pyx_v_info = __pyx_t_2;
2868
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":408
2869
* cdata[0].need_bkg = H5T_BKG_NO
2870
* cdata[0].priv = info = <conv_enum_t*>malloc(sizeof(conv_enum_t))
2871
* info[0].src_size = H5Tget_size(src) # <<<<<<<<<<<<<<
2872
* info[0].dst_size = H5Tget_size(dst)
2875
__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;}
2876
(__pyx_v_info[0]).src_size = __pyx_t_3;
2878
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":409
2879
* cdata[0].priv = info = <conv_enum_t*>malloc(sizeof(conv_enum_t))
2880
* info[0].src_size = H5Tget_size(src)
2881
* info[0].dst_size = H5Tget_size(dst) # <<<<<<<<<<<<<<
2883
* info[0].supertype = H5Tget_super(src)
2885
__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;}
2886
(__pyx_v_info[0]).dst_size = __pyx_t_3;
2888
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":410
2889
* info[0].src_size = H5Tget_size(src)
2890
* info[0].dst_size = H5Tget_size(dst)
2891
* if forward: # <<<<<<<<<<<<<<
2892
* info[0].supertype = H5Tget_super(src)
2893
* info[0].identical = H5Tequal(info[0].supertype, dst)
2895
__pyx_t_4 = __pyx_v_forward;
2898
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":411
2899
* info[0].dst_size = H5Tget_size(dst)
2901
* info[0].supertype = H5Tget_super(src) # <<<<<<<<<<<<<<
2902
* info[0].identical = H5Tequal(info[0].supertype, dst)
2905
__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;}
2906
(__pyx_v_info[0]).supertype = __pyx_t_5;
2908
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":412
2910
* info[0].supertype = H5Tget_super(src)
2911
* info[0].identical = H5Tequal(info[0].supertype, dst) # <<<<<<<<<<<<<<
2913
* info[0].supertype = H5Tget_super(dst)
2915
__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;}
2916
(__pyx_v_info[0]).identical = __pyx_t_6;
2921
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":414
2922
* info[0].identical = H5Tequal(info[0].supertype, dst)
2924
* info[0].supertype = H5Tget_super(dst) # <<<<<<<<<<<<<<
2925
* info[0].identical = H5Tequal(info[0].supertype, src)
2928
__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;}
2929
(__pyx_v_info[0]).supertype = __pyx_t_5;
2931
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":415
2933
* info[0].supertype = H5Tget_super(dst)
2934
* info[0].identical = H5Tequal(info[0].supertype, src) # <<<<<<<<<<<<<<
2936
* elif command == H5T_CONV_FREE:
2938
__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;}
2939
(__pyx_v_info[0]).identical = __pyx_t_6;
2945
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":417
2946
* info[0].identical = H5Tequal(info[0].supertype, src)
2948
* elif command == H5T_CONV_FREE: # <<<<<<<<<<<<<<
2950
* info = <conv_enum_t*>cdata[0].priv
2952
__pyx_t_1 = (__pyx_v_command == H5T_CONV_FREE);
2955
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":419
2956
* elif command == H5T_CONV_FREE:
2958
* info = <conv_enum_t*>cdata[0].priv # <<<<<<<<<<<<<<
2959
* #H5Tclose(info[0].supertype)
2962
__pyx_v_info = ((struct __pyx_t_4h5py_5_conv_conv_enum_t *)(__pyx_v_cdata[0]).priv);
2964
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":421
2965
* info = <conv_enum_t*>cdata[0].priv
2966
* #H5Tclose(info[0].supertype)
2967
* free(info) # <<<<<<<<<<<<<<
2968
* cdata[0].priv = NULL
2973
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":422
2974
* #H5Tclose(info[0].supertype)
2976
* cdata[0].priv = NULL # <<<<<<<<<<<<<<
2978
* elif command == H5T_CONV_CONV:
2980
(__pyx_v_cdata[0]).priv = NULL;
2984
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":424
2985
* cdata[0].priv = NULL
2987
* elif command == H5T_CONV_CONV: # <<<<<<<<<<<<<<
2989
* info = <conv_enum_t*>cdata[0].priv
2991
__pyx_t_1 = (__pyx_v_command == H5T_CONV_CONV);
2994
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":426
2995
* elif command == H5T_CONV_CONV:
2997
* info = <conv_enum_t*>cdata[0].priv # <<<<<<<<<<<<<<
2999
* # Short-circuit success
3001
__pyx_v_info = ((struct __pyx_t_4h5py_5_conv_conv_enum_t *)(__pyx_v_cdata[0]).priv);
3003
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":429
3005
* # Short-circuit success
3006
* if info[0].identical: # <<<<<<<<<<<<<<
3010
__pyx_t_4 = (__pyx_v_info[0]).identical;
3013
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":430
3014
* # Short-circuit success
3015
* if info[0].identical:
3016
* return 0 # <<<<<<<<<<<<<<
3018
* if buf_stride == 0:
3026
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":432
3029
* if buf_stride == 0: # <<<<<<<<<<<<<<
3030
* # Contiguous case: call H5Tconvert directly
3033
__pyx_t_1 = (__pyx_v_buf_stride == 0);
3036
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":434
3037
* if buf_stride == 0:
3038
* # Contiguous case: call H5Tconvert directly
3039
* if forward: # <<<<<<<<<<<<<<
3040
* H5Tconvert(info[0].supertype, dst, nl, buf, NULL, dxpl)
3043
__pyx_t_4 = __pyx_v_forward;
3046
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":435
3047
* # Contiguous case: call H5Tconvert directly
3049
* H5Tconvert(info[0].supertype, dst, nl, buf, NULL, dxpl) # <<<<<<<<<<<<<<
3051
* H5Tconvert(src, info[0].supertype, nl, buf, NULL, dxpl)
3053
__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;}
3058
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":437
3059
* H5Tconvert(info[0].supertype, dst, nl, buf, NULL, dxpl)
3061
* H5Tconvert(src, info[0].supertype, nl, buf, NULL, dxpl) # <<<<<<<<<<<<<<
3063
* # Non-contiguous: gather, convert and then scatter
3065
__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;}
3072
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":440
3074
* # Non-contiguous: gather, convert and then scatter
3075
* if info[0].src_size > info[0].dst_size: # <<<<<<<<<<<<<<
3076
* nalloc = info[0].src_size*nl
3079
__pyx_t_1 = ((__pyx_v_info[0]).src_size > (__pyx_v_info[0]).dst_size);
3082
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":441
3083
* # Non-contiguous: gather, convert and then scatter
3084
* if info[0].src_size > info[0].dst_size:
3085
* nalloc = info[0].src_size*nl # <<<<<<<<<<<<<<
3087
* nalloc = info[0].dst_size*nl
3089
__pyx_v_nalloc = ((__pyx_v_info[0]).src_size * __pyx_v_nl);
3094
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":443
3095
* nalloc = info[0].src_size*nl
3097
* nalloc = info[0].dst_size*nl # <<<<<<<<<<<<<<
3099
* cbuf = <char*>malloc(nalloc)
3101
__pyx_v_nalloc = ((__pyx_v_info[0]).dst_size * __pyx_v_nl);
3105
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":445
3106
* nalloc = info[0].dst_size*nl
3108
* cbuf = <char*>malloc(nalloc) # <<<<<<<<<<<<<<
3110
* raise MemoryError("Can't allocate conversion buffer")
3112
__pyx_v_cbuf = ((char *)malloc(__pyx_v_nalloc));
3114
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":446
3116
* cbuf = <char*>malloc(nalloc)
3117
* if cbuf == NULL: # <<<<<<<<<<<<<<
3118
* raise MemoryError("Can't allocate conversion buffer")
3121
__pyx_t_1 = (__pyx_v_cbuf == NULL);
3124
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":447
3125
* cbuf = <char*>malloc(nalloc)
3127
* raise MemoryError("Can't allocate conversion buffer") # <<<<<<<<<<<<<<
3129
* for i from 0<=i<nl:
3131
__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;}
3132
__Pyx_GOTREF(__pyx_t_8);
3133
__Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
3134
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_kp_s_6));
3135
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
3136
__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;}
3137
__Pyx_GOTREF(__pyx_t_9);
3138
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
3139
__Pyx_Raise(__pyx_t_9, 0, 0);
3140
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3141
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3146
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":448
3148
* raise MemoryError("Can't allocate conversion buffer")
3149
* try: # <<<<<<<<<<<<<<
3150
* for i from 0<=i<nl:
3151
* memcpy(cbuf + (i*info[0].src_size), buf + (i*buf_stride),
3155
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":449
3156
* raise MemoryError("Can't allocate conversion buffer")
3158
* for i from 0<=i<nl: # <<<<<<<<<<<<<<
3159
* memcpy(cbuf + (i*info[0].src_size), buf + (i*buf_stride),
3162
__pyx_t_3 = __pyx_v_nl;
3163
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
3165
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":451
3166
* for i from 0<=i<nl:
3167
* memcpy(cbuf + (i*info[0].src_size), buf + (i*buf_stride),
3168
* info[0].src_size) # <<<<<<<<<<<<<<
3172
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);
3175
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":453
3178
* if forward: # <<<<<<<<<<<<<<
3179
* H5Tconvert(info[0].supertype, dst, nl, cbuf, NULL, dxpl)
3182
__pyx_t_4 = __pyx_v_forward;
3185
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":454
3188
* H5Tconvert(info[0].supertype, dst, nl, cbuf, NULL, dxpl) # <<<<<<<<<<<<<<
3190
* H5Tconvert(src, info[0].supertype, nl, cbuf, NULL, dxpl)
3192
__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;}
3197
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":456
3198
* H5Tconvert(info[0].supertype, dst, nl, cbuf, NULL, dxpl)
3200
* H5Tconvert(src, info[0].supertype, nl, cbuf, NULL, dxpl) # <<<<<<<<<<<<<<
3202
* for i from 0<=i<nl:
3204
__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;}
3208
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":458
3209
* H5Tconvert(src, info[0].supertype, nl, cbuf, NULL, dxpl)
3211
* for i from 0<=i<nl: # <<<<<<<<<<<<<<
3212
* memcpy(buf + (i*buf_stride), cbuf + (i*info[0].dst_size),
3215
__pyx_t_3 = __pyx_v_nl;
3216
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
3218
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":460
3219
* for i from 0<=i<nl:
3220
* memcpy(buf + (i*buf_stride), cbuf + (i*info[0].dst_size),
3221
* info[0].dst_size) # <<<<<<<<<<<<<<
3225
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);
3230
PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
3231
int __pyx_exc_lineno;
3232
__pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
3233
__pyx_why = 0; goto __pyx_L12;
3236
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3237
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3238
__Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
3239
__pyx_exc_lineno = __pyx_lineno;
3244
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":462
3247
* free(cbuf) # <<<<<<<<<<<<<<
3253
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":463
3256
* cbuf = NULL # <<<<<<<<<<<<<<
3260
__pyx_v_cbuf = NULL;
3261
switch (__pyx_why) {
3263
__Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
3264
__pyx_lineno = __pyx_exc_lineno;
3266
__pyx_exc_value = 0;
3268
goto __pyx_L1_error;
3278
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":465
3281
* return -2 # <<<<<<<<<<<<<<
3290
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":467
3293
* return 0 # <<<<<<<<<<<<<<
3295
* cdef herr_t enum2int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
3303
__Pyx_XDECREF(__pyx_t_8);
3304
__Pyx_XDECREF(__pyx_t_9);
3305
__Pyx_AddTraceback("h5py._conv.enum_int_converter");
3308
__Pyx_RefNannyFinishContext();
3309
PyGILState_Release(_save);
3313
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":469
3316
* cdef herr_t enum2int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
3317
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
3318
* void *bkg_i, hid_t dxpl) except -1:
3321
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) {
3324
__Pyx_RefNannySetupContext("enum2int");
3326
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":473
3327
* void *bkg_i, hid_t dxpl) except -1:
3328
* return enum_int_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
3329
* buf_i, bkg_i, dxpl, 1) # <<<<<<<<<<<<<<
3331
* cdef herr_t int2enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
3333
__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;}
3334
__pyx_r = __pyx_t_1;
3340
__Pyx_AddTraceback("h5py._conv.enum2int");
3343
__Pyx_RefNannyFinishContext();
3347
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":475
3348
* buf_i, bkg_i, dxpl, 1)
3350
* cdef herr_t int2enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, # <<<<<<<<<<<<<<
3351
* size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
3352
* void *bkg_i, hid_t dxpl) except -1:
3355
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) {
3358
__Pyx_RefNannySetupContext("int2enum");
3360
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":479
3361
* void *bkg_i, hid_t dxpl) except -1:
3362
* return enum_int_converter(src_id, dst_id, cdata, nl, buf_stride, bkg_stride,
3363
* buf_i, bkg_i, dxpl, 0) # <<<<<<<<<<<<<<
3367
__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;}
3368
__pyx_r = __pyx_t_1;
3374
__Pyx_AddTraceback("h5py._conv.int2enum");
3377
__Pyx_RefNannyFinishContext();
3381
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":482
3384
* cpdef int register_converters() except -1: # <<<<<<<<<<<<<<
3386
* cdef hid_t vlstring
3389
static PyObject *__pyx_pf_4h5py_5_conv_register_converters(PyObject *__pyx_self, PyObject *unused); /*proto*/
3390
static int __pyx_f_4h5py_5_conv_register_converters(int __pyx_skip_dispatch) {
3391
hid_t __pyx_v_vlstring;
3392
hid_t __pyx_v_pyobj;
3397
__Pyx_RefNannySetupContext("register_converters");
3399
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":488
3402
* vlstring = H5Tcopy(H5T_C_S1) # <<<<<<<<<<<<<<
3403
* H5Tset_size(vlstring, H5T_VARIABLE)
3406
__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;}
3407
__pyx_v_vlstring = __pyx_t_1;
3409
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":489
3411
* vlstring = H5Tcopy(H5T_C_S1)
3412
* H5Tset_size(vlstring, H5T_VARIABLE) # <<<<<<<<<<<<<<
3414
* enum = H5Tenum_create(H5T_STD_I32LE)
3416
__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;}
3418
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":491
3419
* H5Tset_size(vlstring, H5T_VARIABLE)
3421
* enum = H5Tenum_create(H5T_STD_I32LE) # <<<<<<<<<<<<<<
3423
* pyobj = get_python_obj()
3425
__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;}
3426
__pyx_v_enum = __pyx_t_1;
3428
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":493
3429
* enum = H5Tenum_create(H5T_STD_I32LE)
3431
* pyobj = get_python_obj() # <<<<<<<<<<<<<<
3433
* H5Tregister(H5T_PERS_HARD, "vlen2str", vlstring, pyobj, vlen2str)
3435
__pyx_v_pyobj = __pyx_f_4h5py_5_conv_get_python_obj(0);
3437
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":495
3438
* pyobj = get_python_obj()
3440
* H5Tregister(H5T_PERS_HARD, "vlen2str", vlstring, pyobj, vlen2str) # <<<<<<<<<<<<<<
3441
* H5Tregister(H5T_PERS_HARD, "str2vlen", pyobj, vlstring, str2vlen)
3444
__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;}
3446
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":496
3448
* H5Tregister(H5T_PERS_HARD, "vlen2str", vlstring, pyobj, vlen2str)
3449
* H5Tregister(H5T_PERS_HARD, "str2vlen", pyobj, vlstring, str2vlen) # <<<<<<<<<<<<<<
3451
* H5Tregister(H5T_PERS_SOFT, "vlen2fixed", vlstring, H5T_C_S1, vlen2fixed)
3453
__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;}
3455
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":498
3456
* H5Tregister(H5T_PERS_HARD, "str2vlen", pyobj, vlstring, str2vlen)
3458
* H5Tregister(H5T_PERS_SOFT, "vlen2fixed", vlstring, H5T_C_S1, vlen2fixed) # <<<<<<<<<<<<<<
3459
* H5Tregister(H5T_PERS_SOFT, "fixed2vlen", H5T_C_S1, vlstring, fixed2vlen)
3462
__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;}
3464
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":499
3466
* H5Tregister(H5T_PERS_SOFT, "vlen2fixed", vlstring, H5T_C_S1, vlen2fixed)
3467
* H5Tregister(H5T_PERS_SOFT, "fixed2vlen", H5T_C_S1, vlstring, fixed2vlen) # <<<<<<<<<<<<<<
3469
* H5Tregister(H5T_PERS_HARD, "objref2pyref", H5T_STD_REF_OBJ, pyobj, objref2pyref)
3471
__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;}
3473
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":501
3474
* H5Tregister(H5T_PERS_SOFT, "fixed2vlen", H5T_C_S1, vlstring, fixed2vlen)
3476
* H5Tregister(H5T_PERS_HARD, "objref2pyref", H5T_STD_REF_OBJ, pyobj, objref2pyref) # <<<<<<<<<<<<<<
3477
* H5Tregister(H5T_PERS_HARD, "pyref2objref", pyobj, H5T_STD_REF_OBJ, pyref2objref)
3480
__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;}
3482
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":502
3484
* H5Tregister(H5T_PERS_HARD, "objref2pyref", H5T_STD_REF_OBJ, pyobj, objref2pyref)
3485
* H5Tregister(H5T_PERS_HARD, "pyref2objref", pyobj, H5T_STD_REF_OBJ, pyref2objref) # <<<<<<<<<<<<<<
3487
* H5Tregister(H5T_PERS_HARD, "regref2pyref", H5T_STD_REF_DSETREG, pyobj, regref2pyref)
3489
__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;}
3491
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":504
3492
* H5Tregister(H5T_PERS_HARD, "pyref2objref", pyobj, H5T_STD_REF_OBJ, pyref2objref)
3494
* H5Tregister(H5T_PERS_HARD, "regref2pyref", H5T_STD_REF_DSETREG, pyobj, regref2pyref) # <<<<<<<<<<<<<<
3495
* H5Tregister(H5T_PERS_HARD, "pyref2regref", pyobj, H5T_STD_REF_DSETREG, pyref2regref)
3498
__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;}
3500
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":505
3502
* H5Tregister(H5T_PERS_HARD, "regref2pyref", H5T_STD_REF_DSETREG, pyobj, regref2pyref)
3503
* H5Tregister(H5T_PERS_HARD, "pyref2regref", pyobj, H5T_STD_REF_DSETREG, pyref2regref) # <<<<<<<<<<<<<<
3505
* H5Tregister(H5T_PERS_SOFT, "enum2int", enum, H5T_STD_I32LE, enum2int)
3507
__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;}
3509
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":507
3510
* H5Tregister(H5T_PERS_HARD, "pyref2regref", pyobj, H5T_STD_REF_DSETREG, pyref2regref)
3512
* H5Tregister(H5T_PERS_SOFT, "enum2int", enum, H5T_STD_I32LE, enum2int) # <<<<<<<<<<<<<<
3513
* H5Tregister(H5T_PERS_SOFT, "int2enum", H5T_STD_I32LE, enum, int2enum)
3516
__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;}
3518
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":508
3520
* H5Tregister(H5T_PERS_SOFT, "enum2int", enum, H5T_STD_I32LE, enum2int)
3521
* H5Tregister(H5T_PERS_SOFT, "int2enum", H5T_STD_I32LE, enum, int2enum) # <<<<<<<<<<<<<<
3523
* H5Tclose(vlstring)
3525
__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;}
3527
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":510
3528
* H5Tregister(H5T_PERS_SOFT, "int2enum", H5T_STD_I32LE, enum, int2enum)
3530
* H5Tclose(vlstring) # <<<<<<<<<<<<<<
3534
__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;}
3536
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":511
3538
* H5Tclose(vlstring)
3539
* H5Tclose(enum) # <<<<<<<<<<<<<<
3543
__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;}
3545
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":513
3548
* return 0 # <<<<<<<<<<<<<<
3550
* cpdef int unregister_converters() except -1:
3558
__Pyx_AddTraceback("h5py._conv.register_converters");
3561
__Pyx_RefNannyFinishContext();
3565
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":482
3568
* cpdef int register_converters() except -1: # <<<<<<<<<<<<<<
3570
* cdef hid_t vlstring
3573
static PyObject *__pyx_pf_4h5py_5_conv_register_converters(PyObject *__pyx_self, PyObject *unused); /*proto*/
3574
static PyObject *__pyx_pf_4h5py_5_conv_register_converters(PyObject *__pyx_self, PyObject *unused) {
3575
PyObject *__pyx_r = NULL;
3577
PyObject *__pyx_t_2 = NULL;
3578
__Pyx_RefNannySetupContext("register_converters");
3579
__pyx_self = __pyx_self;
3580
__Pyx_XDECREF(__pyx_r);
3581
__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;}
3582
__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;}
3583
__Pyx_GOTREF(__pyx_t_2);
3584
__pyx_r = __pyx_t_2;
3588
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
3591
__Pyx_XDECREF(__pyx_t_2);
3592
__Pyx_AddTraceback("h5py._conv.register_converters");
3595
__Pyx_XGIVEREF(__pyx_r);
3596
__Pyx_RefNannyFinishContext();
3600
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":515
3603
* cpdef int unregister_converters() except -1: # <<<<<<<<<<<<<<
3605
* H5Tunregister(H5T_PERS_HARD, "vlen2str", -1, -1, vlen2str)
3608
static PyObject *__pyx_pf_4h5py_5_conv_unregister_converters(PyObject *__pyx_self, PyObject *unused); /*proto*/
3609
static int __pyx_f_4h5py_5_conv_unregister_converters(int __pyx_skip_dispatch) {
3612
__Pyx_RefNannySetupContext("unregister_converters");
3614
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":517
3615
* cpdef int unregister_converters() except -1:
3617
* H5Tunregister(H5T_PERS_HARD, "vlen2str", -1, -1, vlen2str) # <<<<<<<<<<<<<<
3618
* H5Tunregister(H5T_PERS_HARD, "str2vlen", -1, -1, str2vlen)
3621
__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;}
3623
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":518
3625
* H5Tunregister(H5T_PERS_HARD, "vlen2str", -1, -1, vlen2str)
3626
* H5Tunregister(H5T_PERS_HARD, "str2vlen", -1, -1, str2vlen) # <<<<<<<<<<<<<<
3628
* H5Tunregister(H5T_PERS_SOFT, "vlen2fixed", -1, -1, vlen2fixed)
3630
__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;}
3632
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":520
3633
* H5Tunregister(H5T_PERS_HARD, "str2vlen", -1, -1, str2vlen)
3635
* H5Tunregister(H5T_PERS_SOFT, "vlen2fixed", -1, -1, vlen2fixed) # <<<<<<<<<<<<<<
3636
* H5Tunregister(H5T_PERS_SOFT, "fixed2vlen", -1, -1, fixed2vlen)
3639
__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;}
3641
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":521
3643
* H5Tunregister(H5T_PERS_SOFT, "vlen2fixed", -1, -1, vlen2fixed)
3644
* H5Tunregister(H5T_PERS_SOFT, "fixed2vlen", -1, -1, fixed2vlen) # <<<<<<<<<<<<<<
3646
* H5Tunregister(H5T_PERS_HARD, "objref2pyref", -1, -1, objref2pyref)
3648
__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;}
3650
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":523
3651
* H5Tunregister(H5T_PERS_SOFT, "fixed2vlen", -1, -1, fixed2vlen)
3653
* H5Tunregister(H5T_PERS_HARD, "objref2pyref", -1, -1, objref2pyref) # <<<<<<<<<<<<<<
3654
* H5Tunregister(H5T_PERS_HARD, "pyref2objref", -1, -1, pyref2objref)
3657
__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;}
3659
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":524
3661
* H5Tunregister(H5T_PERS_HARD, "objref2pyref", -1, -1, objref2pyref)
3662
* H5Tunregister(H5T_PERS_HARD, "pyref2objref", -1, -1, pyref2objref) # <<<<<<<<<<<<<<
3664
* H5Tunregister(H5T_PERS_HARD, "regref2pyref", -1, -1, regref2pyref)
3666
__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;}
3668
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":526
3669
* H5Tunregister(H5T_PERS_HARD, "pyref2objref", -1, -1, pyref2objref)
3671
* H5Tunregister(H5T_PERS_HARD, "regref2pyref", -1, -1, regref2pyref) # <<<<<<<<<<<<<<
3672
* H5Tunregister(H5T_PERS_HARD, "pyref2regref", -1, -1, pyref2regref)
3675
__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;}
3677
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":527
3679
* H5Tunregister(H5T_PERS_HARD, "regref2pyref", -1, -1, regref2pyref)
3680
* H5Tunregister(H5T_PERS_HARD, "pyref2regref", -1, -1, pyref2regref) # <<<<<<<<<<<<<<
3682
* H5Tunregister(H5T_PERS_SOFT, "enum2int", -1, -1, enum2int)
3684
__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;}
3686
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":529
3687
* H5Tunregister(H5T_PERS_HARD, "pyref2regref", -1, -1, pyref2regref)
3689
* H5Tunregister(H5T_PERS_SOFT, "enum2int", -1, -1, enum2int) # <<<<<<<<<<<<<<
3690
* H5Tunregister(H5T_PERS_SOFT, "int2enum", -1, -1, int2enum)
3693
__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;}
3695
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":530
3697
* H5Tunregister(H5T_PERS_SOFT, "enum2int", -1, -1, enum2int)
3698
* H5Tunregister(H5T_PERS_SOFT, "int2enum", -1, -1, int2enum) # <<<<<<<<<<<<<<
3702
__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;}
3704
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":532
3705
* H5Tunregister(H5T_PERS_SOFT, "int2enum", -1, -1, int2enum)
3707
* return 0 # <<<<<<<<<<<<<<
3717
__Pyx_AddTraceback("h5py._conv.unregister_converters");
3720
__Pyx_RefNannyFinishContext();
3724
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":515
3727
* cpdef int unregister_converters() except -1: # <<<<<<<<<<<<<<
3729
* H5Tunregister(H5T_PERS_HARD, "vlen2str", -1, -1, vlen2str)
3732
static PyObject *__pyx_pf_4h5py_5_conv_unregister_converters(PyObject *__pyx_self, PyObject *unused); /*proto*/
3733
static PyObject *__pyx_pf_4h5py_5_conv_unregister_converters(PyObject *__pyx_self, PyObject *unused) {
3734
PyObject *__pyx_r = NULL;
3736
PyObject *__pyx_t_2 = NULL;
3737
__Pyx_RefNannySetupContext("unregister_converters");
3738
__pyx_self = __pyx_self;
3739
__Pyx_XDECREF(__pyx_r);
3740
__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;}
3741
__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;}
3742
__Pyx_GOTREF(__pyx_t_2);
3743
__pyx_r = __pyx_t_2;
3747
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
3750
__Pyx_XDECREF(__pyx_t_2);
3751
__Pyx_AddTraceback("h5py._conv.unregister_converters");
3754
__Pyx_XGIVEREF(__pyx_r);
3755
__Pyx_RefNannyFinishContext();
3759
static struct PyMethodDef __pyx_methods[] = {
3760
{__Pyx_NAMESTR("get_python_obj"), (PyCFunction)__pyx_pf_4h5py_5_conv_get_python_obj, METH_NOARGS, __Pyx_DOCSTR(0)},
3761
{__Pyx_NAMESTR("register_converters"), (PyCFunction)__pyx_pf_4h5py_5_conv_register_converters, METH_NOARGS, __Pyx_DOCSTR(0)},
3762
{__Pyx_NAMESTR("unregister_converters"), (PyCFunction)__pyx_pf_4h5py_5_conv_unregister_converters, METH_NOARGS, __Pyx_DOCSTR(0)},
3766
static void __pyx_init_filenames(void); /*proto*/
3768
#if PY_MAJOR_VERSION >= 3
3769
static struct PyModuleDef __pyx_moduledef = {
3770
PyModuleDef_HEAD_INIT,
3771
__Pyx_NAMESTR("_conv"),
3772
__Pyx_DOCSTR(__pyx_k_7), /* m_doc */
3774
__pyx_methods /* m_methods */,
3775
NULL, /* m_reload */
3776
NULL, /* m_traverse */
3782
static __Pyx_StringTabEntry __pyx_string_tab[] = {
3783
{&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
3784
{&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0},
3785
{&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0},
3786
{&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
3787
{&__pyx_n_s__MemoryError, __pyx_k__MemoryError, sizeof(__pyx_k__MemoryError), 0, 0, 1, 1},
3788
{&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
3789
{&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
3790
{&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
3791
{&__pyx_n_s__command, __pyx_k__command, sizeof(__pyx_k__command), 0, 0, 1, 1},
3792
{&__pyx_n_s__dst_size, __pyx_k__dst_size, sizeof(__pyx_k__dst_size), 0, 0, 1, 1},
3793
{&__pyx_n_s__identical, __pyx_k__identical, sizeof(__pyx_k__identical), 0, 0, 1, 1},
3794
{&__pyx_n_s__need_bkg, __pyx_k__need_bkg, sizeof(__pyx_k__need_bkg), 0, 0, 1, 1},
3795
{&__pyx_n_s__obj_ref, __pyx_k__obj_ref, sizeof(__pyx_k__obj_ref), 0, 0, 1, 1},
3796
{&__pyx_n_s__priv, __pyx_k__priv, sizeof(__pyx_k__priv), 0, 0, 1, 1},
3797
{&__pyx_n_s__ref, __pyx_k__ref, sizeof(__pyx_k__ref), 0, 0, 1, 1},
3798
{&__pyx_n_s__reg_ref, __pyx_k__reg_ref, sizeof(__pyx_k__reg_ref), 0, 0, 1, 1},
3799
{&__pyx_n_s__src_size, __pyx_k__src_size, sizeof(__pyx_k__src_size), 0, 0, 1, 1},
3800
{&__pyx_n_s__supertype, __pyx_k__supertype, sizeof(__pyx_k__supertype), 0, 0, 1, 1},
3801
{&__pyx_n_s__typecode, __pyx_k__typecode, sizeof(__pyx_k__typecode), 0, 0, 1, 1},
3802
{0, 0, 0, 0, 0, 0, 0}
3804
static int __Pyx_InitCachedBuiltins(void) {
3805
__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;}
3806
__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;}
3807
__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;}
3813
static int __Pyx_InitGlobals(void) {
3814
if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
3820
#if PY_MAJOR_VERSION < 3
3821
PyMODINIT_FUNC init_conv(void); /*proto*/
3822
PyMODINIT_FUNC init_conv(void)
3824
PyMODINIT_FUNC PyInit__conv(void); /*proto*/
3825
PyMODINIT_FUNC PyInit__conv(void)
3829
void* __pyx_refnanny = NULL;
3830
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
3831
if (!__Pyx_RefNanny) {
3833
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
3834
if (!__Pyx_RefNanny)
3835
Py_FatalError("failed to import 'refnanny' module");
3837
__pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit__conv(void)", __LINE__, __FILE__);
3839
__pyx_init_filenames();
3840
__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;}
3841
#if PY_MAJOR_VERSION < 3
3842
__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;}
3844
__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;}
3846
/*--- Library function declarations ---*/
3847
/*--- Threads initialization code ---*/
3848
#if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
3849
#ifdef WITH_THREAD /* Python build with threading support? */
3850
PyEval_InitThreads();
3853
/*--- Module creation code ---*/
3854
#if PY_MAJOR_VERSION < 3
3855
__pyx_m = Py_InitModule4(__Pyx_NAMESTR("_conv"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_7), 0, PYTHON_API_VERSION);
3857
__pyx_m = PyModule_Create(&__pyx_moduledef);
3859
if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
3860
#if PY_MAJOR_VERSION < 3
3863
__pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
3864
if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
3865
if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
3866
/*--- Initialize various global constants etc. ---*/
3867
if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3868
if (__pyx_module_is_main_h5py___conv) {
3869
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;};
3871
/*--- Builtin init code ---*/
3872
if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3873
/*--- Global init code ---*/
3874
/*--- Function export code ---*/
3875
/*--- Type init code ---*/
3876
/*--- Type import code ---*/
3877
__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;}
3878
__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;}
3879
/*--- Function import code ---*/
3880
/*--- Execution code ---*/
3882
/* "/home/tachyon/slave/unix-release/build/h5py/_conv.pyx":22
3884
* # Create Python object equivalents
3885
* cdef hid_t H5PY_OBJ = 0 # <<<<<<<<<<<<<<
3887
* cpdef hid_t get_python_obj():
3889
__pyx_v_4h5py_5_conv_H5PY_OBJ = 0;
3891
/* "/home/tachyon/slave/unix-release/build/h5py/h5r.pxd":1
3892
* #+ # <<<<<<<<<<<<<<
3894
* # This file is part of h5py, a low-level Python interface to the HDF5 library.
3899
__Pyx_AddTraceback("init h5py._conv");
3900
Py_DECREF(__pyx_m); __pyx_m = 0;
3901
} else if (!PyErr_Occurred()) {
3902
PyErr_SetString(PyExc_ImportError, "init h5py._conv");
3905
__Pyx_RefNannyFinishContext();
3906
#if PY_MAJOR_VERSION < 3
3913
static const char *__pyx_filenames[] = {
3918
/* Runtime support code */
3920
static void __pyx_init_filenames(void) {
3921
__pyx_f = __pyx_filenames;
3924
static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
3925
PyObject *tmp_type, *tmp_value, *tmp_tb;
3926
PyThreadState *tstate = PyThreadState_GET();
3928
tmp_type = tstate->curexc_type;
3929
tmp_value = tstate->curexc_value;
3930
tmp_tb = tstate->curexc_traceback;
3931
tstate->curexc_type = type;
3932
tstate->curexc_value = value;
3933
tstate->curexc_traceback = tb;
3934
Py_XDECREF(tmp_type);
3935
Py_XDECREF(tmp_value);
3939
static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
3940
PyThreadState *tstate = PyThreadState_GET();
3941
*type = tstate->curexc_type;
3942
*value = tstate->curexc_value;
3943
*tb = tstate->curexc_traceback;
3945
tstate->curexc_type = 0;
3946
tstate->curexc_value = 0;
3947
tstate->curexc_traceback = 0;
3951
static INLINE PyObject *__Pyx_PyInt_to_py_hid_t(hid_t val) {
3952
const hid_t neg_one = (hid_t)-1, const_zero = 0;
3953
const int is_unsigned = neg_one > const_zero;
3954
if (sizeof(hid_t) < sizeof(long)) {
3955
return PyInt_FromLong((long)val);
3956
} else if (sizeof(hid_t) == sizeof(long)) {
3958
return PyLong_FromUnsignedLong((unsigned long)val);
3960
return PyInt_FromLong((long)val);
3961
} else { /* (sizeof(hid_t) > sizeof(long)) */
3963
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
3965
return PyLong_FromLongLong((PY_LONG_LONG)val);
3969
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
3971
result = PyObject_GetAttr(dict, name);
3973
PyErr_SetObject(PyExc_NameError, name);
3977
#if PY_MAJOR_VERSION < 3
3978
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
3982
/* First, check the traceback argument, replacing None with NULL. */
3983
if (tb == Py_None) {
3987
else if (tb != NULL && !PyTraceBack_Check(tb)) {
3988
PyErr_SetString(PyExc_TypeError,
3989
"raise: arg 3 must be a traceback or None");
3992
/* Next, replace a missing value with None */
3993
if (value == NULL) {
3997
#if PY_VERSION_HEX < 0x02050000
3998
if (!PyClass_Check(type))
4000
if (!PyType_Check(type))
4003
/* Raising an instance. The value should be a dummy. */
4004
if (value != Py_None) {
4005
PyErr_SetString(PyExc_TypeError,
4006
"instance exception may not have a separate value");
4009
/* Normalize to raise <class>, <instance> */
4012
#if PY_VERSION_HEX < 0x02050000
4013
if (PyInstance_Check(type)) {
4014
type = (PyObject*) ((PyInstanceObject*)type)->in_class;
4019
PyErr_SetString(PyExc_TypeError,
4020
"raise: exception must be an old-style class or instance");
4024
type = (PyObject*) Py_TYPE(type);
4026
if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
4027
PyErr_SetString(PyExc_TypeError,
4028
"raise: exception class must be a subclass of BaseException");
4034
__Pyx_ErrRestore(type, value, tb);
4043
#else /* Python 3+ */
4045
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
4046
if (tb == Py_None) {
4048
} else if (tb && !PyTraceBack_Check(tb)) {
4049
PyErr_SetString(PyExc_TypeError,
4050
"raise: arg 3 must be a traceback or None");
4053
if (value == Py_None)
4056
if (PyExceptionInstance_Check(type)) {
4058
PyErr_SetString(PyExc_TypeError,
4059
"instance exception may not have a separate value");
4063
type = (PyObject*) Py_TYPE(value);
4064
} else if (!PyExceptionClass_Check(type)) {
4065
PyErr_SetString(PyExc_TypeError,
4066
"raise: exception class must be a subclass of BaseException");
4070
PyErr_SetObject(type, value);
4073
PyThreadState *tstate = PyThreadState_GET();
4074
PyObject* tmp_tb = tstate->curexc_traceback;
4077
tstate->curexc_traceback = tb;
4087
static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
4088
const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
4089
const int is_unsigned = neg_one > const_zero;
4090
if (sizeof(unsigned char) < sizeof(long)) {
4091
long val = __Pyx_PyInt_AsLong(x);
4092
if (unlikely(val != (long)(unsigned char)val)) {
4093
if (!unlikely(val == -1 && PyErr_Occurred())) {
4094
PyErr_SetString(PyExc_OverflowError,
4095
(is_unsigned && unlikely(val < 0)) ?
4096
"can't convert negative value to unsigned char" :
4097
"value too large to convert to unsigned char");
4099
return (unsigned char)-1;
4101
return (unsigned char)val;
4103
return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
4106
static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
4107
const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
4108
const int is_unsigned = neg_one > const_zero;
4109
if (sizeof(unsigned short) < sizeof(long)) {
4110
long val = __Pyx_PyInt_AsLong(x);
4111
if (unlikely(val != (long)(unsigned short)val)) {
4112
if (!unlikely(val == -1 && PyErr_Occurred())) {
4113
PyErr_SetString(PyExc_OverflowError,
4114
(is_unsigned && unlikely(val < 0)) ?
4115
"can't convert negative value to unsigned short" :
4116
"value too large to convert to unsigned short");
4118
return (unsigned short)-1;
4120
return (unsigned short)val;
4122
return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
4125
static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
4126
const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
4127
const int is_unsigned = neg_one > const_zero;
4128
if (sizeof(unsigned int) < sizeof(long)) {
4129
long val = __Pyx_PyInt_AsLong(x);
4130
if (unlikely(val != (long)(unsigned int)val)) {
4131
if (!unlikely(val == -1 && PyErr_Occurred())) {
4132
PyErr_SetString(PyExc_OverflowError,
4133
(is_unsigned && unlikely(val < 0)) ?
4134
"can't convert negative value to unsigned int" :
4135
"value too large to convert to unsigned int");
4137
return (unsigned int)-1;
4139
return (unsigned int)val;
4141
return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
4144
static INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
4145
const char neg_one = (char)-1, const_zero = 0;
4146
const int is_unsigned = neg_one > const_zero;
4147
if (sizeof(char) < sizeof(long)) {
4148
long val = __Pyx_PyInt_AsLong(x);
4149
if (unlikely(val != (long)(char)val)) {
4150
if (!unlikely(val == -1 && PyErr_Occurred())) {
4151
PyErr_SetString(PyExc_OverflowError,
4152
(is_unsigned && unlikely(val < 0)) ?
4153
"can't convert negative value to char" :
4154
"value too large to convert to char");
4160
return (char)__Pyx_PyInt_AsLong(x);
4163
static INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
4164
const short neg_one = (short)-1, const_zero = 0;
4165
const int is_unsigned = neg_one > const_zero;
4166
if (sizeof(short) < sizeof(long)) {
4167
long val = __Pyx_PyInt_AsLong(x);
4168
if (unlikely(val != (long)(short)val)) {
4169
if (!unlikely(val == -1 && PyErr_Occurred())) {
4170
PyErr_SetString(PyExc_OverflowError,
4171
(is_unsigned && unlikely(val < 0)) ?
4172
"can't convert negative value to short" :
4173
"value too large to convert to short");
4179
return (short)__Pyx_PyInt_AsLong(x);
4182
static INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
4183
const int neg_one = (int)-1, const_zero = 0;
4184
const int is_unsigned = neg_one > const_zero;
4185
if (sizeof(int) < sizeof(long)) {
4186
long val = __Pyx_PyInt_AsLong(x);
4187
if (unlikely(val != (long)(int)val)) {
4188
if (!unlikely(val == -1 && PyErr_Occurred())) {
4189
PyErr_SetString(PyExc_OverflowError,
4190
(is_unsigned && unlikely(val < 0)) ?
4191
"can't convert negative value to int" :
4192
"value too large to convert to int");
4198
return (int)__Pyx_PyInt_AsLong(x);
4201
static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
4202
const signed char neg_one = (signed char)-1, const_zero = 0;
4203
const int is_unsigned = neg_one > const_zero;
4204
if (sizeof(signed char) < sizeof(long)) {
4205
long val = __Pyx_PyInt_AsLong(x);
4206
if (unlikely(val != (long)(signed char)val)) {
4207
if (!unlikely(val == -1 && PyErr_Occurred())) {
4208
PyErr_SetString(PyExc_OverflowError,
4209
(is_unsigned && unlikely(val < 0)) ?
4210
"can't convert negative value to signed char" :
4211
"value too large to convert to signed char");
4213
return (signed char)-1;
4215
return (signed char)val;
4217
return (signed char)__Pyx_PyInt_AsSignedLong(x);
4220
static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
4221
const signed short neg_one = (signed short)-1, const_zero = 0;
4222
const int is_unsigned = neg_one > const_zero;
4223
if (sizeof(signed short) < sizeof(long)) {
4224
long val = __Pyx_PyInt_AsLong(x);
4225
if (unlikely(val != (long)(signed short)val)) {
4226
if (!unlikely(val == -1 && PyErr_Occurred())) {
4227
PyErr_SetString(PyExc_OverflowError,
4228
(is_unsigned && unlikely(val < 0)) ?
4229
"can't convert negative value to signed short" :
4230
"value too large to convert to signed short");
4232
return (signed short)-1;
4234
return (signed short)val;
4236
return (signed short)__Pyx_PyInt_AsSignedLong(x);
4239
static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
4240
const signed int neg_one = (signed int)-1, const_zero = 0;
4241
const int is_unsigned = neg_one > const_zero;
4242
if (sizeof(signed int) < sizeof(long)) {
4243
long val = __Pyx_PyInt_AsLong(x);
4244
if (unlikely(val != (long)(signed int)val)) {
4245
if (!unlikely(val == -1 && PyErr_Occurred())) {
4246
PyErr_SetString(PyExc_OverflowError,
4247
(is_unsigned && unlikely(val < 0)) ?
4248
"can't convert negative value to signed int" :
4249
"value too large to convert to signed int");
4251
return (signed int)-1;
4253
return (signed int)val;
4255
return (signed int)__Pyx_PyInt_AsSignedLong(x);
4258
static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
4259
const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
4260
const int is_unsigned = neg_one > const_zero;
4261
#if PY_VERSION_HEX < 0x03000000
4262
if (likely(PyInt_Check(x))) {
4263
long val = PyInt_AS_LONG(x);
4264
if (is_unsigned && unlikely(val < 0)) {
4265
PyErr_SetString(PyExc_OverflowError,
4266
"can't convert negative value to unsigned long");
4267
return (unsigned long)-1;
4269
return (unsigned long)val;
4272
if (likely(PyLong_Check(x))) {
4274
if (unlikely(Py_SIZE(x) < 0)) {
4275
PyErr_SetString(PyExc_OverflowError,
4276
"can't convert negative value to unsigned long");
4277
return (unsigned long)-1;
4279
return PyLong_AsUnsignedLong(x);
4281
return PyLong_AsLong(x);
4285
PyObject *tmp = __Pyx_PyNumber_Int(x);
4286
if (!tmp) return (unsigned long)-1;
4287
val = __Pyx_PyInt_AsUnsignedLong(tmp);
4293
static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
4294
const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
4295
const int is_unsigned = neg_one > const_zero;
4296
#if PY_VERSION_HEX < 0x03000000
4297
if (likely(PyInt_Check(x))) {
4298
long val = PyInt_AS_LONG(x);
4299
if (is_unsigned && unlikely(val < 0)) {
4300
PyErr_SetString(PyExc_OverflowError,
4301
"can't convert negative value to unsigned PY_LONG_LONG");
4302
return (unsigned PY_LONG_LONG)-1;
4304
return (unsigned PY_LONG_LONG)val;
4307
if (likely(PyLong_Check(x))) {
4309
if (unlikely(Py_SIZE(x) < 0)) {
4310
PyErr_SetString(PyExc_OverflowError,
4311
"can't convert negative value to unsigned PY_LONG_LONG");
4312
return (unsigned PY_LONG_LONG)-1;
4314
return PyLong_AsUnsignedLongLong(x);
4316
return PyLong_AsLongLong(x);
4319
unsigned PY_LONG_LONG val;
4320
PyObject *tmp = __Pyx_PyNumber_Int(x);
4321
if (!tmp) return (unsigned PY_LONG_LONG)-1;
4322
val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
4328
static INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
4329
const long neg_one = (long)-1, const_zero = 0;
4330
const int is_unsigned = neg_one > const_zero;
4331
#if PY_VERSION_HEX < 0x03000000
4332
if (likely(PyInt_Check(x))) {
4333
long val = PyInt_AS_LONG(x);
4334
if (is_unsigned && unlikely(val < 0)) {
4335
PyErr_SetString(PyExc_OverflowError,
4336
"can't convert negative value to long");
4342
if (likely(PyLong_Check(x))) {
4344
if (unlikely(Py_SIZE(x) < 0)) {
4345
PyErr_SetString(PyExc_OverflowError,
4346
"can't convert negative value to long");
4349
return PyLong_AsUnsignedLong(x);
4351
return PyLong_AsLong(x);
4355
PyObject *tmp = __Pyx_PyNumber_Int(x);
4356
if (!tmp) return (long)-1;
4357
val = __Pyx_PyInt_AsLong(tmp);
4363
static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
4364
const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
4365
const int is_unsigned = neg_one > const_zero;
4366
#if PY_VERSION_HEX < 0x03000000
4367
if (likely(PyInt_Check(x))) {
4368
long val = PyInt_AS_LONG(x);
4369
if (is_unsigned && unlikely(val < 0)) {
4370
PyErr_SetString(PyExc_OverflowError,
4371
"can't convert negative value to PY_LONG_LONG");
4372
return (PY_LONG_LONG)-1;
4374
return (PY_LONG_LONG)val;
4377
if (likely(PyLong_Check(x))) {
4379
if (unlikely(Py_SIZE(x) < 0)) {
4380
PyErr_SetString(PyExc_OverflowError,
4381
"can't convert negative value to PY_LONG_LONG");
4382
return (PY_LONG_LONG)-1;
4384
return PyLong_AsUnsignedLongLong(x);
4386
return PyLong_AsLongLong(x);
4390
PyObject *tmp = __Pyx_PyNumber_Int(x);
4391
if (!tmp) return (PY_LONG_LONG)-1;
4392
val = __Pyx_PyInt_AsLongLong(tmp);
4398
static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
4399
const signed long neg_one = (signed long)-1, const_zero = 0;
4400
const int is_unsigned = neg_one > const_zero;
4401
#if PY_VERSION_HEX < 0x03000000
4402
if (likely(PyInt_Check(x))) {
4403
long val = PyInt_AS_LONG(x);
4404
if (is_unsigned && unlikely(val < 0)) {
4405
PyErr_SetString(PyExc_OverflowError,
4406
"can't convert negative value to signed long");
4407
return (signed long)-1;
4409
return (signed long)val;
4412
if (likely(PyLong_Check(x))) {
4414
if (unlikely(Py_SIZE(x) < 0)) {
4415
PyErr_SetString(PyExc_OverflowError,
4416
"can't convert negative value to signed long");
4417
return (signed long)-1;
4419
return PyLong_AsUnsignedLong(x);
4421
return PyLong_AsLong(x);
4425
PyObject *tmp = __Pyx_PyNumber_Int(x);
4426
if (!tmp) return (signed long)-1;
4427
val = __Pyx_PyInt_AsSignedLong(tmp);
4433
static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
4434
const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
4435
const int is_unsigned = neg_one > const_zero;
4436
#if PY_VERSION_HEX < 0x03000000
4437
if (likely(PyInt_Check(x))) {
4438
long val = PyInt_AS_LONG(x);
4439
if (is_unsigned && unlikely(val < 0)) {
4440
PyErr_SetString(PyExc_OverflowError,
4441
"can't convert negative value to signed PY_LONG_LONG");
4442
return (signed PY_LONG_LONG)-1;
4444
return (signed PY_LONG_LONG)val;
4447
if (likely(PyLong_Check(x))) {
4449
if (unlikely(Py_SIZE(x) < 0)) {
4450
PyErr_SetString(PyExc_OverflowError,
4451
"can't convert negative value to signed PY_LONG_LONG");
4452
return (signed PY_LONG_LONG)-1;
4454
return PyLong_AsUnsignedLongLong(x);
4456
return PyLong_AsLongLong(x);
4459
signed PY_LONG_LONG val;
4460
PyObject *tmp = __Pyx_PyNumber_Int(x);
4461
if (!tmp) return (signed PY_LONG_LONG)-1;
4462
val = __Pyx_PyInt_AsSignedLongLong(tmp);
4468
static void __Pyx_WriteUnraisable(const char *name) {
4469
PyObject *old_exc, *old_val, *old_tb;
4471
__Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
4472
#if PY_MAJOR_VERSION < 3
4473
ctx = PyString_FromString(name);
4475
ctx = PyUnicode_FromString(name);
4477
__Pyx_ErrRestore(old_exc, old_val, old_tb);
4479
PyErr_WriteUnraisable(Py_None);
4481
PyErr_WriteUnraisable(ctx);
4486
#ifndef __PYX_HAVE_RT_ImportType
4487
#define __PYX_HAVE_RT_ImportType
4488
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
4491
PyObject *py_module = 0;
4492
PyObject *result = 0;
4493
PyObject *py_name = 0;
4495
py_module = __Pyx_ImportModule(module_name);
4498
#if PY_MAJOR_VERSION < 3
4499
py_name = PyString_FromString(class_name);
4501
py_name = PyUnicode_FromString(class_name);
4505
result = PyObject_GetAttr(py_module, py_name);
4508
Py_DECREF(py_module);
4512
if (!PyType_Check(result)) {
4513
PyErr_Format(PyExc_TypeError,
4514
"%s.%s is not a type object",
4515
module_name, class_name);
4518
if (((PyTypeObject *)result)->tp_basicsize != size) {
4519
PyErr_Format(PyExc_ValueError,
4520
"%s.%s does not appear to be the correct type object",
4521
module_name, class_name);
4524
return (PyTypeObject *)result;
4526
Py_XDECREF(py_module);
4532
#ifndef __PYX_HAVE_RT_ImportModule
4533
#define __PYX_HAVE_RT_ImportModule
4534
static PyObject *__Pyx_ImportModule(const char *name) {
4535
PyObject *py_name = 0;
4536
PyObject *py_module = 0;
4538
#if PY_MAJOR_VERSION < 3
4539
py_name = PyString_FromString(name);
4541
py_name = PyUnicode_FromString(name);
4545
py_module = PyImport_Import(py_name);
4549
Py_XDECREF(py_name);
4554
#include "compile.h"
4555
#include "frameobject.h"
4556
#include "traceback.h"
4558
static void __Pyx_AddTraceback(const char *funcname) {
4559
PyObject *py_srcfile = 0;
4560
PyObject *py_funcname = 0;
4561
PyObject *py_globals = 0;
4562
PyCodeObject *py_code = 0;
4563
PyFrameObject *py_frame = 0;
4565
#if PY_MAJOR_VERSION < 3
4566
py_srcfile = PyString_FromString(__pyx_filename);
4568
py_srcfile = PyUnicode_FromString(__pyx_filename);
4570
if (!py_srcfile) goto bad;
4571
if (__pyx_clineno) {
4572
#if PY_MAJOR_VERSION < 3
4573
py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
4575
py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
4579
#if PY_MAJOR_VERSION < 3
4580
py_funcname = PyString_FromString(funcname);
4582
py_funcname = PyUnicode_FromString(funcname);
4585
if (!py_funcname) goto bad;
4586
py_globals = PyModule_GetDict(__pyx_m);
4587
if (!py_globals) goto bad;
4588
py_code = PyCode_New(
4589
0, /*int argcount,*/
4590
#if PY_MAJOR_VERSION >= 3
4591
0, /*int kwonlyargcount,*/
4594
0, /*int stacksize,*/
4596
__pyx_empty_bytes, /*PyObject *code,*/
4597
__pyx_empty_tuple, /*PyObject *consts,*/
4598
__pyx_empty_tuple, /*PyObject *names,*/
4599
__pyx_empty_tuple, /*PyObject *varnames,*/
4600
__pyx_empty_tuple, /*PyObject *freevars,*/
4601
__pyx_empty_tuple, /*PyObject *cellvars,*/
4602
py_srcfile, /*PyObject *filename,*/
4603
py_funcname, /*PyObject *name,*/
4604
__pyx_lineno, /*int firstlineno,*/
4605
__pyx_empty_bytes /*PyObject *lnotab*/
4607
if (!py_code) goto bad;
4608
py_frame = PyFrame_New(
4609
PyThreadState_GET(), /*PyThreadState *tstate,*/
4610
py_code, /*PyCodeObject *code,*/
4611
py_globals, /*PyObject *globals,*/
4612
0 /*PyObject *locals*/
4614
if (!py_frame) goto bad;
4615
py_frame->f_lineno = __pyx_lineno;
4616
PyTraceBack_Here(py_frame);
4618
Py_XDECREF(py_srcfile);
4619
Py_XDECREF(py_funcname);
4620
Py_XDECREF(py_code);
4621
Py_XDECREF(py_frame);
4624
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
4626
#if PY_MAJOR_VERSION < 3
4627
if (t->is_unicode) {
4628
*t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
4629
} else if (t->intern) {
4630
*t->p = PyString_InternFromString(t->s);
4632
*t->p = PyString_FromStringAndSize(t->s, t->n - 1);
4634
#else /* Python 3+ has unicode identifiers */
4635
if (t->is_unicode | t->is_str) {
4637
*t->p = PyUnicode_InternFromString(t->s);
4638
} else if (t->encoding) {
4639
*t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
4641
*t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
4644
*t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
4654
/* Type Conversion Functions */
4656
static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
4657
if (x == Py_True) return 1;
4658
else if ((x == Py_False) | (x == Py_None)) return 0;
4659
else return PyObject_IsTrue(x);
4662
static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
4664
const char *name = NULL;
4665
PyObject *res = NULL;
4666
#if PY_VERSION_HEX < 0x03000000
4667
if (PyInt_Check(x) || PyLong_Check(x))
4669
if (PyLong_Check(x))
4671
return Py_INCREF(x), x;
4672
m = Py_TYPE(x)->tp_as_number;
4673
#if PY_VERSION_HEX < 0x03000000
4674
if (m && m->nb_int) {
4676
res = PyNumber_Int(x);
4678
else if (m && m->nb_long) {
4680
res = PyNumber_Long(x);
4683
if (m && m->nb_int) {
4685
res = PyNumber_Long(x);
4689
#if PY_VERSION_HEX < 0x03000000
4690
if (!PyInt_Check(res) && !PyLong_Check(res)) {
4692
if (!PyLong_Check(res)) {
4694
PyErr_Format(PyExc_TypeError,
4695
"__%s__ returned non-%s (type %.200s)",
4696
name, name, Py_TYPE(res)->tp_name);
4701
else if (!PyErr_Occurred()) {
4702
PyErr_SetString(PyExc_TypeError,
4703
"an integer is required");
4708
static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
4710
PyObject* x = PyNumber_Index(b);
4712
ival = PyInt_AsSsize_t(x);
4717
static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
4718
#if PY_VERSION_HEX < 0x02050000
4719
if (ival <= LONG_MAX)
4720
return PyInt_FromLong((long)ival);
4722
unsigned char *bytes = (unsigned char *) &ival;
4723
int one = 1; int little = (int)*(unsigned char*)&one;
4724
return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
4727
return PyInt_FromSize_t(ival);
4731
static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
4732
unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
4733
if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
4735
} else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
4736
PyErr_SetString(PyExc_OverflowError,
4737
"value too large to convert to size_t");
4744
#endif /* Py_PYTHON_H */