~ubuntu-branches/ubuntu/utopic/h5py/utopic

« back to all changes in this revision

Viewing changes to h5py/h5l.c

  • Committer: Bazaar Package Importer
  • Author(s): Soeren Sonnenburg
  • Date: 2011-01-12 14:48:19 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110112144819-9kbgh192yngf6o05
Tags: 1.3.1-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Generated by Cython 0.12 on Sun Mar 14 21:50:16 2010 */
 
1
/* Generated by Cython 0.12.1 on Tue Dec 21 22:32:16 2010 */
2
2
 
3
3
#define PY_SSIZE_T_CLEAN
4
4
#include "Python.h"
6
6
#ifndef Py_PYTHON_H
7
7
    #error Python headers needed to compile C extensions, please install development version of Python.
8
8
#else
 
9
 
9
10
#ifndef PY_LONG_LONG
10
11
  #define PY_LONG_LONG LONG_LONG
11
12
#endif
17
18
  #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
18
19
  #define PyDict_Contains(d,o)   PySequence_Contains(d,o)
19
20
#endif
 
21
 
20
22
#if PY_VERSION_HEX < 0x02050000
21
23
  typedef int Py_ssize_t;
22
24
  #define PY_SSIZE_T_MAX INT_MAX
26
28
  #define PyInt_AsSsize_t(o)   PyInt_AsLong(o)
27
29
  #define PyNumber_Index(o)    PyNumber_Int(o)
28
30
  #define PyIndex_Check(o)     PyNumber_Check(o)
 
31
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
29
32
#endif
 
33
 
30
34
#if PY_VERSION_HEX < 0x02060000
31
35
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
32
36
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
36
40
  #define PyType_Modified(t)
37
41
 
38
42
  typedef struct {
39
 
       void *buf;
40
 
       PyObject *obj;
41
 
       Py_ssize_t len;
42
 
       Py_ssize_t itemsize;
43
 
       int readonly;
44
 
       int ndim;
45
 
       char *format;
46
 
       Py_ssize_t *shape;
47
 
       Py_ssize_t *strides;
48
 
       Py_ssize_t *suboffsets;
49
 
       void *internal;
 
43
     void *buf;
 
44
     PyObject *obj;
 
45
     Py_ssize_t len;
 
46
     Py_ssize_t itemsize;
 
47
     int readonly;
 
48
     int ndim;
 
49
     char *format;
 
50
     Py_ssize_t *shape;
 
51
     Py_ssize_t *strides;
 
52
     Py_ssize_t *suboffsets;
 
53
     void *internal;
50
54
  } Py_buffer;
51
55
 
52
56
  #define PyBUF_SIMPLE 0
60
64
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
61
65
 
62
66
#endif
 
67
 
63
68
#if PY_MAJOR_VERSION < 3
64
69
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
65
70
#else
66
71
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
67
72
#endif
 
73
 
68
74
#if PY_MAJOR_VERSION >= 3
69
75
  #define Py_TPFLAGS_CHECKTYPES 0
70
76
  #define Py_TPFLAGS_HAVE_INDEX 0
71
77
#endif
 
78
 
72
79
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
73
80
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
74
81
#endif
 
82
 
75
83
#if PY_MAJOR_VERSION >= 3
76
84
  #define PyBaseString_Type            PyUnicode_Type
77
85
  #define PyString_Type                PyUnicode_Type
80
88
  #define PyBytes_Type                 PyString_Type
81
89
  #define PyBytes_CheckExact           PyString_CheckExact
82
90
#endif
 
91
 
83
92
#if PY_MAJOR_VERSION >= 3
84
93
  #define PyInt_Type                   PyLong_Type
85
94
  #define PyInt_Check(op)              PyLong_Check(op)
99
108
#else
100
109
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
101
110
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
 
111
 
102
112
#endif
 
113
 
103
114
#if PY_MAJOR_VERSION >= 3
104
115
  #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
105
116
#endif
 
117
 
106
118
#if !defined(WIN32) && !defined(MS_WINDOWS)
107
119
  #ifndef __stdcall
108
120
    #define __stdcall
116
128
#else
117
129
  #define _USE_MATH_DEFINES
118
130
#endif
 
131
 
119
132
#if PY_VERSION_HEX < 0x02050000
120
133
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
121
134
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
125
138
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
126
139
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
127
140
#endif
 
141
 
128
142
#if PY_VERSION_HEX < 0x02050000
129
143
  #define __Pyx_NAMESTR(n) ((char *)(n))
130
144
  #define __Pyx_DOCSTR(n)  ((char *)(n))
147
161
#include "compat.h"
148
162
#include "lzf_filter.h"
149
163
#include "hdf5.h"
 
164
#include "numpy/arrayobject.h"
150
165
 
151
 
#ifdef __GNUC__
152
 
#define INLINE __inline__
153
 
#elif _WIN32
154
 
#define INLINE __inline
155
 
#else
156
 
#define INLINE 
 
166
#ifndef CYTHON_INLINE
 
167
  #if defined(__GNUC__)
 
168
    #define CYTHON_INLINE __inline__
 
169
  #elif defined(_MSC_VER)
 
170
    #define CYTHON_INLINE __inline
 
171
  #else
 
172
    #define CYTHON_INLINE 
 
173
  #endif
157
174
#endif
158
175
 
159
176
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*/
175
192
#define __Pyx_PyBytes_AsUString(s)        ((unsigned char*) __Pyx_PyBytes_AsString(s))
176
193
 
177
194
#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);
 
195
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
 
196
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
180
197
 
181
198
#if !defined(T_PYSSIZET)
182
199
#if PY_VERSION_HEX < 0x02050000
240
257
#endif
241
258
#endif
242
259
 
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*);
 
260
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
 
261
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
 
262
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
246
263
 
247
264
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
248
265
 
274
291
 
275
292
/* Type declarations */
276
293
 
 
294
/* "/home/tachyon/h5py/h5py/utils.pxd":20
 
295
 * cdef void efree(void* ptr)
 
296
 * 
 
297
 * cpdef int check_numpy_read(ndarray arr, hid_t space_id=*) except -1             # <<<<<<<<<<<<<<
 
298
 * cpdef int check_numpy_write(ndarray arr, hid_t space_id=*) except -1
 
299
 * 
 
300
 */
 
301
 
 
302
struct __pyx_opt_args_4h5py_5utils_check_numpy_read {
 
303
  int __pyx_n;
 
304
  hid_t space_id;
 
305
};
 
306
 
 
307
/* "/home/tachyon/h5py/h5py/utils.pxd":21
 
308
 * 
 
309
 * cpdef int check_numpy_read(ndarray arr, hid_t space_id=*) except -1
 
310
 * cpdef int check_numpy_write(ndarray arr, hid_t space_id=*) except -1             # <<<<<<<<<<<<<<
 
311
 * 
 
312
 * cdef int convert_tuple(object tuple, hsize_t *dims, hsize_t rank) except -1
 
313
 */
 
314
 
 
315
struct __pyx_opt_args_4h5py_5utils_check_numpy_write {
 
316
  int __pyx_n;
 
317
  hid_t space_id;
 
318
};
 
319
 
 
320
/* "/home/tachyon/h5py/h5py/h5.pxd":34
 
321
 *     cdef readonly int locked
 
322
 * 
 
323
 * cdef class ObjectID:             # <<<<<<<<<<<<<<
 
324
 * 
 
325
 *     cdef object __weakref__
 
326
 */
 
327
 
 
328
struct __pyx_obj_4h5py_2h5_ObjectID {
 
329
  PyObject_HEAD
 
330
  PyObject *__weakref__;
 
331
  struct __pyx_obj_4h5py_2h5_IDProxy *_proxy;
 
332
  PyObject *_hash;
 
333
};
 
334
 
 
335
/* "/home/tachyon/h5py/h5py/h5g.pxd":18
 
336
 * from h5 cimport ObjectID
 
337
 * 
 
338
 * cdef class GroupID(ObjectID):             # <<<<<<<<<<<<<<
 
339
 * 
 
340
 *     IF H5PY_18API:
 
341
 */
 
342
 
 
343
struct __pyx_obj_4h5py_3h5g_GroupID {
 
344
  struct __pyx_obj_4h5py_2h5_ObjectID __pyx_base;
 
345
  PyObject *links;
 
346
};
 
347
 
 
348
/* "/home/tachyon/h5py/h5py/h5.pxd":40
 
349
 *     cdef object _hash
 
350
 * 
 
351
 * cdef class SmartStruct:             # <<<<<<<<<<<<<<
 
352
 *     cdef object __weakref__
 
353
 *     cdef object _title
 
354
 */
 
355
 
 
356
struct __pyx_obj_4h5py_2h5_SmartStruct {
 
357
  PyObject_HEAD
 
358
  PyObject *__weakref__;
 
359
  PyObject *_title;
 
360
};
 
361
 
 
362
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":33
 
363
 * TYPE_EXTERNAL = H5L_TYPE_EXTERNAL
 
364
 * 
 
365
 * cdef class LinkInfo(SmartStruct):             # <<<<<<<<<<<<<<
 
366
 * 
 
367
 *     cdef H5L_info_t infostruct
 
368
 */
 
369
 
 
370
struct __pyx_obj_4h5py_3h5l_LinkInfo {
 
371
  struct __pyx_obj_4h5py_2h5_SmartStruct __pyx_base;
 
372
  H5L_info_t infostruct;
 
373
};
 
374
 
 
375
/* "/home/tachyon/h5py/h5py/h5p.pxd":23
 
376
 * # --- Base classes ---
 
377
 * 
 
378
 * cdef class PropID(ObjectID):             # <<<<<<<<<<<<<<
 
379
 *     """ Base class for all property lists """
 
380
 *     pass
 
381
 */
 
382
 
 
383
struct __pyx_obj_4h5py_3h5p_PropID {
 
384
  struct __pyx_obj_4h5py_2h5_ObjectID __pyx_base;
 
385
};
 
386
 
 
387
/* "/home/tachyon/h5py/h5py/h5p.pxd":33
 
388
 *     pass
 
389
 * 
 
390
 * cdef class PropInstanceID(PropID):             # <<<<<<<<<<<<<<
 
391
 *     """ Represents an instance of a property list class (i.e. an actual list
 
392
 *         which can be passed on to other API functions).
 
393
 */
 
394
 
 
395
struct __pyx_obj_4h5py_3h5p_PropInstanceID {
 
396
  struct __pyx_obj_4h5py_3h5p_PropID __pyx_base;
 
397
};
 
398
 
 
399
/* "/home/tachyon/h5py/h5py/h5p.pxd":62
 
400
 * # --- Object access ---
 
401
 * 
 
402
 * cdef class PropFAID(PropInstanceID):             # <<<<<<<<<<<<<<
 
403
 *     """ File access property list """
 
404
 *     pass
 
405
 */
 
406
 
 
407
struct __pyx_obj_4h5py_3h5p_PropFAID {
 
408
  struct __pyx_obj_4h5py_3h5p_PropInstanceID __pyx_base;
 
409
};
 
410
 
 
411
/* "/home/tachyon/h5py/h5py/h5p.pxd":39
 
412
 *     pass
 
413
 * 
 
414
 * cdef class PropCreateID(PropInstanceID):             # <<<<<<<<<<<<<<
 
415
 *     """ Base class for all object creation lists.
 
416
 * 
 
417
 */
 
418
 
 
419
struct __pyx_obj_4h5py_3h5p_PropCreateID {
 
420
  struct __pyx_obj_4h5py_3h5p_PropInstanceID __pyx_base;
 
421
};
 
422
 
 
423
/* "/home/tachyon/h5py/h5py/h5p.pxd":83
 
424
 *         cdef char* _buf
 
425
 * 
 
426
 *     cdef class PropGCID(PropCreateID):             # <<<<<<<<<<<<<<
 
427
 *         """ Group creation property list """
 
428
 *         pass
 
429
 */
 
430
 
 
431
struct __pyx_obj_4h5py_3h5p_PropGCID {
 
432
  struct __pyx_obj_4h5py_3h5p_PropCreateID __pyx_base;
 
433
};
 
434
 
 
435
/* "/home/tachyon/h5py/h5py/h5p.pxd":66
 
436
 *     pass
 
437
 * 
 
438
 * cdef class PropDXID(PropInstanceID):             # <<<<<<<<<<<<<<
 
439
 *     """ Dataset transfer property list """
 
440
 *     pass
 
441
 */
 
442
 
 
443
struct __pyx_obj_4h5py_3h5p_PropDXID {
 
444
  struct __pyx_obj_4h5py_3h5p_PropInstanceID __pyx_base;
 
445
};
 
446
 
 
447
/* "/home/tachyon/h5py/h5py/h5p.pxd":51
 
448
 * # --- Object creation ---
 
449
 * 
 
450
 * cdef class PropDCID(PropCreateID):             # <<<<<<<<<<<<<<
 
451
 *     """ Dataset creation property list """
 
452
 *     pass
 
453
 */
 
454
 
 
455
struct __pyx_obj_4h5py_3h5p_PropDCID {
 
456
  struct __pyx_obj_4h5py_3h5p_PropCreateID __pyx_base;
 
457
};
 
458
 
 
459
/* "/home/tachyon/h5py/h5py/h5p.pxd":79
 
460
 *         pass
 
461
 * 
 
462
 *     cdef class PropLAID(PropInstanceID):             # <<<<<<<<<<<<<<
 
463
 *         """ Link access property list """
 
464
 *         cdef char* _buf
 
465
 */
 
466
 
 
467
struct __pyx_obj_4h5py_3h5p_PropLAID {
 
468
  struct __pyx_obj_4h5py_3h5p_PropInstanceID __pyx_base;
 
469
  char *_buf;
 
470
};
 
471
 
 
472
/* "/home/tachyon/h5py/h5py/h5p.pxd":55
 
473
 *     pass
 
474
 * 
 
475
 * cdef class PropFCID(PropCreateID):             # <<<<<<<<<<<<<<
 
476
 *     """ File creation property list """
 
477
 *     pass
 
478
 */
 
479
 
 
480
struct __pyx_obj_4h5py_3h5p_PropFCID {
 
481
  struct __pyx_obj_4h5py_3h5p_PropCreateID __pyx_base;
 
482
};
 
483
 
 
484
/* "/home/tachyon/h5py/h5py/h5.pxd":15
 
485
 * include "defs.pxd"
 
486
 * 
 
487
 * cdef class H5PYConfig:             # <<<<<<<<<<<<<<
 
488
 * 
 
489
 *     cdef object _r_name
 
490
 */
 
491
 
 
492
struct __pyx_obj_4h5py_2h5_H5PYConfig {
 
493
  PyObject_HEAD
 
494
  PyObject *_r_name;
 
495
  PyObject *_i_name;
 
496
  PyObject *_f_name;
 
497
  PyObject *_t_name;
 
498
  PyObject *API_16;
 
499
  PyObject *API_18;
 
500
  PyObject *DEBUG;
 
501
  PyObject *THREADS;
 
502
};
 
503
 
 
504
/* "/home/tachyon/h5py/h5py/h5p.pxd":27
 
505
 *     pass
 
506
 * 
 
507
 * cdef class PropClassID(PropID):             # <<<<<<<<<<<<<<
 
508
 *     """ Represents an HDF5 property list class.  These can be either (locked)
 
509
 *         library-defined classes or user-created classes.
 
510
 */
 
511
 
 
512
struct __pyx_obj_4h5py_3h5p_PropClassID {
 
513
  struct __pyx_obj_4h5py_3h5p_PropID __pyx_base;
 
514
};
 
515
 
 
516
/* "/home/tachyon/h5py/h5py/h5p.pxd":46
 
517
 *     pass
 
518
 * 
 
519
 * cdef class PropCopyID(PropInstanceID):             # <<<<<<<<<<<<<<
 
520
 *     """ Property list for copying objects (as in h5o.copy) """
 
521
 * 
 
522
 */
 
523
 
 
524
struct __pyx_obj_4h5py_3h5p_PropCopyID {
 
525
  struct __pyx_obj_4h5py_3h5p_PropInstanceID __pyx_base;
 
526
};
 
527
 
 
528
/* "/home/tachyon/h5py/h5py/h5.pxd":28
 
529
 * cpdef H5PYConfig get_config()
 
530
 * 
 
531
 * cdef class IDProxy:             # <<<<<<<<<<<<<<
 
532
 * 
 
533
 *     cdef object __weakref__
 
534
 */
 
535
 
 
536
struct __pyx_obj_4h5py_2h5_IDProxy {
 
537
  PyObject_HEAD
 
538
  PyObject *__weakref__;
 
539
  hid_t id;
 
540
  int locked;
 
541
};
 
542
 
 
543
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":61
 
544
 *                 return self.infostruct.u.val_size
 
545
 * 
 
546
 * cdef class _LinkVisitor:             # <<<<<<<<<<<<<<
 
547
 * 
 
548
 *     """ Helper class for iteration callback """
 
549
 */
 
550
 
 
551
struct __pyx_obj_4h5py_3h5l__LinkVisitor {
 
552
  PyObject_HEAD
 
553
  PyObject *func;
 
554
  PyObject *retval;
 
555
  struct __pyx_obj_4h5py_3h5l_LinkInfo *info;
 
556
};
 
557
 
 
558
/* "/home/tachyon/h5py/h5py/h5p.pxd":75
 
559
 * IF H5PY_18API:
 
560
 * 
 
561
 *     cdef class PropLCID(PropCreateID):             # <<<<<<<<<<<<<<
 
562
 *         """ Link creation property list """
 
563
 *         pass
 
564
 */
 
565
 
 
566
struct __pyx_obj_4h5py_3h5p_PropLCID {
 
567
  struct __pyx_obj_4h5py_3h5p_PropCreateID __pyx_base;
 
568
};
 
569
 
 
570
/* "/home/tachyon/h5py/h5py/h5l.pxd":17
 
571
 * IF H5PY_18API:
 
572
 * 
 
573
 *     cdef class LinkProxy:             # <<<<<<<<<<<<<<
 
574
 * 
 
575
 *         cdef hid_t id
 
576
 */
 
577
 
 
578
struct __pyx_obj_4h5py_3h5l_LinkProxy {
 
579
  PyObject_HEAD
 
580
  hid_t id;
 
581
};
 
582
 
277
583
#ifndef CYTHON_REFNANNY
278
584
  #define CYTHON_REFNANNY 0
279
585
#endif
320
626
#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
321
627
#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)
322
628
 
323
 
static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
324
 
 
325
 
static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
326
 
 
327
 
static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
328
 
 
329
 
static INLINE char __Pyx_PyInt_AsChar(PyObject *);
330
 
 
331
 
static INLINE short __Pyx_PyInt_AsShort(PyObject *);
332
 
 
333
 
static INLINE int __Pyx_PyInt_AsInt(PyObject *);
334
 
 
335
 
static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
336
 
 
337
 
static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
338
 
 
339
 
static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
340
 
 
341
 
static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
342
 
 
343
 
static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
344
 
 
345
 
static INLINE long __Pyx_PyInt_AsLong(PyObject *);
346
 
 
347
 
static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
348
 
 
349
 
static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
350
 
 
351
 
static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
 
629
static void __Pyx_RaiseDoubleKeywordsError(
 
630
    const char* func_name, PyObject* kw_name); /*proto*/
 
631
 
 
632
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
 
633
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
 
634
 
 
635
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/
 
636
 
 
637
static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
 
638
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 
639
 
 
640
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
 
641
    const char *name, int exact); /*proto*/
 
642
 
 
643
static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_int64_t(int64_t);
 
644
 
 
645
static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_haddr_t(haddr_t);
 
646
 
 
647
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
 
648
 
 
649
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
 
650
 
 
651
static CYTHON_INLINE hid_t __Pyx_PyInt_from_py_hid_t(PyObject *);
 
652
 
 
653
static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
 
654
 
 
655
static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
 
656
 
 
657
static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
 
658
 
 
659
static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
 
660
 
 
661
static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
 
662
 
 
663
static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
 
664
 
 
665
static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
 
666
 
 
667
static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
 
668
 
 
669
static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
 
670
 
 
671
static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
 
672
 
 
673
static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
 
674
 
 
675
static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
 
676
 
 
677
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
 
678
 
 
679
static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
 
680
 
 
681
static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
 
682
 
 
683
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict);  /*proto*/
 
684
 
 
685
static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
 
686
 
 
687
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/
352
688
 
353
689
static void __Pyx_AddTraceback(const char *funcname); /*proto*/
354
690
 
355
691
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
 
692
/* Module declarations from h5py.h5 */
 
693
 
 
694
static PyTypeObject *__pyx_ptype_4h5py_2h5_H5PYConfig = 0;
 
695
static PyTypeObject *__pyx_ptype_4h5py_2h5_IDProxy = 0;
 
696
static PyTypeObject *__pyx_ptype_4h5py_2h5_ObjectID = 0;
 
697
static PyTypeObject *__pyx_ptype_4h5py_2h5_SmartStruct = 0;
 
698
static struct __pyx_obj_4h5py_2h5_H5PYConfig *(*__pyx_f_4h5py_2h5_get_config)(int __pyx_skip_dispatch); /*proto*/
 
699
static int (*__pyx_f_4h5py_2h5_init_hdf5)(void); /*proto*/
 
700
/* Module declarations from h5py.h5p */
 
701
 
 
702
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropID = 0;
 
703
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropClassID = 0;
 
704
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropInstanceID = 0;
 
705
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropCreateID = 0;
 
706
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropCopyID = 0;
 
707
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropDCID = 0;
 
708
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropFCID = 0;
 
709
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropFAID = 0;
 
710
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropDXID = 0;
 
711
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropLCID = 0;
 
712
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropLAID = 0;
 
713
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropGCID = 0;
 
714
static hid_t (*__pyx_f_4h5py_3h5p_pdefault)(struct __pyx_obj_4h5py_3h5p_PropID *); /*proto*/
 
715
static PyObject *(*__pyx_f_4h5py_3h5p_propwrap)(hid_t); /*proto*/
 
716
/* Module declarations from h5py.h5g */
 
717
 
 
718
static PyTypeObject *__pyx_ptype_4h5py_3h5g_GroupID = 0;
 
719
/* Module declarations from numpy */
 
720
 
 
721
/* Module declarations from h5py.numpy */
 
722
 
 
723
static PyTypeObject *__pyx_ptype_4h5py_5numpy_dtype = 0;
 
724
static PyTypeObject *__pyx_ptype_4h5py_5numpy_ndarray = 0;
 
725
/* Module declarations from h5py.utils */
 
726
 
 
727
static void *(*__pyx_f_4h5py_5utils_emalloc)(size_t); /*proto*/
 
728
static void (*__pyx_f_4h5py_5utils_efree)(void *); /*proto*/
 
729
static int (*__pyx_f_4h5py_5utils_check_numpy_read)(PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_4h5py_5utils_check_numpy_read *__pyx_optional_args); /*proto*/
 
730
static int (*__pyx_f_4h5py_5utils_check_numpy_write)(PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_4h5py_5utils_check_numpy_write *__pyx_optional_args); /*proto*/
 
731
static int (*__pyx_f_4h5py_5utils_convert_tuple)(PyObject *, hsize_t *, hsize_t); /*proto*/
 
732
static PyObject *(*__pyx_f_4h5py_5utils_convert_dims)(hsize_t *, hsize_t); /*proto*/
 
733
static int (*__pyx_f_4h5py_5utils_require_tuple)(PyObject *, int, int, char *); /*proto*/
 
734
static PyObject *(*__pyx_f_4h5py_5utils_create_numpy_hsize)(int, hsize_t *); /*proto*/
 
735
static PyObject *(*__pyx_f_4h5py_5utils_create_hsize_array)(PyObject *); /*proto*/
356
736
/* Module declarations from h5py.h5l */
357
737
 
 
738
static PyTypeObject *__pyx_ptype_4h5py_3h5l_LinkProxy = 0;
 
739
static PyTypeObject *__pyx_ptype_4h5py_3h5l_LinkInfo = 0;
 
740
static PyTypeObject *__pyx_ptype_4h5py_3h5l__LinkVisitor = 0;
 
741
static herr_t __pyx_f_4h5py_3h5l_cb_link_iterate(hid_t, char *, H5L_info_t *, void *); /*proto*/
 
742
static herr_t __pyx_f_4h5py_3h5l_cb_link_simple(hid_t, char *, H5L_info_t *, void *); /*proto*/
358
743
#define __Pyx_MODULE_NAME "h5py.h5l"
359
744
int __pyx_module_is_main_h5py__h5l = 0;
360
745
 
361
746
/* Implementation of h5py.h5l */
 
747
static PyObject *__pyx_builtin_NotImplemented;
 
748
static PyObject *__pyx_builtin_TypeError;
 
749
static char __pyx_k_1[] = "Link proxies are unhashable; use the parent group instead.";
 
750
static char __pyx_k_2[] = "Link must be either a soft or external link";
 
751
static char __pyx_k_5[] = ".";
 
752
static char __pyx_k_6[] = " Integer type code for link (h5l.TYPE_*) ";
 
753
static char __pyx_k_7[] = " Indicates if the creation order is valid ";
 
754
static char __pyx_k_8[] = " Creation order ";
 
755
static char __pyx_k_9[] = " Integer type code for character set (h5t.CSET_*) ";
 
756
static char __pyx_k_10[] = " Either the address of a hard link or the size of a soft/UD link ";
 
757
static char __pyx_k__u[] = "u";
 
758
static char __pyx_k__id[] = "id";
 
759
static char __pyx_k__id_[] = "id_";
 
760
static char __pyx_k__cset[] = "cset";
 
761
static char __pyx_k__func[] = "func";
 
762
static char __pyx_k__info[] = "info";
 
763
static char __pyx_k__lapl[] = "lapl";
 
764
static char __pyx_k__lcpl[] = "lcpl";
 
765
static char __pyx_k__name[] = "name";
 
766
static char __pyx_k__type[] = "type";
 
767
static char __pyx_k__index[] = "index";
 
768
static char __pyx_k__order[] = "order";
 
769
static char __pyx_k__corder[] = "corder";
 
770
static char __pyx_k__retval[] = "retval";
 
771
static char __pyx_k__target[] = "target";
 
772
static char __pyx_k__address[] = "address";
 
773
static char __pyx_k__cur_loc[] = "cur_loc";
362
774
static char __pyx_k____main__[] = "__main__";
 
775
static char __pyx_k__cur_name[] = "cur_name";
 
776
static char __pyx_k__idx_type[] = "idx_type";
 
777
static char __pyx_k__new_name[] = "new_name";
 
778
static char __pyx_k__obj_name[] = "obj_name";
 
779
static char __pyx_k__val_size[] = "val_size";
 
780
static char __pyx_k__TYPE_HARD[] = "TYPE_HARD";
 
781
static char __pyx_k__TYPE_SOFT[] = "TYPE_SOFT";
 
782
static char __pyx_k__TypeError[] = "TypeError";
 
783
static char __pyx_k__file_name[] = "file_name";
 
784
static char __pyx_k__link_name[] = "link_name";
 
785
static char __pyx_k__infostruct[] = "infostruct";
 
786
static char __pyx_k__corder_valid[] = "corder_valid";
 
787
static char __pyx_k__TYPE_EXTERNAL[] = "TYPE_EXTERNAL";
 
788
static char __pyx_k__NotImplemented[] = "NotImplemented";
 
789
static PyObject *__pyx_kp_s_1;
 
790
static PyObject *__pyx_kp_s_2;
 
791
static PyObject *__pyx_n_s__NotImplemented;
 
792
static PyObject *__pyx_n_s__TYPE_EXTERNAL;
 
793
static PyObject *__pyx_n_s__TYPE_HARD;
 
794
static PyObject *__pyx_n_s__TYPE_SOFT;
 
795
static PyObject *__pyx_n_s__TypeError;
363
796
static PyObject *__pyx_n_s____main__;
 
797
static PyObject *__pyx_n_s__address;
 
798
static PyObject *__pyx_n_s__corder;
 
799
static PyObject *__pyx_n_s__corder_valid;
 
800
static PyObject *__pyx_n_s__cset;
 
801
static PyObject *__pyx_n_s__cur_loc;
 
802
static PyObject *__pyx_n_s__cur_name;
 
803
static PyObject *__pyx_n_s__file_name;
 
804
static PyObject *__pyx_n_s__func;
 
805
static PyObject *__pyx_n_s__id;
 
806
static PyObject *__pyx_n_s__id_;
 
807
static PyObject *__pyx_n_s__idx_type;
 
808
static PyObject *__pyx_n_s__index;
 
809
static PyObject *__pyx_n_s__info;
 
810
static PyObject *__pyx_n_s__infostruct;
 
811
static PyObject *__pyx_n_s__lapl;
 
812
static PyObject *__pyx_n_s__lcpl;
 
813
static PyObject *__pyx_n_s__link_name;
 
814
static PyObject *__pyx_n_s__name;
 
815
static PyObject *__pyx_n_s__new_name;
 
816
static PyObject *__pyx_n_s__obj_name;
 
817
static PyObject *__pyx_n_s__order;
 
818
static PyObject *__pyx_n_s__retval;
 
819
static PyObject *__pyx_n_s__target;
 
820
static PyObject *__pyx_n_s__type;
 
821
static PyObject *__pyx_n_s__u;
 
822
static PyObject *__pyx_n_s__val_size;
 
823
static int __pyx_k_3;
 
824
static int __pyx_k_4;
 
825
 
 
826
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":39
 
827
 *     property type:
 
828
 *         """ Integer type code for link (h5l.TYPE_*) """
 
829
 *         def __get__(self):             # <<<<<<<<<<<<<<
 
830
 *             return <int>self.infostruct.type
 
831
 *     property corder_valid:
 
832
 */
 
833
 
 
834
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_4type___get__(PyObject *__pyx_v_self); /*proto*/
 
835
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_4type___get__(PyObject *__pyx_v_self) {
 
836
  PyObject *__pyx_r = NULL;
 
837
  PyObject *__pyx_t_1 = NULL;
 
838
  __Pyx_RefNannySetupContext("__get__");
 
839
 
 
840
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":40
 
841
 *         """ Integer type code for link (h5l.TYPE_*) """
 
842
 *         def __get__(self):
 
843
 *             return <int>self.infostruct.type             # <<<<<<<<<<<<<<
 
844
 *     property corder_valid:
 
845
 *         """ Indicates if the creation order is valid """
 
846
 */
 
847
  __Pyx_XDECREF(__pyx_r);
 
848
  __pyx_t_1 = PyInt_FromLong(((int)((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_v_self)->infostruct.type)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
849
  __Pyx_GOTREF(__pyx_t_1);
 
850
  __pyx_r = __pyx_t_1;
 
851
  __pyx_t_1 = 0;
 
852
  goto __pyx_L0;
 
853
 
 
854
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
855
  goto __pyx_L0;
 
856
  __pyx_L1_error:;
 
857
  __Pyx_XDECREF(__pyx_t_1);
 
858
  __Pyx_AddTraceback("h5py.h5l.LinkInfo.type.__get__");
 
859
  __pyx_r = NULL;
 
860
  __pyx_L0:;
 
861
  __Pyx_XGIVEREF(__pyx_r);
 
862
  __Pyx_RefNannyFinishContext();
 
863
  return __pyx_r;
 
864
}
 
865
 
 
866
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":43
 
867
 *     property corder_valid:
 
868
 *         """ Indicates if the creation order is valid """
 
869
 *         def __get__(self):             # <<<<<<<<<<<<<<
 
870
 *             return <bint>self.infostruct.corder_valid
 
871
 *     property corder:
 
872
 */
 
873
 
 
874
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_12corder_valid___get__(PyObject *__pyx_v_self); /*proto*/
 
875
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_12corder_valid___get__(PyObject *__pyx_v_self) {
 
876
  PyObject *__pyx_r = NULL;
 
877
  PyObject *__pyx_t_1 = NULL;
 
878
  __Pyx_RefNannySetupContext("__get__");
 
879
 
 
880
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":44
 
881
 *         """ Indicates if the creation order is valid """
 
882
 *         def __get__(self):
 
883
 *             return <bint>self.infostruct.corder_valid             # <<<<<<<<<<<<<<
 
884
 *     property corder:
 
885
 *         """ Creation order """
 
886
 */
 
887
  __Pyx_XDECREF(__pyx_r);
 
888
  __pyx_t_1 = __Pyx_PyBool_FromLong(((int)((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_v_self)->infostruct.corder_valid)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
889
  __Pyx_GOTREF(__pyx_t_1);
 
890
  __pyx_r = __pyx_t_1;
 
891
  __pyx_t_1 = 0;
 
892
  goto __pyx_L0;
 
893
 
 
894
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
895
  goto __pyx_L0;
 
896
  __pyx_L1_error:;
 
897
  __Pyx_XDECREF(__pyx_t_1);
 
898
  __Pyx_AddTraceback("h5py.h5l.LinkInfo.corder_valid.__get__");
 
899
  __pyx_r = NULL;
 
900
  __pyx_L0:;
 
901
  __Pyx_XGIVEREF(__pyx_r);
 
902
  __Pyx_RefNannyFinishContext();
 
903
  return __pyx_r;
 
904
}
 
905
 
 
906
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":47
 
907
 *     property corder:
 
908
 *         """ Creation order """
 
909
 *         def __get__(self):             # <<<<<<<<<<<<<<
 
910
 *             return self.infostruct.corder
 
911
 *     property cset:
 
912
 */
 
913
 
 
914
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_6corder___get__(PyObject *__pyx_v_self); /*proto*/
 
915
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_6corder___get__(PyObject *__pyx_v_self) {
 
916
  PyObject *__pyx_r = NULL;
 
917
  PyObject *__pyx_t_1 = NULL;
 
918
  __Pyx_RefNannySetupContext("__get__");
 
919
 
 
920
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":48
 
921
 *         """ Creation order """
 
922
 *         def __get__(self):
 
923
 *             return self.infostruct.corder             # <<<<<<<<<<<<<<
 
924
 *     property cset:
 
925
 *         """ Integer type code for character set (h5t.CSET_*) """
 
926
 */
 
927
  __Pyx_XDECREF(__pyx_r);
 
928
  __pyx_t_1 = __Pyx_PyInt_to_py_int64_t(((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_v_self)->infostruct.corder); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
929
  __Pyx_GOTREF(__pyx_t_1);
 
930
  __pyx_r = __pyx_t_1;
 
931
  __pyx_t_1 = 0;
 
932
  goto __pyx_L0;
 
933
 
 
934
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
935
  goto __pyx_L0;
 
936
  __pyx_L1_error:;
 
937
  __Pyx_XDECREF(__pyx_t_1);
 
938
  __Pyx_AddTraceback("h5py.h5l.LinkInfo.corder.__get__");
 
939
  __pyx_r = NULL;
 
940
  __pyx_L0:;
 
941
  __Pyx_XGIVEREF(__pyx_r);
 
942
  __Pyx_RefNannyFinishContext();
 
943
  return __pyx_r;
 
944
}
 
945
 
 
946
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":51
 
947
 *     property cset:
 
948
 *         """ Integer type code for character set (h5t.CSET_*) """
 
949
 *         def __get__(self):             # <<<<<<<<<<<<<<
 
950
 *             return self.infostruct.cset
 
951
 *     property u:
 
952
 */
 
953
 
 
954
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_4cset___get__(PyObject *__pyx_v_self); /*proto*/
 
955
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_4cset___get__(PyObject *__pyx_v_self) {
 
956
  PyObject *__pyx_r = NULL;
 
957
  PyObject *__pyx_t_1 = NULL;
 
958
  __Pyx_RefNannySetupContext("__get__");
 
959
 
 
960
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":52
 
961
 *         """ Integer type code for character set (h5t.CSET_*) """
 
962
 *         def __get__(self):
 
963
 *             return self.infostruct.cset             # <<<<<<<<<<<<<<
 
964
 *     property u:
 
965
 *         """ Either the address of a hard link or the size of a soft/UD link """
 
966
 */
 
967
  __Pyx_XDECREF(__pyx_r);
 
968
  __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_v_self)->infostruct.cset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
969
  __Pyx_GOTREF(__pyx_t_1);
 
970
  __pyx_r = __pyx_t_1;
 
971
  __pyx_t_1 = 0;
 
972
  goto __pyx_L0;
 
973
 
 
974
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
975
  goto __pyx_L0;
 
976
  __pyx_L1_error:;
 
977
  __Pyx_XDECREF(__pyx_t_1);
 
978
  __Pyx_AddTraceback("h5py.h5l.LinkInfo.cset.__get__");
 
979
  __pyx_r = NULL;
 
980
  __pyx_L0:;
 
981
  __Pyx_XGIVEREF(__pyx_r);
 
982
  __Pyx_RefNannyFinishContext();
 
983
  return __pyx_r;
 
984
}
 
985
 
 
986
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":55
 
987
 *     property u:
 
988
 *         """ Either the address of a hard link or the size of a soft/UD link """
 
989
 *         def __get__(self):             # <<<<<<<<<<<<<<
 
990
 *             if self.infostruct.type == H5L_TYPE_HARD:
 
991
 *                 return self.infostruct.u.address
 
992
 */
 
993
 
 
994
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_1u___get__(PyObject *__pyx_v_self); /*proto*/
 
995
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_1u___get__(PyObject *__pyx_v_self) {
 
996
  PyObject *__pyx_r = NULL;
 
997
  int __pyx_t_1;
 
998
  PyObject *__pyx_t_2 = NULL;
 
999
  __Pyx_RefNannySetupContext("__get__");
 
1000
  __Pyx_INCREF((PyObject *)__pyx_v_self);
 
1001
 
 
1002
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":56
 
1003
 *         """ Either the address of a hard link or the size of a soft/UD link """
 
1004
 *         def __get__(self):
 
1005
 *             if self.infostruct.type == H5L_TYPE_HARD:             # <<<<<<<<<<<<<<
 
1006
 *                 return self.infostruct.u.address
 
1007
 *             else:
 
1008
 */
 
1009
  __pyx_t_1 = (((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_v_self)->infostruct.type == H5L_TYPE_HARD);
 
1010
  if (__pyx_t_1) {
 
1011
 
 
1012
    /* "/home/tachyon/h5py/h5py/h5l_body.pyx":57
 
1013
 *         def __get__(self):
 
1014
 *             if self.infostruct.type == H5L_TYPE_HARD:
 
1015
 *                 return self.infostruct.u.address             # <<<<<<<<<<<<<<
 
1016
 *             else:
 
1017
 *                 return self.infostruct.u.val_size
 
1018
 */
 
1019
    __Pyx_XDECREF(__pyx_r);
 
1020
    __pyx_t_2 = __Pyx_PyInt_to_py_haddr_t(((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_v_self)->infostruct.u.address); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1021
    __Pyx_GOTREF(__pyx_t_2);
 
1022
    __pyx_r = __pyx_t_2;
 
1023
    __pyx_t_2 = 0;
 
1024
    goto __pyx_L0;
 
1025
    goto __pyx_L5;
 
1026
  }
 
1027
  /*else*/ {
 
1028
 
 
1029
    /* "/home/tachyon/h5py/h5py/h5l_body.pyx":59
 
1030
 *                 return self.infostruct.u.address
 
1031
 *             else:
 
1032
 *                 return self.infostruct.u.val_size             # <<<<<<<<<<<<<<
 
1033
 * 
 
1034
 * cdef class _LinkVisitor:
 
1035
 */
 
1036
    __Pyx_XDECREF(__pyx_r);
 
1037
    __pyx_t_2 = __Pyx_PyInt_FromSize_t(((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_v_self)->infostruct.u.val_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1038
    __Pyx_GOTREF(__pyx_t_2);
 
1039
    __pyx_r = __pyx_t_2;
 
1040
    __pyx_t_2 = 0;
 
1041
    goto __pyx_L0;
 
1042
  }
 
1043
  __pyx_L5:;
 
1044
 
 
1045
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1046
  goto __pyx_L0;
 
1047
  __pyx_L1_error:;
 
1048
  __Pyx_XDECREF(__pyx_t_2);
 
1049
  __Pyx_AddTraceback("h5py.h5l.LinkInfo.u.__get__");
 
1050
  __pyx_r = NULL;
 
1051
  __pyx_L0:;
 
1052
  __Pyx_DECREF((PyObject *)__pyx_v_self);
 
1053
  __Pyx_XGIVEREF(__pyx_r);
 
1054
  __Pyx_RefNannyFinishContext();
 
1055
  return __pyx_r;
 
1056
}
 
1057
 
 
1058
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":69
 
1059
 *     cdef LinkInfo info
 
1060
 * 
 
1061
 *     def __init__(self, func):             # <<<<<<<<<<<<<<
 
1062
 *         self.func = func
 
1063
 *         self.retval = None
 
1064
 */
 
1065
 
 
1066
static int __pyx_pf_4h5py_3h5l_12_LinkVisitor___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
1067
static int __pyx_pf_4h5py_3h5l_12_LinkVisitor___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
1068
  PyObject *__pyx_v_func = 0;
 
1069
  int __pyx_r;
 
1070
  PyObject *__pyx_t_1 = NULL;
 
1071
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__func,0};
 
1072
  __Pyx_RefNannySetupContext("__init__");
 
1073
  if (unlikely(__pyx_kwds)) {
 
1074
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
1075
    PyObject* values[1] = {0};
 
1076
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1077
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
1078
      case  0: break;
 
1079
      default: goto __pyx_L5_argtuple_error;
 
1080
    }
 
1081
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1082
      case  0:
 
1083
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func);
 
1084
      if (likely(values[0])) kw_args--;
 
1085
      else goto __pyx_L5_argtuple_error;
 
1086
    }
 
1087
    if (unlikely(kw_args > 0)) {
 
1088
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1089
    }
 
1090
    __pyx_v_func = values[0];
 
1091
  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
 
1092
    goto __pyx_L5_argtuple_error;
 
1093
  } else {
 
1094
    __pyx_v_func = PyTuple_GET_ITEM(__pyx_args, 0);
 
1095
  }
 
1096
  goto __pyx_L4_argument_unpacking_done;
 
1097
  __pyx_L5_argtuple_error:;
 
1098
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1099
  __pyx_L3_error:;
 
1100
  __Pyx_AddTraceback("h5py.h5l._LinkVisitor.__init__");
 
1101
  return -1;
 
1102
  __pyx_L4_argument_unpacking_done:;
 
1103
 
 
1104
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":70
 
1105
 * 
 
1106
 *     def __init__(self, func):
 
1107
 *         self.func = func             # <<<<<<<<<<<<<<
 
1108
 *         self.retval = None
 
1109
 *         self.info = LinkInfo()
 
1110
 */
 
1111
  __Pyx_INCREF(__pyx_v_func);
 
1112
  __Pyx_GIVEREF(__pyx_v_func);
 
1113
  __Pyx_GOTREF(((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->func);
 
1114
  __Pyx_DECREF(((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->func);
 
1115
  ((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->func = __pyx_v_func;
 
1116
 
 
1117
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":71
 
1118
 *     def __init__(self, func):
 
1119
 *         self.func = func
 
1120
 *         self.retval = None             # <<<<<<<<<<<<<<
 
1121
 *         self.info = LinkInfo()
 
1122
 * 
 
1123
 */
 
1124
  __Pyx_INCREF(Py_None);
 
1125
  __Pyx_GIVEREF(Py_None);
 
1126
  __Pyx_GOTREF(((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->retval);
 
1127
  __Pyx_DECREF(((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->retval);
 
1128
  ((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->retval = Py_None;
 
1129
 
 
1130
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":72
 
1131
 *         self.func = func
 
1132
 *         self.retval = None
 
1133
 *         self.info = LinkInfo()             # <<<<<<<<<<<<<<
 
1134
 * 
 
1135
 * cdef herr_t cb_link_iterate(hid_t grp, char* name, H5L_info_t *istruct, void* data) except 2:
 
1136
 */
 
1137
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4h5py_3h5l_LinkInfo)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1138
  __Pyx_GOTREF(__pyx_t_1);
 
1139
  __Pyx_GIVEREF(__pyx_t_1);
 
1140
  __Pyx_GOTREF(((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->info);
 
1141
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->info));
 
1142
  ((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->info = ((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_t_1);
 
1143
  __pyx_t_1 = 0;
 
1144
 
 
1145
  __pyx_r = 0;
 
1146
  goto __pyx_L0;
 
1147
  __pyx_L1_error:;
 
1148
  __Pyx_XDECREF(__pyx_t_1);
 
1149
  __Pyx_AddTraceback("h5py.h5l._LinkVisitor.__init__");
 
1150
  __pyx_r = -1;
 
1151
  __pyx_L0:;
 
1152
  __Pyx_RefNannyFinishContext();
 
1153
  return __pyx_r;
 
1154
}
 
1155
 
 
1156
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":74
 
1157
 *         self.info = LinkInfo()
 
1158
 * 
 
1159
 * cdef herr_t cb_link_iterate(hid_t grp, char* name, H5L_info_t *istruct, void* data) except 2:             # <<<<<<<<<<<<<<
 
1160
 *     # Standard iteration callback for iterate/visit routines
 
1161
 * 
 
1162
 */
 
1163
 
 
1164
static  herr_t __pyx_f_4h5py_3h5l_cb_link_iterate(hid_t __pyx_v_grp, char *__pyx_v_name, H5L_info_t *__pyx_v_istruct, void *__pyx_v_data) {
 
1165
  struct __pyx_obj_4h5py_3h5l__LinkVisitor *__pyx_v_it = 0;
 
1166
  herr_t __pyx_r;
 
1167
  PyObject *__pyx_t_1 = NULL;
 
1168
  PyObject *__pyx_t_2 = NULL;
 
1169
  int __pyx_t_3;
 
1170
  int __pyx_t_4;
 
1171
  int __pyx_t_5;
 
1172
  __Pyx_RefNannySetupContext("cb_link_iterate");
 
1173
 
 
1174
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":77
 
1175
 *     # Standard iteration callback for iterate/visit routines
 
1176
 * 
 
1177
 *     cdef _LinkVisitor it = <_LinkVisitor?>data             # <<<<<<<<<<<<<<
 
1178
 *     it.info.infostruct = istruct[0]
 
1179
 *     it.retval = it.func(name, it.info)
 
1180
 */
 
1181
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_data)));
 
1182
  __pyx_v_it = ((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_data);
 
1183
 
 
1184
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":78
 
1185
 * 
 
1186
 *     cdef _LinkVisitor it = <_LinkVisitor?>data
 
1187
 *     it.info.infostruct = istruct[0]             # <<<<<<<<<<<<<<
 
1188
 *     it.retval = it.func(name, it.info)
 
1189
 *     if (it.retval is None) or (not it.retval):
 
1190
 */
 
1191
  __pyx_v_it->info->infostruct = (__pyx_v_istruct[0]);
 
1192
 
 
1193
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":79
 
1194
 *     cdef _LinkVisitor it = <_LinkVisitor?>data
 
1195
 *     it.info.infostruct = istruct[0]
 
1196
 *     it.retval = it.func(name, it.info)             # <<<<<<<<<<<<<<
 
1197
 *     if (it.retval is None) or (not it.retval):
 
1198
 *         return 0
 
1199
 */
 
1200
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1201
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
1202
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1203
  __Pyx_GOTREF(__pyx_t_2);
 
1204
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
 
1205
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
 
1206
  __Pyx_INCREF(((PyObject *)__pyx_v_it->info));
 
1207
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_it->info));
 
1208
  __Pyx_GIVEREF(((PyObject *)__pyx_v_it->info));
 
1209
  __pyx_t_1 = 0;
 
1210
  __pyx_t_1 = PyObject_Call(__pyx_v_it->func, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1211
  __Pyx_GOTREF(__pyx_t_1);
 
1212
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
1213
  __Pyx_GIVEREF(__pyx_t_1);
 
1214
  __Pyx_GOTREF(__pyx_v_it->retval);
 
1215
  __Pyx_DECREF(__pyx_v_it->retval);
 
1216
  __pyx_v_it->retval = __pyx_t_1;
 
1217
  __pyx_t_1 = 0;
 
1218
 
 
1219
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":80
 
1220
 *     it.info.infostruct = istruct[0]
 
1221
 *     it.retval = it.func(name, it.info)
 
1222
 *     if (it.retval is None) or (not it.retval):             # <<<<<<<<<<<<<<
 
1223
 *         return 0
 
1224
 *     return 1
 
1225
 */
 
1226
  __pyx_t_3 = (__pyx_v_it->retval == Py_None);
 
1227
  if (!__pyx_t_3) {
 
1228
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_it->retval); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1229
    __pyx_t_5 = (!__pyx_t_4);
 
1230
    __pyx_t_4 = __pyx_t_5;
 
1231
  } else {
 
1232
    __pyx_t_4 = __pyx_t_3;
 
1233
  }
 
1234
  if (__pyx_t_4) {
 
1235
 
 
1236
    /* "/home/tachyon/h5py/h5py/h5l_body.pyx":81
 
1237
 *     it.retval = it.func(name, it.info)
 
1238
 *     if (it.retval is None) or (not it.retval):
 
1239
 *         return 0             # <<<<<<<<<<<<<<
 
1240
 *     return 1
 
1241
 * 
 
1242
 */
 
1243
    __pyx_r = 0;
 
1244
    goto __pyx_L0;
 
1245
    goto __pyx_L3;
 
1246
  }
 
1247
  __pyx_L3:;
 
1248
 
 
1249
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":82
 
1250
 *     if (it.retval is None) or (not it.retval):
 
1251
 *         return 0
 
1252
 *     return 1             # <<<<<<<<<<<<<<
 
1253
 * 
 
1254
 * cdef herr_t cb_link_simple(hid_t grp, char* name, H5L_info_t *istruct, void* data) except 2:
 
1255
 */
 
1256
  __pyx_r = 1;
 
1257
  goto __pyx_L0;
 
1258
 
 
1259
  __pyx_r = 0;
 
1260
  goto __pyx_L0;
 
1261
  __pyx_L1_error:;
 
1262
  __Pyx_XDECREF(__pyx_t_1);
 
1263
  __Pyx_XDECREF(__pyx_t_2);
 
1264
  __Pyx_AddTraceback("h5py.h5l.cb_link_iterate");
 
1265
  __pyx_r = 2;
 
1266
  __pyx_L0:;
 
1267
  __Pyx_XDECREF((PyObject *)__pyx_v_it);
 
1268
  __Pyx_RefNannyFinishContext();
 
1269
  return __pyx_r;
 
1270
}
 
1271
 
 
1272
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":84
 
1273
 *     return 1
 
1274
 * 
 
1275
 * cdef herr_t cb_link_simple(hid_t grp, char* name, H5L_info_t *istruct, void* data) except 2:             # <<<<<<<<<<<<<<
 
1276
 *     # Simplified iteration callback which only provides the name
 
1277
 * 
 
1278
 */
 
1279
 
 
1280
static  herr_t __pyx_f_4h5py_3h5l_cb_link_simple(hid_t __pyx_v_grp, char *__pyx_v_name, H5L_info_t *__pyx_v_istruct, void *__pyx_v_data) {
 
1281
  struct __pyx_obj_4h5py_3h5l__LinkVisitor *__pyx_v_it = 0;
 
1282
  herr_t __pyx_r;
 
1283
  PyObject *__pyx_t_1 = NULL;
 
1284
  PyObject *__pyx_t_2 = NULL;
 
1285
  int __pyx_t_3;
 
1286
  int __pyx_t_4;
 
1287
  int __pyx_t_5;
 
1288
  __Pyx_RefNannySetupContext("cb_link_simple");
 
1289
 
 
1290
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":87
 
1291
 *     # Simplified iteration callback which only provides the name
 
1292
 * 
 
1293
 *     cdef _LinkVisitor it = <_LinkVisitor?>data             # <<<<<<<<<<<<<<
 
1294
 *     it.retval = it.func(name)
 
1295
 *     if (it.retval is None) or (not it.retval):
 
1296
 */
 
1297
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_data)));
 
1298
  __pyx_v_it = ((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_data);
 
1299
 
 
1300
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":88
 
1301
 * 
 
1302
 *     cdef _LinkVisitor it = <_LinkVisitor?>data
 
1303
 *     it.retval = it.func(name)             # <<<<<<<<<<<<<<
 
1304
 *     if (it.retval is None) or (not it.retval):
 
1305
 *         return 0
 
1306
 */
 
1307
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1308
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
1309
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1310
  __Pyx_GOTREF(__pyx_t_2);
 
1311
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
 
1312
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
 
1313
  __pyx_t_1 = 0;
 
1314
  __pyx_t_1 = PyObject_Call(__pyx_v_it->func, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1315
  __Pyx_GOTREF(__pyx_t_1);
 
1316
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
1317
  __Pyx_GIVEREF(__pyx_t_1);
 
1318
  __Pyx_GOTREF(__pyx_v_it->retval);
 
1319
  __Pyx_DECREF(__pyx_v_it->retval);
 
1320
  __pyx_v_it->retval = __pyx_t_1;
 
1321
  __pyx_t_1 = 0;
 
1322
 
 
1323
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":89
 
1324
 *     cdef _LinkVisitor it = <_LinkVisitor?>data
 
1325
 *     it.retval = it.func(name)
 
1326
 *     if (it.retval is None) or (not it.retval):             # <<<<<<<<<<<<<<
 
1327
 *         return 0
 
1328
 *     return 1
 
1329
 */
 
1330
  __pyx_t_3 = (__pyx_v_it->retval == Py_None);
 
1331
  if (!__pyx_t_3) {
 
1332
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_it->retval); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1333
    __pyx_t_5 = (!__pyx_t_4);
 
1334
    __pyx_t_4 = __pyx_t_5;
 
1335
  } else {
 
1336
    __pyx_t_4 = __pyx_t_3;
 
1337
  }
 
1338
  if (__pyx_t_4) {
 
1339
 
 
1340
    /* "/home/tachyon/h5py/h5py/h5l_body.pyx":90
 
1341
 *     it.retval = it.func(name)
 
1342
 *     if (it.retval is None) or (not it.retval):
 
1343
 *         return 0             # <<<<<<<<<<<<<<
 
1344
 *     return 1
 
1345
 * 
 
1346
 */
 
1347
    __pyx_r = 0;
 
1348
    goto __pyx_L0;
 
1349
    goto __pyx_L3;
 
1350
  }
 
1351
  __pyx_L3:;
 
1352
 
 
1353
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":91
 
1354
 *     if (it.retval is None) or (not it.retval):
 
1355
 *         return 0
 
1356
 *     return 1             # <<<<<<<<<<<<<<
 
1357
 * 
 
1358
 * 
 
1359
 */
 
1360
  __pyx_r = 1;
 
1361
  goto __pyx_L0;
 
1362
 
 
1363
  __pyx_r = 0;
 
1364
  goto __pyx_L0;
 
1365
  __pyx_L1_error:;
 
1366
  __Pyx_XDECREF(__pyx_t_1);
 
1367
  __Pyx_XDECREF(__pyx_t_2);
 
1368
  __Pyx_AddTraceback("h5py.h5l.cb_link_simple");
 
1369
  __pyx_r = 2;
 
1370
  __pyx_L0:;
 
1371
  __Pyx_XDECREF((PyObject *)__pyx_v_it);
 
1372
  __Pyx_RefNannyFinishContext();
 
1373
  return __pyx_r;
 
1374
}
 
1375
 
 
1376
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":113
 
1377
 *     """
 
1378
 * 
 
1379
 *     def __init__(self, hid_t id_):             # <<<<<<<<<<<<<<
 
1380
 * 
 
1381
 *         # The identifier in question is the hid_t for the parent GroupID.
 
1382
 */
 
1383
 
 
1384
static int __pyx_pf_4h5py_3h5l_9LinkProxy___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
1385
static int __pyx_pf_4h5py_3h5l_9LinkProxy___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
1386
  hid_t __pyx_v_id_;
 
1387
  int __pyx_r;
 
1388
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__id_,0};
 
1389
  __Pyx_RefNannySetupContext("__init__");
 
1390
  if (unlikely(__pyx_kwds)) {
 
1391
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
1392
    PyObject* values[1] = {0};
 
1393
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1394
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
1395
      case  0: break;
 
1396
      default: goto __pyx_L5_argtuple_error;
 
1397
    }
 
1398
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1399
      case  0:
 
1400
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__id_);
 
1401
      if (likely(values[0])) kw_args--;
 
1402
      else goto __pyx_L5_argtuple_error;
 
1403
    }
 
1404
    if (unlikely(kw_args > 0)) {
 
1405
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1406
    }
 
1407
    __pyx_v_id_ = __Pyx_PyInt_from_py_hid_t(values[0]); if (unlikely((__pyx_v_id_ == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1408
  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
 
1409
    goto __pyx_L5_argtuple_error;
 
1410
  } else {
 
1411
    __pyx_v_id_ = __Pyx_PyInt_from_py_hid_t(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_id_ == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1412
  }
 
1413
  goto __pyx_L4_argument_unpacking_done;
 
1414
  __pyx_L5_argtuple_error:;
 
1415
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1416
  __pyx_L3_error:;
 
1417
  __Pyx_AddTraceback("h5py.h5l.LinkProxy.__init__");
 
1418
  return -1;
 
1419
  __pyx_L4_argument_unpacking_done:;
 
1420
 
 
1421
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":117
 
1422
 *         # The identifier in question is the hid_t for the parent GroupID.
 
1423
 *         # We "borrow" this reference.
 
1424
 *         self.id = id_             # <<<<<<<<<<<<<<
 
1425
 * 
 
1426
 *     def __richcmp__(self, object other, int how):
 
1427
 */
 
1428
  ((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id = __pyx_v_id_;
 
1429
 
 
1430
  __pyx_r = 0;
 
1431
  __Pyx_RefNannyFinishContext();
 
1432
  return __pyx_r;
 
1433
}
 
1434
 
 
1435
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":119
 
1436
 *         self.id = id_
 
1437
 * 
 
1438
 *     def __richcmp__(self, object other, int how):             # <<<<<<<<<<<<<<
 
1439
 *         return NotImplemented
 
1440
 * 
 
1441
 */
 
1442
 
 
1443
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_how); /*proto*/
 
1444
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_how) {
 
1445
  PyObject *__pyx_r = NULL;
 
1446
  __Pyx_RefNannySetupContext("__richcmp__");
 
1447
 
 
1448
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":120
 
1449
 * 
 
1450
 *     def __richcmp__(self, object other, int how):
 
1451
 *         return NotImplemented             # <<<<<<<<<<<<<<
 
1452
 * 
 
1453
 *     def __hash__(self):
 
1454
 */
 
1455
  __Pyx_XDECREF(__pyx_r);
 
1456
  __Pyx_INCREF(__pyx_builtin_NotImplemented);
 
1457
  __pyx_r = __pyx_builtin_NotImplemented;
 
1458
  goto __pyx_L0;
 
1459
 
 
1460
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1461
  __pyx_L0:;
 
1462
  __Pyx_XGIVEREF(__pyx_r);
 
1463
  __Pyx_RefNannyFinishContext();
 
1464
  return __pyx_r;
 
1465
}
 
1466
 
 
1467
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":122
 
1468
 *         return NotImplemented
 
1469
 * 
 
1470
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 
1471
 *         raise TypeError("Link proxies are unhashable; use the parent group instead.")
 
1472
 * 
 
1473
 */
 
1474
 
 
1475
static long __pyx_pf_4h5py_3h5l_9LinkProxy___hash__(PyObject *__pyx_v_self); /*proto*/
 
1476
static long __pyx_pf_4h5py_3h5l_9LinkProxy___hash__(PyObject *__pyx_v_self) {
 
1477
  long __pyx_r;
 
1478
  PyObject *__pyx_t_1 = NULL;
 
1479
  PyObject *__pyx_t_2 = NULL;
 
1480
  __Pyx_RefNannySetupContext("__hash__");
 
1481
 
 
1482
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":123
 
1483
 * 
 
1484
 *     def __hash__(self):
 
1485
 *         raise TypeError("Link proxies are unhashable; use the parent group instead.")             # <<<<<<<<<<<<<<
 
1486
 * 
 
1487
 * 
 
1488
 */
 
1489
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1490
  __Pyx_GOTREF(__pyx_t_1);
 
1491
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
 
1492
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_1));
 
1493
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
 
1494
  __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1495
  __Pyx_GOTREF(__pyx_t_2);
 
1496
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
1497
  __Pyx_Raise(__pyx_t_2, 0, 0);
 
1498
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
1499
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1500
 
 
1501
  __pyx_r = 0;
 
1502
  goto __pyx_L0;
 
1503
  __pyx_L1_error:;
 
1504
  __Pyx_XDECREF(__pyx_t_1);
 
1505
  __Pyx_XDECREF(__pyx_t_2);
 
1506
  __Pyx_AddTraceback("h5py.h5l.LinkProxy.__hash__");
 
1507
  __pyx_r = -1;
 
1508
  __pyx_L0:;
 
1509
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
 
1510
  __Pyx_RefNannyFinishContext();
 
1511
  return __pyx_r;
 
1512
}
 
1513
 
 
1514
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":126
 
1515
 * 
 
1516
 * 
 
1517
 *     def create_hard(self, char* new_name, GroupID cur_loc not None,             # <<<<<<<<<<<<<<
 
1518
 *         char* cur_name, PropID lcpl=None, PropID lapl=None):
 
1519
 *         """ (STRING new_name, GroupID cur_loc, STRING cur_name,
 
1520
 */
 
1521
 
 
1522
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_create_hard(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
1523
static char __pyx_doc_4h5py_3h5l_9LinkProxy_create_hard[] = " (STRING new_name, GroupID cur_loc, STRING cur_name,\n        PropID lcpl=None, PropID lapl=None)\n\n        Create a new hard link in this group pointing to an existing link\n        in another group.\n        ";
 
1524
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_create_hard(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
1525
  char *__pyx_v_new_name;
 
1526
  struct __pyx_obj_4h5py_3h5g_GroupID *__pyx_v_cur_loc = 0;
 
1527
  char *__pyx_v_cur_name;
 
1528
  struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lcpl = 0;
 
1529
  struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lapl = 0;
 
1530
  PyObject *__pyx_r = NULL;
 
1531
  PyObject *__pyx_t_1 = NULL;
 
1532
  hid_t __pyx_t_2;
 
1533
  herr_t __pyx_t_3;
 
1534
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__new_name,&__pyx_n_s__cur_loc,&__pyx_n_s__cur_name,&__pyx_n_s__lcpl,&__pyx_n_s__lapl,0};
 
1535
  __Pyx_RefNannySetupContext("create_hard");
 
1536
  if (unlikely(__pyx_kwds)) {
 
1537
 
 
1538
    /* "/home/tachyon/h5py/h5py/h5l_body.pyx":127
 
1539
 * 
 
1540
 *     def create_hard(self, char* new_name, GroupID cur_loc not None,
 
1541
 *         char* cur_name, PropID lcpl=None, PropID lapl=None):             # <<<<<<<<<<<<<<
 
1542
 *         """ (STRING new_name, GroupID cur_loc, STRING cur_name,
 
1543
 *         PropID lcpl=None, PropID lapl=None)
 
1544
 */
 
1545
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
1546
    PyObject* values[5] = {0,0,0,0,0};
 
1547
    values[3] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
1548
    values[4] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
1549
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1550
      case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
 
1551
      case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
 
1552
      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
1553
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
1554
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
1555
      case  0: break;
 
1556
      default: goto __pyx_L5_argtuple_error;
 
1557
    }
 
1558
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1559
      case  0:
 
1560
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new_name);
 
1561
      if (likely(values[0])) kw_args--;
 
1562
      else goto __pyx_L5_argtuple_error;
 
1563
      case  1:
 
1564
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cur_loc);
 
1565
      if (likely(values[1])) kw_args--;
 
1566
      else {
 
1567
        __Pyx_RaiseArgtupleInvalid("create_hard", 0, 3, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1568
      }
 
1569
      case  2:
 
1570
      values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cur_name);
 
1571
      if (likely(values[2])) kw_args--;
 
1572
      else {
 
1573
        __Pyx_RaiseArgtupleInvalid("create_hard", 0, 3, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1574
      }
 
1575
      case  3:
 
1576
      if (kw_args > 1) {
 
1577
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lcpl);
 
1578
        if (unlikely(value)) { values[3] = value; kw_args--; }
 
1579
      }
 
1580
      case  4:
 
1581
      if (kw_args > 1) {
 
1582
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lapl);
 
1583
        if (unlikely(value)) { values[4] = value; kw_args--; }
 
1584
      }
 
1585
    }
 
1586
    if (unlikely(kw_args > 0)) {
 
1587
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "create_hard") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1588
    }
 
1589
    __pyx_v_new_name = __Pyx_PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_new_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1590
    __pyx_v_cur_loc = ((struct __pyx_obj_4h5py_3h5g_GroupID *)values[1]);
 
1591
    __pyx_v_cur_name = __Pyx_PyBytes_AsString(values[2]); if (unlikely((!__pyx_v_cur_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1592
    __pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[3]);
 
1593
    __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[4]);
 
1594
  } else {
 
1595
    __pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
1596
    __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
1597
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1598
      case  5:
 
1599
      __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)PyTuple_GET_ITEM(__pyx_args, 4));
 
1600
      case  4:
 
1601
      __pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)PyTuple_GET_ITEM(__pyx_args, 3));
 
1602
      case  3:
 
1603
      __pyx_v_cur_name = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((!__pyx_v_cur_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1604
      __pyx_v_cur_loc = ((struct __pyx_obj_4h5py_3h5g_GroupID *)PyTuple_GET_ITEM(__pyx_args, 1));
 
1605
      __pyx_v_new_name = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((!__pyx_v_new_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1606
      break;
 
1607
      default: goto __pyx_L5_argtuple_error;
 
1608
    }
 
1609
  }
 
1610
  goto __pyx_L4_argument_unpacking_done;
 
1611
  __pyx_L5_argtuple_error:;
 
1612
  __Pyx_RaiseArgtupleInvalid("create_hard", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1613
  __pyx_L3_error:;
 
1614
  __Pyx_AddTraceback("h5py.h5l.LinkProxy.create_hard");
 
1615
  return NULL;
 
1616
  __pyx_L4_argument_unpacking_done:;
 
1617
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cur_loc), __pyx_ptype_4h5py_3h5g_GroupID, 0, "cur_loc", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1618
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lcpl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lcpl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1619
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lapl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lapl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1620
 
 
1621
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":134
 
1622
 *         in another group.
 
1623
 *         """
 
1624
 *         H5Lcreate_hard(cur_loc.id, cur_name, self.id, new_name,             # <<<<<<<<<<<<<<
 
1625
 *             pdefault(lcpl), pdefault(lapl))
 
1626
 * 
 
1627
 */
 
1628
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_cur_loc), __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1629
  __Pyx_GOTREF(__pyx_t_1);
 
1630
  __pyx_t_2 = __Pyx_PyInt_from_py_hid_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1631
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
1632
 
 
1633
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":135
 
1634
 *         """
 
1635
 *         H5Lcreate_hard(cur_loc.id, cur_name, self.id, new_name,
 
1636
 *             pdefault(lcpl), pdefault(lapl))             # <<<<<<<<<<<<<<
 
1637
 * 
 
1638
 * 
 
1639
 */
 
1640
  __pyx_t_3 = H5Lcreate_hard(__pyx_t_2, __pyx_v_cur_name, ((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id, __pyx_v_new_name, __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lcpl), __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lapl)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1641
 
 
1642
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1643
  goto __pyx_L0;
 
1644
  __pyx_L1_error:;
 
1645
  __Pyx_XDECREF(__pyx_t_1);
 
1646
  __Pyx_AddTraceback("h5py.h5l.LinkProxy.create_hard");
 
1647
  __pyx_r = NULL;
 
1648
  __pyx_L0:;
 
1649
  __Pyx_XGIVEREF(__pyx_r);
 
1650
  __Pyx_RefNannyFinishContext();
 
1651
  return __pyx_r;
 
1652
}
 
1653
 
 
1654
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":138
 
1655
 * 
 
1656
 * 
 
1657
 *     def create_soft(self, char* new_name, char* target,             # <<<<<<<<<<<<<<
 
1658
 *         PropID lcpl=None, PropID lapl=None):
 
1659
 *         """(STRING new_name, STRING target, PropID lcpl=None, PropID lapl=None)
 
1660
 */
 
1661
 
 
1662
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_create_soft(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
1663
static char __pyx_doc_4h5py_3h5l_9LinkProxy_create_soft[] = "(STRING new_name, STRING target, PropID lcpl=None, PropID lapl=None)\n\n        Create a new soft link in this group, with the given string value.\n        The link target does not need to exist.\n        ";
 
1664
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_create_soft(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
1665
  char *__pyx_v_new_name;
 
1666
  char *__pyx_v_target;
 
1667
  struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lcpl = 0;
 
1668
  struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lapl = 0;
 
1669
  PyObject *__pyx_r = NULL;
 
1670
  herr_t __pyx_t_1;
 
1671
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__new_name,&__pyx_n_s__target,&__pyx_n_s__lcpl,&__pyx_n_s__lapl,0};
 
1672
  __Pyx_RefNannySetupContext("create_soft");
 
1673
  if (unlikely(__pyx_kwds)) {
 
1674
 
 
1675
    /* "/home/tachyon/h5py/h5py/h5l_body.pyx":139
 
1676
 * 
 
1677
 *     def create_soft(self, char* new_name, char* target,
 
1678
 *         PropID lcpl=None, PropID lapl=None):             # <<<<<<<<<<<<<<
 
1679
 *         """(STRING new_name, STRING target, PropID lcpl=None, PropID lapl=None)
 
1680
 * 
 
1681
 */
 
1682
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
1683
    PyObject* values[4] = {0,0,0,0};
 
1684
    values[2] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
1685
    values[3] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
1686
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1687
      case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
 
1688
      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
1689
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
1690
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
1691
      case  0: break;
 
1692
      default: goto __pyx_L5_argtuple_error;
 
1693
    }
 
1694
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1695
      case  0:
 
1696
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new_name);
 
1697
      if (likely(values[0])) kw_args--;
 
1698
      else goto __pyx_L5_argtuple_error;
 
1699
      case  1:
 
1700
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__target);
 
1701
      if (likely(values[1])) kw_args--;
 
1702
      else {
 
1703
        __Pyx_RaiseArgtupleInvalid("create_soft", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1704
      }
 
1705
      case  2:
 
1706
      if (kw_args > 1) {
 
1707
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lcpl);
 
1708
        if (unlikely(value)) { values[2] = value; kw_args--; }
 
1709
      }
 
1710
      case  3:
 
1711
      if (kw_args > 1) {
 
1712
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lapl);
 
1713
        if (unlikely(value)) { values[3] = value; kw_args--; }
 
1714
      }
 
1715
    }
 
1716
    if (unlikely(kw_args > 0)) {
 
1717
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "create_soft") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1718
    }
 
1719
    __pyx_v_new_name = __Pyx_PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_new_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1720
    __pyx_v_target = __Pyx_PyBytes_AsString(values[1]); if (unlikely((!__pyx_v_target) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1721
    __pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[2]);
 
1722
    __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[3]);
 
1723
  } else {
 
1724
    __pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
1725
    __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
1726
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1727
      case  4:
 
1728
      __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)PyTuple_GET_ITEM(__pyx_args, 3));
 
1729
      case  3:
 
1730
      __pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)PyTuple_GET_ITEM(__pyx_args, 2));
 
1731
      case  2:
 
1732
      __pyx_v_target = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((!__pyx_v_target) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1733
      __pyx_v_new_name = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((!__pyx_v_new_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1734
      break;
 
1735
      default: goto __pyx_L5_argtuple_error;
 
1736
    }
 
1737
  }
 
1738
  goto __pyx_L4_argument_unpacking_done;
 
1739
  __pyx_L5_argtuple_error:;
 
1740
  __Pyx_RaiseArgtupleInvalid("create_soft", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1741
  __pyx_L3_error:;
 
1742
  __Pyx_AddTraceback("h5py.h5l.LinkProxy.create_soft");
 
1743
  return NULL;
 
1744
  __pyx_L4_argument_unpacking_done:;
 
1745
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lcpl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lcpl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1746
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lapl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lapl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1747
 
 
1748
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":146
 
1749
 *         """
 
1750
 *         H5Lcreate_soft(target, self.id, new_name,
 
1751
 *             pdefault(lcpl), pdefault(lapl))             # <<<<<<<<<<<<<<
 
1752
 * 
 
1753
 * 
 
1754
 */
 
1755
  __pyx_t_1 = H5Lcreate_soft(__pyx_v_target, ((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id, __pyx_v_new_name, __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lcpl), __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lapl)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1756
 
 
1757
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1758
  goto __pyx_L0;
 
1759
  __pyx_L1_error:;
 
1760
  __Pyx_AddTraceback("h5py.h5l.LinkProxy.create_soft");
 
1761
  __pyx_r = NULL;
 
1762
  __pyx_L0:;
 
1763
  __Pyx_XGIVEREF(__pyx_r);
 
1764
  __Pyx_RefNannyFinishContext();
 
1765
  return __pyx_r;
 
1766
}
 
1767
 
 
1768
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":149
 
1769
 * 
 
1770
 * 
 
1771
 *     def create_external(self, char* link_name, char* file_name, char* obj_name,             # <<<<<<<<<<<<<<
 
1772
 *         PropID lcpl=None, PropID lapl=None):
 
1773
 *         """(STRING link_name, STRING file_name, STRING obj_name,
 
1774
 */
 
1775
 
 
1776
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_create_external(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
1777
static char __pyx_doc_4h5py_3h5l_9LinkProxy_create_external[] = "(STRING link_name, STRING file_name, STRING obj_name,\n        PropLCID lcpl=None, PropLAID lapl=None)\n\n        Create a new external link, pointing to an object in another file.\n        ";
 
1778
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_create_external(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
1779
  char *__pyx_v_link_name;
 
1780
  char *__pyx_v_file_name;
 
1781
  char *__pyx_v_obj_name;
 
1782
  struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lcpl = 0;
 
1783
  struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lapl = 0;
 
1784
  PyObject *__pyx_r = NULL;
 
1785
  herr_t __pyx_t_1;
 
1786
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__link_name,&__pyx_n_s__file_name,&__pyx_n_s__obj_name,&__pyx_n_s__lcpl,&__pyx_n_s__lapl,0};
 
1787
  __Pyx_RefNannySetupContext("create_external");
 
1788
  if (unlikely(__pyx_kwds)) {
 
1789
 
 
1790
    /* "/home/tachyon/h5py/h5py/h5l_body.pyx":150
 
1791
 * 
 
1792
 *     def create_external(self, char* link_name, char* file_name, char* obj_name,
 
1793
 *         PropID lcpl=None, PropID lapl=None):             # <<<<<<<<<<<<<<
 
1794
 *         """(STRING link_name, STRING file_name, STRING obj_name,
 
1795
 *         PropLCID lcpl=None, PropLAID lapl=None)
 
1796
 */
 
1797
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
1798
    PyObject* values[5] = {0,0,0,0,0};
 
1799
    values[3] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
1800
    values[4] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
1801
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1802
      case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
 
1803
      case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
 
1804
      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
1805
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
1806
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
1807
      case  0: break;
 
1808
      default: goto __pyx_L5_argtuple_error;
 
1809
    }
 
1810
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1811
      case  0:
 
1812
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__link_name);
 
1813
      if (likely(values[0])) kw_args--;
 
1814
      else goto __pyx_L5_argtuple_error;
 
1815
      case  1:
 
1816
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__file_name);
 
1817
      if (likely(values[1])) kw_args--;
 
1818
      else {
 
1819
        __Pyx_RaiseArgtupleInvalid("create_external", 0, 3, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1820
      }
 
1821
      case  2:
 
1822
      values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj_name);
 
1823
      if (likely(values[2])) kw_args--;
 
1824
      else {
 
1825
        __Pyx_RaiseArgtupleInvalid("create_external", 0, 3, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1826
      }
 
1827
      case  3:
 
1828
      if (kw_args > 1) {
 
1829
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lcpl);
 
1830
        if (unlikely(value)) { values[3] = value; kw_args--; }
 
1831
      }
 
1832
      case  4:
 
1833
      if (kw_args > 1) {
 
1834
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lapl);
 
1835
        if (unlikely(value)) { values[4] = value; kw_args--; }
 
1836
      }
 
1837
    }
 
1838
    if (unlikely(kw_args > 0)) {
 
1839
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "create_external") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1840
    }
 
1841
    __pyx_v_link_name = __Pyx_PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_link_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1842
    __pyx_v_file_name = __Pyx_PyBytes_AsString(values[1]); if (unlikely((!__pyx_v_file_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1843
    __pyx_v_obj_name = __Pyx_PyBytes_AsString(values[2]); if (unlikely((!__pyx_v_obj_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1844
    __pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[3]);
 
1845
    __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[4]);
 
1846
  } else {
 
1847
    __pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
1848
    __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
1849
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1850
      case  5:
 
1851
      __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)PyTuple_GET_ITEM(__pyx_args, 4));
 
1852
      case  4:
 
1853
      __pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)PyTuple_GET_ITEM(__pyx_args, 3));
 
1854
      case  3:
 
1855
      __pyx_v_obj_name = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((!__pyx_v_obj_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1856
      __pyx_v_file_name = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((!__pyx_v_file_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1857
      __pyx_v_link_name = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((!__pyx_v_link_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1858
      break;
 
1859
      default: goto __pyx_L5_argtuple_error;
 
1860
    }
 
1861
  }
 
1862
  goto __pyx_L4_argument_unpacking_done;
 
1863
  __pyx_L5_argtuple_error:;
 
1864
  __Pyx_RaiseArgtupleInvalid("create_external", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1865
  __pyx_L3_error:;
 
1866
  __Pyx_AddTraceback("h5py.h5l.LinkProxy.create_external");
 
1867
  return NULL;
 
1868
  __pyx_L4_argument_unpacking_done:;
 
1869
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lcpl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lcpl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1870
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lapl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lapl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1871
 
 
1872
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":157
 
1873
 *         """
 
1874
 *         H5Lcreate_external(file_name, obj_name, self.id, link_name,
 
1875
 *             pdefault(lcpl), pdefault(lapl))             # <<<<<<<<<<<<<<
 
1876
 * 
 
1877
 * 
 
1878
 */
 
1879
  __pyx_t_1 = H5Lcreate_external(__pyx_v_file_name, __pyx_v_obj_name, ((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id, __pyx_v_link_name, __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lcpl), __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lapl)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1880
 
 
1881
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1882
  goto __pyx_L0;
 
1883
  __pyx_L1_error:;
 
1884
  __Pyx_AddTraceback("h5py.h5l.LinkProxy.create_external");
 
1885
  __pyx_r = NULL;
 
1886
  __pyx_L0:;
 
1887
  __Pyx_XGIVEREF(__pyx_r);
 
1888
  __Pyx_RefNannyFinishContext();
 
1889
  return __pyx_r;
 
1890
}
 
1891
 
 
1892
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":160
 
1893
 * 
 
1894
 * 
 
1895
 *     def get_val(self, char* name, PropID lapl=None):             # <<<<<<<<<<<<<<
 
1896
 *         """(STRING name, PropLAID lapl=None) => STRING or TUPLE(file, obj)
 
1897
 * 
 
1898
 */
 
1899
 
 
1900
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_get_val(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
1901
static char __pyx_doc_4h5py_3h5l_9LinkProxy_get_val[] = "(STRING name, PropLAID lapl=None) => STRING or TUPLE(file, obj)\n\n        Get the string value of a soft link, or a 2-tuple representing\n        the contents of an external link.\n        ";
 
1902
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_get_val(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
1903
  char *__pyx_v_name;
 
1904
  struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lapl = 0;
 
1905
  hid_t __pyx_v_plist;
 
1906
  H5L_info_t __pyx_v_info;
 
1907
  size_t __pyx_v_buf_size;
 
1908
  char *__pyx_v_buf;
 
1909
  char *__pyx_v_ext_file_name;
 
1910
  char *__pyx_v_ext_obj_name;
 
1911
  unsigned int __pyx_v_wtf;
 
1912
  PyObject *__pyx_v_py_retval;
 
1913
  PyObject *__pyx_r = NULL;
 
1914
  herr_t __pyx_t_1;
 
1915
  int __pyx_t_2;
 
1916
  int __pyx_t_3;
 
1917
  int __pyx_t_4;
 
1918
  PyObject *__pyx_t_5 = NULL;
 
1919
  PyObject *__pyx_t_6 = NULL;
 
1920
  void *__pyx_t_7;
 
1921
  PyObject *__pyx_t_8 = NULL;
 
1922
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__lapl,0};
 
1923
  __Pyx_RefNannySetupContext("get_val");
 
1924
  if (unlikely(__pyx_kwds)) {
 
1925
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
1926
    PyObject* values[2] = {0,0};
 
1927
    values[1] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
1928
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1929
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
1930
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
1931
      case  0: break;
 
1932
      default: goto __pyx_L5_argtuple_error;
 
1933
    }
 
1934
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1935
      case  0:
 
1936
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name);
 
1937
      if (likely(values[0])) kw_args--;
 
1938
      else goto __pyx_L5_argtuple_error;
 
1939
      case  1:
 
1940
      if (kw_args > 1) {
 
1941
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lapl);
 
1942
        if (unlikely(value)) { values[1] = value; kw_args--; }
 
1943
      }
 
1944
    }
 
1945
    if (unlikely(kw_args > 0)) {
 
1946
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get_val") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1947
    }
 
1948
    __pyx_v_name = __Pyx_PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1949
    __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[1]);
 
1950
  } else {
 
1951
    __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
1952
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1953
      case  2: __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)PyTuple_GET_ITEM(__pyx_args, 1));
 
1954
      case  1: __pyx_v_name = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1955
      break;
 
1956
      default: goto __pyx_L5_argtuple_error;
 
1957
    }
 
1958
  }
 
1959
  goto __pyx_L4_argument_unpacking_done;
 
1960
  __pyx_L5_argtuple_error:;
 
1961
  __Pyx_RaiseArgtupleInvalid("get_val", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1962
  __pyx_L3_error:;
 
1963
  __Pyx_AddTraceback("h5py.h5l.LinkProxy.get_val");
 
1964
  return NULL;
 
1965
  __pyx_L4_argument_unpacking_done:;
 
1966
  __Pyx_INCREF((PyObject *)__pyx_v_self);
 
1967
  __Pyx_INCREF((PyObject *)__pyx_v_lapl);
 
1968
  __pyx_v_py_retval = Py_None; __Pyx_INCREF(Py_None);
 
1969
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lapl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lapl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1970
 
 
1971
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":166
 
1972
 *         the contents of an external link.
 
1973
 *         """
 
1974
 *         cdef hid_t plist = pdefault(lapl)             # <<<<<<<<<<<<<<
 
1975
 *         cdef H5L_info_t info
 
1976
 *         cdef size_t buf_size
 
1977
 */
 
1978
  __pyx_v_plist = __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lapl);
 
1979
 
 
1980
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":169
 
1981
 *         cdef H5L_info_t info
 
1982
 *         cdef size_t buf_size
 
1983
 *         cdef char* buf = NULL             # <<<<<<<<<<<<<<
 
1984
 *         cdef char* ext_file_name = NULL
 
1985
 *         cdef char* ext_obj_name = NULL
 
1986
 */
 
1987
  __pyx_v_buf = NULL;
 
1988
 
 
1989
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":170
 
1990
 *         cdef size_t buf_size
 
1991
 *         cdef char* buf = NULL
 
1992
 *         cdef char* ext_file_name = NULL             # <<<<<<<<<<<<<<
 
1993
 *         cdef char* ext_obj_name = NULL
 
1994
 *         cdef unsigned int wtf = 0
 
1995
 */
 
1996
  __pyx_v_ext_file_name = NULL;
 
1997
 
 
1998
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":171
 
1999
 *         cdef char* buf = NULL
 
2000
 *         cdef char* ext_file_name = NULL
 
2001
 *         cdef char* ext_obj_name = NULL             # <<<<<<<<<<<<<<
 
2002
 *         cdef unsigned int wtf = 0
 
2003
 * 
 
2004
 */
 
2005
  __pyx_v_ext_obj_name = NULL;
 
2006
 
 
2007
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":172
 
2008
 *         cdef char* ext_file_name = NULL
 
2009
 *         cdef char* ext_obj_name = NULL
 
2010
 *         cdef unsigned int wtf = 0             # <<<<<<<<<<<<<<
 
2011
 * 
 
2012
 *         H5Lget_info(self.id, name, &info, plist)
 
2013
 */
 
2014
  __pyx_v_wtf = 0;
 
2015
 
 
2016
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":174
 
2017
 *         cdef unsigned int wtf = 0
 
2018
 * 
 
2019
 *         H5Lget_info(self.id, name, &info, plist)             # <<<<<<<<<<<<<<
 
2020
 *         if info.type != H5L_TYPE_SOFT and info.type != H5L_TYPE_EXTERNAL:
 
2021
 *             raise TypeError("Link must be either a soft or external link")
 
2022
 */
 
2023
  __pyx_t_1 = H5Lget_info(((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id, __pyx_v_name, (&__pyx_v_info), __pyx_v_plist); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2024
 
 
2025
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":175
 
2026
 * 
 
2027
 *         H5Lget_info(self.id, name, &info, plist)
 
2028
 *         if info.type != H5L_TYPE_SOFT and info.type != H5L_TYPE_EXTERNAL:             # <<<<<<<<<<<<<<
 
2029
 *             raise TypeError("Link must be either a soft or external link")
 
2030
 * 
 
2031
 */
 
2032
  __pyx_t_2 = (__pyx_v_info.type != H5L_TYPE_SOFT);
 
2033
  if (__pyx_t_2) {
 
2034
    __pyx_t_3 = (__pyx_v_info.type != H5L_TYPE_EXTERNAL);
 
2035
    __pyx_t_4 = __pyx_t_3;
 
2036
  } else {
 
2037
    __pyx_t_4 = __pyx_t_2;
 
2038
  }
 
2039
  if (__pyx_t_4) {
 
2040
 
 
2041
    /* "/home/tachyon/h5py/h5py/h5l_body.pyx":176
 
2042
 *         H5Lget_info(self.id, name, &info, plist)
 
2043
 *         if info.type != H5L_TYPE_SOFT and info.type != H5L_TYPE_EXTERNAL:
 
2044
 *             raise TypeError("Link must be either a soft or external link")             # <<<<<<<<<<<<<<
 
2045
 * 
 
2046
 *         buf_size = info.u.val_size
 
2047
 */
 
2048
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2049
    __Pyx_GOTREF(__pyx_t_5);
 
2050
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
 
2051
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_2));
 
2052
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
 
2053
    __pyx_t_6 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2054
    __Pyx_GOTREF(__pyx_t_6);
 
2055
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
2056
    __Pyx_Raise(__pyx_t_6, 0, 0);
 
2057
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
2058
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2059
    goto __pyx_L6;
 
2060
  }
 
2061
  __pyx_L6:;
 
2062
 
 
2063
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":178
 
2064
 *             raise TypeError("Link must be either a soft or external link")
 
2065
 * 
 
2066
 *         buf_size = info.u.val_size             # <<<<<<<<<<<<<<
 
2067
 *         buf = <char*>emalloc(buf_size)
 
2068
 *         try:
 
2069
 */
 
2070
  __pyx_v_buf_size = __pyx_v_info.u.val_size;
 
2071
 
 
2072
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":179
 
2073
 * 
 
2074
 *         buf_size = info.u.val_size
 
2075
 *         buf = <char*>emalloc(buf_size)             # <<<<<<<<<<<<<<
 
2076
 *         try:
 
2077
 *             H5Lget_val(self.id, name, buf, buf_size, plist)
 
2078
 */
 
2079
  __pyx_t_7 = __pyx_f_4h5py_5utils_emalloc(__pyx_v_buf_size); if (unlikely(__pyx_t_7 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2080
  __pyx_v_buf = ((char *)__pyx_t_7);
 
2081
 
 
2082
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":180
 
2083
 *         buf_size = info.u.val_size
 
2084
 *         buf = <char*>emalloc(buf_size)
 
2085
 *         try:             # <<<<<<<<<<<<<<
 
2086
 *             H5Lget_val(self.id, name, buf, buf_size, plist)
 
2087
 *             if info.type == H5L_TYPE_SOFT:
 
2088
 */
 
2089
  /*try:*/ {
 
2090
 
 
2091
    /* "/home/tachyon/h5py/h5py/h5l_body.pyx":181
 
2092
 *         buf = <char*>emalloc(buf_size)
 
2093
 *         try:
 
2094
 *             H5Lget_val(self.id, name, buf, buf_size, plist)             # <<<<<<<<<<<<<<
 
2095
 *             if info.type == H5L_TYPE_SOFT:
 
2096
 *                 py_retval = buf
 
2097
 */
 
2098
    __pyx_t_1 = H5Lget_val(((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id, __pyx_v_name, __pyx_v_buf, __pyx_v_buf_size, __pyx_v_plist); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L8;}
 
2099
 
 
2100
    /* "/home/tachyon/h5py/h5py/h5l_body.pyx":182
 
2101
 *         try:
 
2102
 *             H5Lget_val(self.id, name, buf, buf_size, plist)
 
2103
 *             if info.type == H5L_TYPE_SOFT:             # <<<<<<<<<<<<<<
 
2104
 *                 py_retval = buf
 
2105
 *             else:
 
2106
 */
 
2107
    __pyx_t_4 = (__pyx_v_info.type == H5L_TYPE_SOFT);
 
2108
    if (__pyx_t_4) {
 
2109
 
 
2110
      /* "/home/tachyon/h5py/h5py/h5l_body.pyx":183
 
2111
 *             H5Lget_val(self.id, name, buf, buf_size, plist)
 
2112
 *             if info.type == H5L_TYPE_SOFT:
 
2113
 *                 py_retval = buf             # <<<<<<<<<<<<<<
 
2114
 *             else:
 
2115
 *                 H5Lunpack_elink_val(buf, buf_size, &wtf, &ext_file_name, &ext_obj_name)
 
2116
 */
 
2117
      __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_buf); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L8;}
 
2118
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
2119
      __Pyx_DECREF(__pyx_v_py_retval);
 
2120
      __pyx_v_py_retval = ((PyObject *)__pyx_t_6);
 
2121
      __pyx_t_6 = 0;
 
2122
      goto __pyx_L10;
 
2123
    }
 
2124
    /*else*/ {
 
2125
 
 
2126
      /* "/home/tachyon/h5py/h5py/h5l_body.pyx":185
 
2127
 *                 py_retval = buf
 
2128
 *             else:
 
2129
 *                 H5Lunpack_elink_val(buf, buf_size, &wtf, &ext_file_name, &ext_obj_name)             # <<<<<<<<<<<<<<
 
2130
 *                 py_retval = (str(ext_file_name), str(ext_obj_name))
 
2131
 *         finally:
 
2132
 */
 
2133
      __pyx_t_1 = H5Lunpack_elink_val(__pyx_v_buf, __pyx_v_buf_size, (&__pyx_v_wtf), (&__pyx_v_ext_file_name), (&__pyx_v_ext_obj_name)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L8;}
 
2134
 
 
2135
      /* "/home/tachyon/h5py/h5py/h5l_body.pyx":186
 
2136
 *             else:
 
2137
 *                 H5Lunpack_elink_val(buf, buf_size, &wtf, &ext_file_name, &ext_obj_name)
 
2138
 *                 py_retval = (str(ext_file_name), str(ext_obj_name))             # <<<<<<<<<<<<<<
 
2139
 *         finally:
 
2140
 *             efree(buf)
 
2141
 */
 
2142
      __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_ext_file_name); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L8;}
 
2143
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
2144
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L8;}
 
2145
      __Pyx_GOTREF(__pyx_t_5);
 
2146
      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6));
 
2147
      __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
 
2148
      __pyx_t_6 = 0;
 
2149
      __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L8;}
 
2150
      __Pyx_GOTREF(__pyx_t_6);
 
2151
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
2152
      __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_ext_obj_name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L8;}
 
2153
      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
 
2154
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L8;}
 
2155
      __Pyx_GOTREF(__pyx_t_8);
 
2156
      PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_5));
 
2157
      __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
 
2158
      __pyx_t_5 = 0;
 
2159
      __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L8;}
 
2160
      __Pyx_GOTREF(__pyx_t_5);
 
2161
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 
2162
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L8;}
 
2163
      __Pyx_GOTREF(__pyx_t_8);
 
2164
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
 
2165
      __Pyx_GIVEREF(__pyx_t_6);
 
2166
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5);
 
2167
      __Pyx_GIVEREF(__pyx_t_5);
 
2168
      __pyx_t_6 = 0;
 
2169
      __pyx_t_5 = 0;
 
2170
      __Pyx_DECREF(__pyx_v_py_retval);
 
2171
      __pyx_v_py_retval = __pyx_t_8;
 
2172
      __pyx_t_8 = 0;
 
2173
    }
 
2174
    __pyx_L10:;
 
2175
  }
 
2176
  /*finally:*/ {
 
2177
    int __pyx_why;
 
2178
    PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
 
2179
    int __pyx_exc_lineno;
 
2180
    __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
 
2181
    __pyx_why = 0; goto __pyx_L9;
 
2182
    __pyx_L8: {
 
2183
      __pyx_why = 4;
 
2184
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 
2185
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
 
2186
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
 
2187
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
 
2188
      __pyx_exc_lineno = __pyx_lineno;
 
2189
      goto __pyx_L9;
 
2190
    }
 
2191
    __pyx_L9:;
 
2192
 
 
2193
    /* "/home/tachyon/h5py/h5py/h5l_body.pyx":188
 
2194
 *                 py_retval = (str(ext_file_name), str(ext_obj_name))
 
2195
 *         finally:
 
2196
 *             efree(buf)             # <<<<<<<<<<<<<<
 
2197
 * 
 
2198
 *         return py_retval
 
2199
 */
 
2200
    __pyx_f_4h5py_5utils_efree(__pyx_v_buf);
 
2201
    switch (__pyx_why) {
 
2202
      case 4: {
 
2203
        __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
 
2204
        __pyx_lineno = __pyx_exc_lineno;
 
2205
        __pyx_exc_type = 0;
 
2206
        __pyx_exc_value = 0;
 
2207
        __pyx_exc_tb = 0;
 
2208
        goto __pyx_L1_error;
 
2209
      }
 
2210
    }
 
2211
  }
 
2212
 
 
2213
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":190
 
2214
 *             efree(buf)
 
2215
 * 
 
2216
 *         return py_retval             # <<<<<<<<<<<<<<
 
2217
 * 
 
2218
 * 
 
2219
 */
 
2220
  __Pyx_XDECREF(__pyx_r);
 
2221
  __Pyx_INCREF(__pyx_v_py_retval);
 
2222
  __pyx_r = __pyx_v_py_retval;
 
2223
  goto __pyx_L0;
 
2224
 
 
2225
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2226
  goto __pyx_L0;
 
2227
  __pyx_L1_error:;
 
2228
  __Pyx_XDECREF(__pyx_t_5);
 
2229
  __Pyx_XDECREF(__pyx_t_6);
 
2230
  __Pyx_XDECREF(__pyx_t_8);
 
2231
  __Pyx_AddTraceback("h5py.h5l.LinkProxy.get_val");
 
2232
  __pyx_r = NULL;
 
2233
  __pyx_L0:;
 
2234
  __Pyx_DECREF(__pyx_v_py_retval);
 
2235
  __Pyx_DECREF((PyObject *)__pyx_v_self);
 
2236
  __Pyx_DECREF((PyObject *)__pyx_v_lapl);
 
2237
  __Pyx_XGIVEREF(__pyx_r);
 
2238
  __Pyx_RefNannyFinishContext();
 
2239
  return __pyx_r;
 
2240
}
 
2241
 
 
2242
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":193
 
2243
 * 
 
2244
 * 
 
2245
 *     def exists(self, char* name):             # <<<<<<<<<<<<<<
 
2246
 *         """ (STRING name) => BOOL
 
2247
 * 
 
2248
 */
 
2249
 
 
2250
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_exists(PyObject *__pyx_v_self, PyObject *__pyx_arg_name); /*proto*/
 
2251
static char __pyx_doc_4h5py_3h5l_9LinkProxy_exists[] = " (STRING name) => BOOL\n\n            Check if a link of the specified name exists in this group.\n        ";
 
2252
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_exists(PyObject *__pyx_v_self, PyObject *__pyx_arg_name) {
 
2253
  char *__pyx_v_name;
 
2254
  PyObject *__pyx_r = NULL;
 
2255
  htri_t __pyx_t_1;
 
2256
  PyObject *__pyx_t_2 = NULL;
 
2257
  __Pyx_RefNannySetupContext("exists");
 
2258
  assert(__pyx_arg_name); {
 
2259
    __pyx_v_name = __Pyx_PyBytes_AsString(__pyx_arg_name); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2260
  }
 
2261
  goto __pyx_L4_argument_unpacking_done;
 
2262
  __pyx_L3_error:;
 
2263
  __Pyx_AddTraceback("h5py.h5l.LinkProxy.exists");
 
2264
  return NULL;
 
2265
  __pyx_L4_argument_unpacking_done:;
 
2266
 
 
2267
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":198
 
2268
 *             Check if a link of the specified name exists in this group.
 
2269
 *         """
 
2270
 *         return <bint>(H5Lexists(self.id, name, H5P_DEFAULT))             # <<<<<<<<<<<<<<
 
2271
 * 
 
2272
 * 
 
2273
 */
 
2274
  __Pyx_XDECREF(__pyx_r);
 
2275
  __pyx_t_1 = H5Lexists(((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id, __pyx_v_name, H5P_DEFAULT); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2276
  __pyx_t_2 = __Pyx_PyBool_FromLong(((int)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2277
  __Pyx_GOTREF(__pyx_t_2);
 
2278
  __pyx_r = __pyx_t_2;
 
2279
  __pyx_t_2 = 0;
 
2280
  goto __pyx_L0;
 
2281
 
 
2282
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2283
  goto __pyx_L0;
 
2284
  __pyx_L1_error:;
 
2285
  __Pyx_XDECREF(__pyx_t_2);
 
2286
  __Pyx_AddTraceback("h5py.h5l.LinkProxy.exists");
 
2287
  __pyx_r = NULL;
 
2288
  __pyx_L0:;
 
2289
  __Pyx_XGIVEREF(__pyx_r);
 
2290
  __Pyx_RefNannyFinishContext();
 
2291
  return __pyx_r;
 
2292
}
 
2293
 
 
2294
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":201
 
2295
 * 
 
2296
 * 
 
2297
 *     def get_info(self, char* name, int index=-1, *, PropID lapl=None):             # <<<<<<<<<<<<<<
 
2298
 *         """(STRING name=, INT index=, **kwds) => LinkInfo instance
 
2299
 * 
 
2300
 */
 
2301
 
 
2302
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_get_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
2303
static char __pyx_doc_4h5py_3h5l_9LinkProxy_get_info[] = "(STRING name=, INT index=, **kwds) => LinkInfo instance\n\n        Get information about a link, either by name or its index.\n\n        Keywords:\n        ";
 
2304
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_get_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
2305
  char *__pyx_v_name;
 
2306
  int __pyx_v_index;
 
2307
  struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lapl = 0;
 
2308
  struct __pyx_obj_4h5py_3h5l_LinkInfo *__pyx_v_info = 0;
 
2309
  PyObject *__pyx_r = NULL;
 
2310
  PyObject *__pyx_t_1 = NULL;
 
2311
  herr_t __pyx_t_2;
 
2312
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__index,&__pyx_n_s__lapl,0};
 
2313
  __Pyx_RefNannySetupContext("get_info");
 
2314
  if (unlikely(__pyx_kwds)) {
 
2315
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
2316
    PyObject* values[3] = {0,0,0};
 
2317
    values[2] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
2318
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
2319
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
2320
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
2321
      case  0: break;
 
2322
      default: goto __pyx_L5_argtuple_error;
 
2323
    }
 
2324
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
2325
      case  0:
 
2326
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name);
 
2327
      if (likely(values[0])) kw_args--;
 
2328
      else goto __pyx_L5_argtuple_error;
 
2329
      case  1:
 
2330
      if (kw_args > 1) {
 
2331
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
 
2332
        if (unlikely(value)) { values[1] = value; kw_args--; }
 
2333
      }
 
2334
    }
 
2335
    while (kw_args > 0) {
 
2336
      PyObject* value;
 
2337
      value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lapl);
 
2338
      if (value) { values[2] = value; if (!(--kw_args)) break; }
 
2339
      break;
 
2340
    }
 
2341
    if (unlikely(kw_args > 0)) {
 
2342
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get_info") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2343
    }
 
2344
    __pyx_v_name = __Pyx_PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2345
    if (values[1]) {
 
2346
      __pyx_v_index = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2347
    } else {
 
2348
      __pyx_v_index = ((int)-1);
 
2349
    }
 
2350
    __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[2]);
 
2351
  } else {
 
2352
    __pyx_v_index = ((int)-1);
 
2353
    __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
2354
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
2355
      case  2: __pyx_v_index = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2356
      case  1: __pyx_v_name = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2357
      break;
 
2358
      default: goto __pyx_L5_argtuple_error;
 
2359
    }
 
2360
  }
 
2361
  goto __pyx_L4_argument_unpacking_done;
 
2362
  __pyx_L5_argtuple_error:;
 
2363
  __Pyx_RaiseArgtupleInvalid("get_info", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2364
  __pyx_L3_error:;
 
2365
  __Pyx_AddTraceback("h5py.h5l.LinkProxy.get_info");
 
2366
  return NULL;
 
2367
  __pyx_L4_argument_unpacking_done:;
 
2368
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lapl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lapl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2369
 
 
2370
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":208
 
2371
 *         Keywords:
 
2372
 *         """
 
2373
 *         cdef LinkInfo info = LinkInfo()             # <<<<<<<<<<<<<<
 
2374
 *         H5Lget_info(self.id, name, &info.infostruct, pdefault(lapl))
 
2375
 *         return info
 
2376
 */
 
2377
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4h5py_3h5l_LinkInfo)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2378
  __Pyx_GOTREF(__pyx_t_1);
 
2379
  __pyx_v_info = ((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_t_1);
 
2380
  __pyx_t_1 = 0;
 
2381
 
 
2382
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":209
 
2383
 *         """
 
2384
 *         cdef LinkInfo info = LinkInfo()
 
2385
 *         H5Lget_info(self.id, name, &info.infostruct, pdefault(lapl))             # <<<<<<<<<<<<<<
 
2386
 *         return info
 
2387
 * 
 
2388
 */
 
2389
  __pyx_t_2 = H5Lget_info(((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id, __pyx_v_name, (&__pyx_v_info->infostruct), __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lapl)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2390
 
 
2391
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":210
 
2392
 *         cdef LinkInfo info = LinkInfo()
 
2393
 *         H5Lget_info(self.id, name, &info.infostruct, pdefault(lapl))
 
2394
 *         return info             # <<<<<<<<<<<<<<
 
2395
 * 
 
2396
 * 
 
2397
 */
 
2398
  __Pyx_XDECREF(__pyx_r);
 
2399
  __Pyx_INCREF(((PyObject *)__pyx_v_info));
 
2400
  __pyx_r = ((PyObject *)__pyx_v_info);
 
2401
  goto __pyx_L0;
 
2402
 
 
2403
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2404
  goto __pyx_L0;
 
2405
  __pyx_L1_error:;
 
2406
  __Pyx_XDECREF(__pyx_t_1);
 
2407
  __Pyx_AddTraceback("h5py.h5l.LinkProxy.get_info");
 
2408
  __pyx_r = NULL;
 
2409
  __pyx_L0:;
 
2410
  __Pyx_XDECREF((PyObject *)__pyx_v_info);
 
2411
  __Pyx_XGIVEREF(__pyx_r);
 
2412
  __Pyx_RefNannyFinishContext();
 
2413
  return __pyx_r;
 
2414
}
 
2415
 
 
2416
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":213
 
2417
 * 
 
2418
 * 
 
2419
 *     def visit(self, object func, *,             # <<<<<<<<<<<<<<
 
2420
 *               int idx_type=H5_INDEX_NAME, int order=H5_ITER_NATIVE,
 
2421
 *               char* obj_name='.', PropID lapl=None, bint info=0):
 
2422
 */
 
2423
 
 
2424
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_visit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
2425
static char __pyx_doc_4h5py_3h5l_9LinkProxy_visit[] = "(CALLABLE func, **kwds) => <Return value from func>\n\n        Iterate a function or callable object over all groups below this\n        one.  Your callable should conform to the signature::\n\n            func(STRING name) => Result\n\n        or if the keyword argument \"info\" is True::\n\n            func(STRING name, LinkInfo info) => Result\n\n        Returning None or a logical False continues iteration; returning\n        anything else aborts iteration and returns that value.\n\n        BOOL info (False)\n            Provide a LinkInfo instance to callback\n\n        STRING obj_name (\".\")\n            Visit this subgroup instead\n\n        PropLAID lapl (None)\n            Link access property list for \"obj_name\"\n\n        INT idx_type (h5.INDEX_NAME)\n\n        INT order (h5.ITER_NATIVE)\n        ";
 
2426
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_visit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
2427
  PyObject *__pyx_v_func = 0;
 
2428
  int __pyx_v_idx_type;
 
2429
  int __pyx_v_order;
 
2430
  char *__pyx_v_obj_name;
 
2431
  struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lapl = 0;
 
2432
  int __pyx_v_info;
 
2433
  struct __pyx_obj_4h5py_3h5l__LinkVisitor *__pyx_v_it = 0;
 
2434
  H5L_iterate_t __pyx_v_cfunc;
 
2435
  PyObject *__pyx_r = NULL;
 
2436
  PyObject *__pyx_t_1 = NULL;
 
2437
  PyObject *__pyx_t_2 = NULL;
 
2438
  int __pyx_t_3;
 
2439
  herr_t __pyx_t_4;
 
2440
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__func,&__pyx_n_s__idx_type,&__pyx_n_s__order,&__pyx_n_s__obj_name,&__pyx_n_s__lapl,&__pyx_n_s__info,0};
 
2441
  __Pyx_RefNannySetupContext("visit");
 
2442
  if (unlikely(__pyx_kwds)) {
 
2443
 
 
2444
    /* "/home/tachyon/h5py/h5py/h5l_body.pyx":215
 
2445
 *     def visit(self, object func, *,
 
2446
 *               int idx_type=H5_INDEX_NAME, int order=H5_ITER_NATIVE,
 
2447
 *               char* obj_name='.', PropID lapl=None, bint info=0):             # <<<<<<<<<<<<<<
 
2448
 *         """(CALLABLE func, **kwds) => <Return value from func>
 
2449
 * 
 
2450
 */
 
2451
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
2452
    PyObject* values[6] = {0,0,0,0,0,0};
 
2453
    values[4] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
2454
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
2455
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
2456
      case  0: break;
 
2457
      default: goto __pyx_L5_argtuple_error;
 
2458
    }
 
2459
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
2460
      case  0:
 
2461
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func);
 
2462
      if (likely(values[0])) kw_args--;
 
2463
      else goto __pyx_L5_argtuple_error;
 
2464
    }
 
2465
    while (kw_args > 0) {
 
2466
      PyObject* value;
 
2467
      value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__idx_type);
 
2468
      if (value) { values[1] = value; if (!(--kw_args)) break; }
 
2469
      value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__order);
 
2470
      if (value) { values[2] = value; if (!(--kw_args)) break; }
 
2471
      value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj_name);
 
2472
      if (value) { values[3] = value; if (!(--kw_args)) break; }
 
2473
      value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lapl);
 
2474
      if (value) { values[4] = value; if (!(--kw_args)) break; }
 
2475
      value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__info);
 
2476
      if (value) { values[5] = value; if (!(--kw_args)) break; }
 
2477
      break;
 
2478
    }
 
2479
    if (unlikely(kw_args > 0)) {
 
2480
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "visit") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2481
    }
 
2482
    __pyx_v_func = values[0];
 
2483
    if (values[1]) {
 
2484
      __pyx_v_idx_type = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_idx_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2485
    } else {
 
2486
      __pyx_v_idx_type = __pyx_k_3;
 
2487
    }
 
2488
    if (values[2]) {
 
2489
      __pyx_v_order = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_order == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2490
    } else {
 
2491
      __pyx_v_order = __pyx_k_4;
 
2492
    }
 
2493
    if (values[3]) {
 
2494
      __pyx_v_obj_name = __Pyx_PyBytes_AsString(values[3]); if (unlikely((!__pyx_v_obj_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2495
    } else {
 
2496
      __pyx_v_obj_name = ((char *)__pyx_k_5);
 
2497
    }
 
2498
    __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[4]);
 
2499
    if (values[5]) {
 
2500
      __pyx_v_info = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_info == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2501
    } else {
 
2502
      __pyx_v_info = ((int)0);
 
2503
    }
 
2504
  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
 
2505
    goto __pyx_L5_argtuple_error;
 
2506
  } else {
 
2507
    __pyx_v_func = PyTuple_GET_ITEM(__pyx_args, 0);
 
2508
    __pyx_v_idx_type = __pyx_k_3;
 
2509
    __pyx_v_order = __pyx_k_4;
 
2510
    __pyx_v_obj_name = ((char *)__pyx_k_5);
 
2511
    __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
 
2512
    __pyx_v_info = ((int)0);
 
2513
  }
 
2514
  goto __pyx_L4_argument_unpacking_done;
 
2515
  __pyx_L5_argtuple_error:;
 
2516
  __Pyx_RaiseArgtupleInvalid("visit", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2517
  __pyx_L3_error:;
 
2518
  __Pyx_AddTraceback("h5py.h5l.LinkProxy.visit");
 
2519
  return NULL;
 
2520
  __pyx_L4_argument_unpacking_done:;
 
2521
  __Pyx_INCREF((PyObject *)__pyx_v_self);
 
2522
  __Pyx_INCREF(__pyx_v_func);
 
2523
  __Pyx_INCREF((PyObject *)__pyx_v_lapl);
 
2524
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lapl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lapl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2525
 
 
2526
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":243
 
2527
 *         INT order (h5.ITER_NATIVE)
 
2528
 *         """
 
2529
 *         cdef _LinkVisitor it = _LinkVisitor(func)             # <<<<<<<<<<<<<<
 
2530
 *         cdef H5L_iterate_t cfunc
 
2531
 * 
 
2532
 */
 
2533
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2534
  __Pyx_GOTREF(__pyx_t_1);
 
2535
  __Pyx_INCREF(__pyx_v_func);
 
2536
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_func);
 
2537
  __Pyx_GIVEREF(__pyx_v_func);
 
2538
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4h5py_3h5l__LinkVisitor)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2539
  __Pyx_GOTREF(__pyx_t_2);
 
2540
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2541
  __pyx_v_it = ((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_t_2);
 
2542
  __pyx_t_2 = 0;
 
2543
 
 
2544
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":246
 
2545
 *         cdef H5L_iterate_t cfunc
 
2546
 * 
 
2547
 *         if info:             # <<<<<<<<<<<<<<
 
2548
 *             cfunc = cb_link_iterate
 
2549
 *         else:
 
2550
 */
 
2551
  __pyx_t_3 = __pyx_v_info;
 
2552
  if (__pyx_t_3) {
 
2553
 
 
2554
    /* "/home/tachyon/h5py/h5py/h5l_body.pyx":247
 
2555
 * 
 
2556
 *         if info:
 
2557
 *             cfunc = cb_link_iterate             # <<<<<<<<<<<<<<
 
2558
 *         else:
 
2559
 *             cfunc = cb_link_simple
 
2560
 */
 
2561
    __pyx_v_cfunc = __pyx_f_4h5py_3h5l_cb_link_iterate;
 
2562
    goto __pyx_L6;
 
2563
  }
 
2564
  /*else*/ {
 
2565
 
 
2566
    /* "/home/tachyon/h5py/h5py/h5l_body.pyx":249
 
2567
 *             cfunc = cb_link_iterate
 
2568
 *         else:
 
2569
 *             cfunc = cb_link_simple             # <<<<<<<<<<<<<<
 
2570
 * 
 
2571
 *         H5Lvisit_by_name(self.id, obj_name, <H5_index_t>idx_type,
 
2572
 */
 
2573
    __pyx_v_cfunc = __pyx_f_4h5py_3h5l_cb_link_simple;
 
2574
  }
 
2575
  __pyx_L6:;
 
2576
 
 
2577
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":252
 
2578
 * 
 
2579
 *         H5Lvisit_by_name(self.id, obj_name, <H5_index_t>idx_type,
 
2580
 *             <H5_iter_order_t>order, cfunc, <void*>it, pdefault(lapl))             # <<<<<<<<<<<<<<
 
2581
 * 
 
2582
 *         return it.retval
 
2583
 */
 
2584
  __pyx_t_4 = H5Lvisit_by_name(((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id, __pyx_v_obj_name, ((H5_index_t)__pyx_v_idx_type), ((H5_iter_order_t)__pyx_v_order), __pyx_v_cfunc, ((void *)__pyx_v_it), __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lapl)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2585
 
 
2586
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":254
 
2587
 *             <H5_iter_order_t>order, cfunc, <void*>it, pdefault(lapl))
 
2588
 * 
 
2589
 *         return it.retval             # <<<<<<<<<<<<<<
 
2590
 * 
 
2591
 * 
 
2592
 */
 
2593
  __Pyx_XDECREF(__pyx_r);
 
2594
  __Pyx_INCREF(__pyx_v_it->retval);
 
2595
  __pyx_r = __pyx_v_it->retval;
 
2596
  goto __pyx_L0;
 
2597
 
 
2598
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2599
  goto __pyx_L0;
 
2600
  __pyx_L1_error:;
 
2601
  __Pyx_XDECREF(__pyx_t_1);
 
2602
  __Pyx_XDECREF(__pyx_t_2);
 
2603
  __Pyx_AddTraceback("h5py.h5l.LinkProxy.visit");
 
2604
  __pyx_r = NULL;
 
2605
  __pyx_L0:;
 
2606
  __Pyx_XDECREF((PyObject *)__pyx_v_it);
 
2607
  __Pyx_DECREF((PyObject *)__pyx_v_self);
 
2608
  __Pyx_DECREF(__pyx_v_func);
 
2609
  __Pyx_DECREF((PyObject *)__pyx_v_lapl);
 
2610
  __Pyx_XGIVEREF(__pyx_r);
 
2611
  __Pyx_RefNannyFinishContext();
 
2612
  return __pyx_r;
 
2613
}
 
2614
 
 
2615
static PyObject *__pyx_tp_new_4h5py_3h5l_LinkProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
 
2616
  PyObject *o = (*t->tp_alloc)(t, 0);
 
2617
  if (!o) return 0;
 
2618
  return o;
 
2619
}
 
2620
 
 
2621
static void __pyx_tp_dealloc_4h5py_3h5l_LinkProxy(PyObject *o) {
 
2622
  (*Py_TYPE(o)->tp_free)(o);
 
2623
}
 
2624
 
 
2625
static struct PyMethodDef __pyx_methods_4h5py_3h5l_LinkProxy[] = {
 
2626
  {__Pyx_NAMESTR("create_hard"), (PyCFunction)__pyx_pf_4h5py_3h5l_9LinkProxy_create_hard, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5l_9LinkProxy_create_hard)},
 
2627
  {__Pyx_NAMESTR("create_soft"), (PyCFunction)__pyx_pf_4h5py_3h5l_9LinkProxy_create_soft, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5l_9LinkProxy_create_soft)},
 
2628
  {__Pyx_NAMESTR("create_external"), (PyCFunction)__pyx_pf_4h5py_3h5l_9LinkProxy_create_external, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5l_9LinkProxy_create_external)},
 
2629
  {__Pyx_NAMESTR("get_val"), (PyCFunction)__pyx_pf_4h5py_3h5l_9LinkProxy_get_val, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5l_9LinkProxy_get_val)},
 
2630
  {__Pyx_NAMESTR("exists"), (PyCFunction)__pyx_pf_4h5py_3h5l_9LinkProxy_exists, METH_O, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5l_9LinkProxy_exists)},
 
2631
  {__Pyx_NAMESTR("get_info"), (PyCFunction)__pyx_pf_4h5py_3h5l_9LinkProxy_get_info, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5l_9LinkProxy_get_info)},
 
2632
  {__Pyx_NAMESTR("visit"), (PyCFunction)__pyx_pf_4h5py_3h5l_9LinkProxy_visit, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5l_9LinkProxy_visit)},
 
2633
  {0, 0, 0, 0}
 
2634
};
 
2635
 
 
2636
static PyNumberMethods __pyx_tp_as_number_LinkProxy = {
 
2637
  0, /*nb_add*/
 
2638
  0, /*nb_subtract*/
 
2639
  0, /*nb_multiply*/
 
2640
  #if PY_MAJOR_VERSION < 3
 
2641
  0, /*nb_divide*/
 
2642
  #endif
 
2643
  0, /*nb_remainder*/
 
2644
  0, /*nb_divmod*/
 
2645
  0, /*nb_power*/
 
2646
  0, /*nb_negative*/
 
2647
  0, /*nb_positive*/
 
2648
  0, /*nb_absolute*/
 
2649
  0, /*nb_nonzero*/
 
2650
  0, /*nb_invert*/
 
2651
  0, /*nb_lshift*/
 
2652
  0, /*nb_rshift*/
 
2653
  0, /*nb_and*/
 
2654
  0, /*nb_xor*/
 
2655
  0, /*nb_or*/
 
2656
  #if PY_MAJOR_VERSION < 3
 
2657
  0, /*nb_coerce*/
 
2658
  #endif
 
2659
  0, /*nb_int*/
 
2660
  #if PY_MAJOR_VERSION >= 3
 
2661
  0, /*reserved*/
 
2662
  #else
 
2663
  0, /*nb_long*/
 
2664
  #endif
 
2665
  0, /*nb_float*/
 
2666
  #if PY_MAJOR_VERSION < 3
 
2667
  0, /*nb_oct*/
 
2668
  #endif
 
2669
  #if PY_MAJOR_VERSION < 3
 
2670
  0, /*nb_hex*/
 
2671
  #endif
 
2672
  0, /*nb_inplace_add*/
 
2673
  0, /*nb_inplace_subtract*/
 
2674
  0, /*nb_inplace_multiply*/
 
2675
  #if PY_MAJOR_VERSION < 3
 
2676
  0, /*nb_inplace_divide*/
 
2677
  #endif
 
2678
  0, /*nb_inplace_remainder*/
 
2679
  0, /*nb_inplace_power*/
 
2680
  0, /*nb_inplace_lshift*/
 
2681
  0, /*nb_inplace_rshift*/
 
2682
  0, /*nb_inplace_and*/
 
2683
  0, /*nb_inplace_xor*/
 
2684
  0, /*nb_inplace_or*/
 
2685
  0, /*nb_floor_divide*/
 
2686
  0, /*nb_true_divide*/
 
2687
  0, /*nb_inplace_floor_divide*/
 
2688
  0, /*nb_inplace_true_divide*/
 
2689
  #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
 
2690
  0, /*nb_index*/
 
2691
  #endif
 
2692
};
 
2693
 
 
2694
static PySequenceMethods __pyx_tp_as_sequence_LinkProxy = {
 
2695
  0, /*sq_length*/
 
2696
  0, /*sq_concat*/
 
2697
  0, /*sq_repeat*/
 
2698
  0, /*sq_item*/
 
2699
  0, /*sq_slice*/
 
2700
  0, /*sq_ass_item*/
 
2701
  0, /*sq_ass_slice*/
 
2702
  0, /*sq_contains*/
 
2703
  0, /*sq_inplace_concat*/
 
2704
  0, /*sq_inplace_repeat*/
 
2705
};
 
2706
 
 
2707
static PyMappingMethods __pyx_tp_as_mapping_LinkProxy = {
 
2708
  0, /*mp_length*/
 
2709
  0, /*mp_subscript*/
 
2710
  0, /*mp_ass_subscript*/
 
2711
};
 
2712
 
 
2713
static PyBufferProcs __pyx_tp_as_buffer_LinkProxy = {
 
2714
  #if PY_MAJOR_VERSION < 3
 
2715
  0, /*bf_getreadbuffer*/
 
2716
  #endif
 
2717
  #if PY_MAJOR_VERSION < 3
 
2718
  0, /*bf_getwritebuffer*/
 
2719
  #endif
 
2720
  #if PY_MAJOR_VERSION < 3
 
2721
  0, /*bf_getsegcount*/
 
2722
  #endif
 
2723
  #if PY_MAJOR_VERSION < 3
 
2724
  0, /*bf_getcharbuffer*/
 
2725
  #endif
 
2726
  #if PY_VERSION_HEX >= 0x02060000
 
2727
  0, /*bf_getbuffer*/
 
2728
  #endif
 
2729
  #if PY_VERSION_HEX >= 0x02060000
 
2730
  0, /*bf_releasebuffer*/
 
2731
  #endif
 
2732
};
 
2733
 
 
2734
PyTypeObject __pyx_type_4h5py_3h5l_LinkProxy = {
 
2735
  PyVarObject_HEAD_INIT(0, 0)
 
2736
  __Pyx_NAMESTR("h5py.h5l.LinkProxy"), /*tp_name*/
 
2737
  sizeof(struct __pyx_obj_4h5py_3h5l_LinkProxy), /*tp_basicsize*/
 
2738
  0, /*tp_itemsize*/
 
2739
  __pyx_tp_dealloc_4h5py_3h5l_LinkProxy, /*tp_dealloc*/
 
2740
  0, /*tp_print*/
 
2741
  0, /*tp_getattr*/
 
2742
  0, /*tp_setattr*/
 
2743
  0, /*tp_compare*/
 
2744
  0, /*tp_repr*/
 
2745
  &__pyx_tp_as_number_LinkProxy, /*tp_as_number*/
 
2746
  &__pyx_tp_as_sequence_LinkProxy, /*tp_as_sequence*/
 
2747
  &__pyx_tp_as_mapping_LinkProxy, /*tp_as_mapping*/
 
2748
  __pyx_pf_4h5py_3h5l_9LinkProxy___hash__, /*tp_hash*/
 
2749
  0, /*tp_call*/
 
2750
  0, /*tp_str*/
 
2751
  0, /*tp_getattro*/
 
2752
  0, /*tp_setattro*/
 
2753
  &__pyx_tp_as_buffer_LinkProxy, /*tp_as_buffer*/
 
2754
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
 
2755
  __Pyx_DOCSTR("\n        Proxy class which provides access to the HDF5 \"H5L\" API.\n\n        These come attached to GroupID objects as \"obj.links\".  Since every\n        H5L function operates on at least one group, the methods provided\n        operate on their parent group identifier.  For example::\n\n            >>> g = h5g.open(fid, '/')\n            >>> g.links.exists(\"MyGroup\")\n            True\n            >>> g.links.exists(\"FooBar\")\n            False\n\n        * Hashable: No\n        * Equality: Undefined\n    "), /*tp_doc*/
 
2756
  0, /*tp_traverse*/
 
2757
  0, /*tp_clear*/
 
2758
  __pyx_pf_4h5py_3h5l_9LinkProxy___richcmp__, /*tp_richcompare*/
 
2759
  0, /*tp_weaklistoffset*/
 
2760
  0, /*tp_iter*/
 
2761
  0, /*tp_iternext*/
 
2762
  __pyx_methods_4h5py_3h5l_LinkProxy, /*tp_methods*/
 
2763
  0, /*tp_members*/
 
2764
  0, /*tp_getset*/
 
2765
  0, /*tp_base*/
 
2766
  0, /*tp_dict*/
 
2767
  0, /*tp_descr_get*/
 
2768
  0, /*tp_descr_set*/
 
2769
  0, /*tp_dictoffset*/
 
2770
  __pyx_pf_4h5py_3h5l_9LinkProxy___init__, /*tp_init*/
 
2771
  0, /*tp_alloc*/
 
2772
  __pyx_tp_new_4h5py_3h5l_LinkProxy, /*tp_new*/
 
2773
  0, /*tp_free*/
 
2774
  0, /*tp_is_gc*/
 
2775
  0, /*tp_bases*/
 
2776
  0, /*tp_mro*/
 
2777
  0, /*tp_cache*/
 
2778
  0, /*tp_subclasses*/
 
2779
  0, /*tp_weaklist*/
 
2780
  0, /*tp_del*/
 
2781
  #if PY_VERSION_HEX >= 0x02060000
 
2782
  0, /*tp_version_tag*/
 
2783
  #endif
 
2784
};
 
2785
 
 
2786
static PyObject *__pyx_tp_new_4h5py_3h5l_LinkInfo(PyTypeObject *t, PyObject *a, PyObject *k) {
 
2787
  PyObject *o = __pyx_ptype_4h5py_2h5_SmartStruct->tp_new(t, a, k);
 
2788
  if (!o) return 0;
 
2789
  return o;
 
2790
}
 
2791
 
 
2792
static void __pyx_tp_dealloc_4h5py_3h5l_LinkInfo(PyObject *o) {
 
2793
  __pyx_ptype_4h5py_2h5_SmartStruct->tp_dealloc(o);
 
2794
}
 
2795
 
 
2796
static int __pyx_tp_traverse_4h5py_3h5l_LinkInfo(PyObject *o, visitproc v, void *a) {
 
2797
  int e;
 
2798
  if (__pyx_ptype_4h5py_2h5_SmartStruct->tp_traverse) {
 
2799
    e = __pyx_ptype_4h5py_2h5_SmartStruct->tp_traverse(o, v, a); if (e) return e;
 
2800
  }
 
2801
  return 0;
 
2802
}
 
2803
 
 
2804
static int __pyx_tp_clear_4h5py_3h5l_LinkInfo(PyObject *o) {
 
2805
  if (__pyx_ptype_4h5py_2h5_SmartStruct->tp_clear) {
 
2806
    __pyx_ptype_4h5py_2h5_SmartStruct->tp_clear(o);
 
2807
  }
 
2808
  return 0;
 
2809
}
 
2810
 
 
2811
static PyObject *__pyx_getprop_4h5py_3h5l_8LinkInfo_type(PyObject *o, void *x) {
 
2812
  return __pyx_pf_4h5py_3h5l_8LinkInfo_4type___get__(o);
 
2813
}
 
2814
 
 
2815
static PyObject *__pyx_getprop_4h5py_3h5l_8LinkInfo_corder_valid(PyObject *o, void *x) {
 
2816
  return __pyx_pf_4h5py_3h5l_8LinkInfo_12corder_valid___get__(o);
 
2817
}
 
2818
 
 
2819
static PyObject *__pyx_getprop_4h5py_3h5l_8LinkInfo_corder(PyObject *o, void *x) {
 
2820
  return __pyx_pf_4h5py_3h5l_8LinkInfo_6corder___get__(o);
 
2821
}
 
2822
 
 
2823
static PyObject *__pyx_getprop_4h5py_3h5l_8LinkInfo_cset(PyObject *o, void *x) {
 
2824
  return __pyx_pf_4h5py_3h5l_8LinkInfo_4cset___get__(o);
 
2825
}
 
2826
 
 
2827
static PyObject *__pyx_getprop_4h5py_3h5l_8LinkInfo_u(PyObject *o, void *x) {
 
2828
  return __pyx_pf_4h5py_3h5l_8LinkInfo_1u___get__(o);
 
2829
}
 
2830
 
 
2831
static struct PyMethodDef __pyx_methods_4h5py_3h5l_LinkInfo[] = {
 
2832
  {0, 0, 0, 0}
 
2833
};
 
2834
 
 
2835
static struct PyGetSetDef __pyx_getsets_4h5py_3h5l_LinkInfo[] = {
 
2836
  {(char *)"type", __pyx_getprop_4h5py_3h5l_8LinkInfo_type, 0, __Pyx_DOCSTR(__pyx_k_6), 0},
 
2837
  {(char *)"corder_valid", __pyx_getprop_4h5py_3h5l_8LinkInfo_corder_valid, 0, __Pyx_DOCSTR(__pyx_k_7), 0},
 
2838
  {(char *)"corder", __pyx_getprop_4h5py_3h5l_8LinkInfo_corder, 0, __Pyx_DOCSTR(__pyx_k_8), 0},
 
2839
  {(char *)"cset", __pyx_getprop_4h5py_3h5l_8LinkInfo_cset, 0, __Pyx_DOCSTR(__pyx_k_9), 0},
 
2840
  {(char *)"u", __pyx_getprop_4h5py_3h5l_8LinkInfo_u, 0, __Pyx_DOCSTR(__pyx_k_10), 0},
 
2841
  {0, 0, 0, 0, 0}
 
2842
};
 
2843
 
 
2844
static PyNumberMethods __pyx_tp_as_number_LinkInfo = {
 
2845
  0, /*nb_add*/
 
2846
  0, /*nb_subtract*/
 
2847
  0, /*nb_multiply*/
 
2848
  #if PY_MAJOR_VERSION < 3
 
2849
  0, /*nb_divide*/
 
2850
  #endif
 
2851
  0, /*nb_remainder*/
 
2852
  0, /*nb_divmod*/
 
2853
  0, /*nb_power*/
 
2854
  0, /*nb_negative*/
 
2855
  0, /*nb_positive*/
 
2856
  0, /*nb_absolute*/
 
2857
  0, /*nb_nonzero*/
 
2858
  0, /*nb_invert*/
 
2859
  0, /*nb_lshift*/
 
2860
  0, /*nb_rshift*/
 
2861
  0, /*nb_and*/
 
2862
  0, /*nb_xor*/
 
2863
  0, /*nb_or*/
 
2864
  #if PY_MAJOR_VERSION < 3
 
2865
  0, /*nb_coerce*/
 
2866
  #endif
 
2867
  0, /*nb_int*/
 
2868
  #if PY_MAJOR_VERSION >= 3
 
2869
  0, /*reserved*/
 
2870
  #else
 
2871
  0, /*nb_long*/
 
2872
  #endif
 
2873
  0, /*nb_float*/
 
2874
  #if PY_MAJOR_VERSION < 3
 
2875
  0, /*nb_oct*/
 
2876
  #endif
 
2877
  #if PY_MAJOR_VERSION < 3
 
2878
  0, /*nb_hex*/
 
2879
  #endif
 
2880
  0, /*nb_inplace_add*/
 
2881
  0, /*nb_inplace_subtract*/
 
2882
  0, /*nb_inplace_multiply*/
 
2883
  #if PY_MAJOR_VERSION < 3
 
2884
  0, /*nb_inplace_divide*/
 
2885
  #endif
 
2886
  0, /*nb_inplace_remainder*/
 
2887
  0, /*nb_inplace_power*/
 
2888
  0, /*nb_inplace_lshift*/
 
2889
  0, /*nb_inplace_rshift*/
 
2890
  0, /*nb_inplace_and*/
 
2891
  0, /*nb_inplace_xor*/
 
2892
  0, /*nb_inplace_or*/
 
2893
  0, /*nb_floor_divide*/
 
2894
  0, /*nb_true_divide*/
 
2895
  0, /*nb_inplace_floor_divide*/
 
2896
  0, /*nb_inplace_true_divide*/
 
2897
  #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
 
2898
  0, /*nb_index*/
 
2899
  #endif
 
2900
};
 
2901
 
 
2902
static PySequenceMethods __pyx_tp_as_sequence_LinkInfo = {
 
2903
  0, /*sq_length*/
 
2904
  0, /*sq_concat*/
 
2905
  0, /*sq_repeat*/
 
2906
  0, /*sq_item*/
 
2907
  0, /*sq_slice*/
 
2908
  0, /*sq_ass_item*/
 
2909
  0, /*sq_ass_slice*/
 
2910
  0, /*sq_contains*/
 
2911
  0, /*sq_inplace_concat*/
 
2912
  0, /*sq_inplace_repeat*/
 
2913
};
 
2914
 
 
2915
static PyMappingMethods __pyx_tp_as_mapping_LinkInfo = {
 
2916
  0, /*mp_length*/
 
2917
  0, /*mp_subscript*/
 
2918
  0, /*mp_ass_subscript*/
 
2919
};
 
2920
 
 
2921
static PyBufferProcs __pyx_tp_as_buffer_LinkInfo = {
 
2922
  #if PY_MAJOR_VERSION < 3
 
2923
  0, /*bf_getreadbuffer*/
 
2924
  #endif
 
2925
  #if PY_MAJOR_VERSION < 3
 
2926
  0, /*bf_getwritebuffer*/
 
2927
  #endif
 
2928
  #if PY_MAJOR_VERSION < 3
 
2929
  0, /*bf_getsegcount*/
 
2930
  #endif
 
2931
  #if PY_MAJOR_VERSION < 3
 
2932
  0, /*bf_getcharbuffer*/
 
2933
  #endif
 
2934
  #if PY_VERSION_HEX >= 0x02060000
 
2935
  0, /*bf_getbuffer*/
 
2936
  #endif
 
2937
  #if PY_VERSION_HEX >= 0x02060000
 
2938
  0, /*bf_releasebuffer*/
 
2939
  #endif
 
2940
};
 
2941
 
 
2942
PyTypeObject __pyx_type_4h5py_3h5l_LinkInfo = {
 
2943
  PyVarObject_HEAD_INIT(0, 0)
 
2944
  __Pyx_NAMESTR("h5py.h5l.LinkInfo"), /*tp_name*/
 
2945
  sizeof(struct __pyx_obj_4h5py_3h5l_LinkInfo), /*tp_basicsize*/
 
2946
  0, /*tp_itemsize*/
 
2947
  __pyx_tp_dealloc_4h5py_3h5l_LinkInfo, /*tp_dealloc*/
 
2948
  0, /*tp_print*/
 
2949
  0, /*tp_getattr*/
 
2950
  0, /*tp_setattr*/
 
2951
  0, /*tp_compare*/
 
2952
  0, /*tp_repr*/
 
2953
  &__pyx_tp_as_number_LinkInfo, /*tp_as_number*/
 
2954
  &__pyx_tp_as_sequence_LinkInfo, /*tp_as_sequence*/
 
2955
  &__pyx_tp_as_mapping_LinkInfo, /*tp_as_mapping*/
 
2956
  0, /*tp_hash*/
 
2957
  0, /*tp_call*/
 
2958
  0, /*tp_str*/
 
2959
  0, /*tp_getattro*/
 
2960
  0, /*tp_setattro*/
 
2961
  &__pyx_tp_as_buffer_LinkInfo, /*tp_as_buffer*/
 
2962
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
 
2963
  0, /*tp_doc*/
 
2964
  __pyx_tp_traverse_4h5py_3h5l_LinkInfo, /*tp_traverse*/
 
2965
  __pyx_tp_clear_4h5py_3h5l_LinkInfo, /*tp_clear*/
 
2966
  0, /*tp_richcompare*/
 
2967
  0, /*tp_weaklistoffset*/
 
2968
  0, /*tp_iter*/
 
2969
  0, /*tp_iternext*/
 
2970
  __pyx_methods_4h5py_3h5l_LinkInfo, /*tp_methods*/
 
2971
  0, /*tp_members*/
 
2972
  __pyx_getsets_4h5py_3h5l_LinkInfo, /*tp_getset*/
 
2973
  0, /*tp_base*/
 
2974
  0, /*tp_dict*/
 
2975
  0, /*tp_descr_get*/
 
2976
  0, /*tp_descr_set*/
 
2977
  0, /*tp_dictoffset*/
 
2978
  0, /*tp_init*/
 
2979
  0, /*tp_alloc*/
 
2980
  __pyx_tp_new_4h5py_3h5l_LinkInfo, /*tp_new*/
 
2981
  0, /*tp_free*/
 
2982
  0, /*tp_is_gc*/
 
2983
  0, /*tp_bases*/
 
2984
  0, /*tp_mro*/
 
2985
  0, /*tp_cache*/
 
2986
  0, /*tp_subclasses*/
 
2987
  0, /*tp_weaklist*/
 
2988
  0, /*tp_del*/
 
2989
  #if PY_VERSION_HEX >= 0x02060000
 
2990
  0, /*tp_version_tag*/
 
2991
  #endif
 
2992
};
 
2993
 
 
2994
static PyObject *__pyx_tp_new_4h5py_3h5l__LinkVisitor(PyTypeObject *t, PyObject *a, PyObject *k) {
 
2995
  struct __pyx_obj_4h5py_3h5l__LinkVisitor *p;
 
2996
  PyObject *o = (*t->tp_alloc)(t, 0);
 
2997
  if (!o) return 0;
 
2998
  p = ((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)o);
 
2999
  p->func = Py_None; Py_INCREF(Py_None);
 
3000
  p->retval = Py_None; Py_INCREF(Py_None);
 
3001
  p->info = ((struct __pyx_obj_4h5py_3h5l_LinkInfo *)Py_None); Py_INCREF(Py_None);
 
3002
  return o;
 
3003
}
 
3004
 
 
3005
static void __pyx_tp_dealloc_4h5py_3h5l__LinkVisitor(PyObject *o) {
 
3006
  struct __pyx_obj_4h5py_3h5l__LinkVisitor *p = (struct __pyx_obj_4h5py_3h5l__LinkVisitor *)o;
 
3007
  Py_XDECREF(p->func);
 
3008
  Py_XDECREF(p->retval);
 
3009
  Py_XDECREF(((PyObject *)p->info));
 
3010
  (*Py_TYPE(o)->tp_free)(o);
 
3011
}
 
3012
 
 
3013
static int __pyx_tp_traverse_4h5py_3h5l__LinkVisitor(PyObject *o, visitproc v, void *a) {
 
3014
  int e;
 
3015
  struct __pyx_obj_4h5py_3h5l__LinkVisitor *p = (struct __pyx_obj_4h5py_3h5l__LinkVisitor *)o;
 
3016
  if (p->func) {
 
3017
    e = (*v)(p->func, a); if (e) return e;
 
3018
  }
 
3019
  if (p->retval) {
 
3020
    e = (*v)(p->retval, a); if (e) return e;
 
3021
  }
 
3022
  if (p->info) {
 
3023
    e = (*v)(((PyObject*)p->info), a); if (e) return e;
 
3024
  }
 
3025
  return 0;
 
3026
}
 
3027
 
 
3028
static int __pyx_tp_clear_4h5py_3h5l__LinkVisitor(PyObject *o) {
 
3029
  struct __pyx_obj_4h5py_3h5l__LinkVisitor *p = (struct __pyx_obj_4h5py_3h5l__LinkVisitor *)o;
 
3030
  PyObject* tmp;
 
3031
  tmp = ((PyObject*)p->func);
 
3032
  p->func = Py_None; Py_INCREF(Py_None);
 
3033
  Py_XDECREF(tmp);
 
3034
  tmp = ((PyObject*)p->retval);
 
3035
  p->retval = Py_None; Py_INCREF(Py_None);
 
3036
  Py_XDECREF(tmp);
 
3037
  tmp = ((PyObject*)p->info);
 
3038
  p->info = ((struct __pyx_obj_4h5py_3h5l_LinkInfo *)Py_None); Py_INCREF(Py_None);
 
3039
  Py_XDECREF(tmp);
 
3040
  return 0;
 
3041
}
 
3042
 
 
3043
static struct PyMethodDef __pyx_methods_4h5py_3h5l__LinkVisitor[] = {
 
3044
  {0, 0, 0, 0}
 
3045
};
 
3046
 
 
3047
static PyNumberMethods __pyx_tp_as_number__LinkVisitor = {
 
3048
  0, /*nb_add*/
 
3049
  0, /*nb_subtract*/
 
3050
  0, /*nb_multiply*/
 
3051
  #if PY_MAJOR_VERSION < 3
 
3052
  0, /*nb_divide*/
 
3053
  #endif
 
3054
  0, /*nb_remainder*/
 
3055
  0, /*nb_divmod*/
 
3056
  0, /*nb_power*/
 
3057
  0, /*nb_negative*/
 
3058
  0, /*nb_positive*/
 
3059
  0, /*nb_absolute*/
 
3060
  0, /*nb_nonzero*/
 
3061
  0, /*nb_invert*/
 
3062
  0, /*nb_lshift*/
 
3063
  0, /*nb_rshift*/
 
3064
  0, /*nb_and*/
 
3065
  0, /*nb_xor*/
 
3066
  0, /*nb_or*/
 
3067
  #if PY_MAJOR_VERSION < 3
 
3068
  0, /*nb_coerce*/
 
3069
  #endif
 
3070
  0, /*nb_int*/
 
3071
  #if PY_MAJOR_VERSION >= 3
 
3072
  0, /*reserved*/
 
3073
  #else
 
3074
  0, /*nb_long*/
 
3075
  #endif
 
3076
  0, /*nb_float*/
 
3077
  #if PY_MAJOR_VERSION < 3
 
3078
  0, /*nb_oct*/
 
3079
  #endif
 
3080
  #if PY_MAJOR_VERSION < 3
 
3081
  0, /*nb_hex*/
 
3082
  #endif
 
3083
  0, /*nb_inplace_add*/
 
3084
  0, /*nb_inplace_subtract*/
 
3085
  0, /*nb_inplace_multiply*/
 
3086
  #if PY_MAJOR_VERSION < 3
 
3087
  0, /*nb_inplace_divide*/
 
3088
  #endif
 
3089
  0, /*nb_inplace_remainder*/
 
3090
  0, /*nb_inplace_power*/
 
3091
  0, /*nb_inplace_lshift*/
 
3092
  0, /*nb_inplace_rshift*/
 
3093
  0, /*nb_inplace_and*/
 
3094
  0, /*nb_inplace_xor*/
 
3095
  0, /*nb_inplace_or*/
 
3096
  0, /*nb_floor_divide*/
 
3097
  0, /*nb_true_divide*/
 
3098
  0, /*nb_inplace_floor_divide*/
 
3099
  0, /*nb_inplace_true_divide*/
 
3100
  #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
 
3101
  0, /*nb_index*/
 
3102
  #endif
 
3103
};
 
3104
 
 
3105
static PySequenceMethods __pyx_tp_as_sequence__LinkVisitor = {
 
3106
  0, /*sq_length*/
 
3107
  0, /*sq_concat*/
 
3108
  0, /*sq_repeat*/
 
3109
  0, /*sq_item*/
 
3110
  0, /*sq_slice*/
 
3111
  0, /*sq_ass_item*/
 
3112
  0, /*sq_ass_slice*/
 
3113
  0, /*sq_contains*/
 
3114
  0, /*sq_inplace_concat*/
 
3115
  0, /*sq_inplace_repeat*/
 
3116
};
 
3117
 
 
3118
static PyMappingMethods __pyx_tp_as_mapping__LinkVisitor = {
 
3119
  0, /*mp_length*/
 
3120
  0, /*mp_subscript*/
 
3121
  0, /*mp_ass_subscript*/
 
3122
};
 
3123
 
 
3124
static PyBufferProcs __pyx_tp_as_buffer__LinkVisitor = {
 
3125
  #if PY_MAJOR_VERSION < 3
 
3126
  0, /*bf_getreadbuffer*/
 
3127
  #endif
 
3128
  #if PY_MAJOR_VERSION < 3
 
3129
  0, /*bf_getwritebuffer*/
 
3130
  #endif
 
3131
  #if PY_MAJOR_VERSION < 3
 
3132
  0, /*bf_getsegcount*/
 
3133
  #endif
 
3134
  #if PY_MAJOR_VERSION < 3
 
3135
  0, /*bf_getcharbuffer*/
 
3136
  #endif
 
3137
  #if PY_VERSION_HEX >= 0x02060000
 
3138
  0, /*bf_getbuffer*/
 
3139
  #endif
 
3140
  #if PY_VERSION_HEX >= 0x02060000
 
3141
  0, /*bf_releasebuffer*/
 
3142
  #endif
 
3143
};
 
3144
 
 
3145
PyTypeObject __pyx_type_4h5py_3h5l__LinkVisitor = {
 
3146
  PyVarObject_HEAD_INIT(0, 0)
 
3147
  __Pyx_NAMESTR("h5py.h5l._LinkVisitor"), /*tp_name*/
 
3148
  sizeof(struct __pyx_obj_4h5py_3h5l__LinkVisitor), /*tp_basicsize*/
 
3149
  0, /*tp_itemsize*/
 
3150
  __pyx_tp_dealloc_4h5py_3h5l__LinkVisitor, /*tp_dealloc*/
 
3151
  0, /*tp_print*/
 
3152
  0, /*tp_getattr*/
 
3153
  0, /*tp_setattr*/
 
3154
  0, /*tp_compare*/
 
3155
  0, /*tp_repr*/
 
3156
  &__pyx_tp_as_number__LinkVisitor, /*tp_as_number*/
 
3157
  &__pyx_tp_as_sequence__LinkVisitor, /*tp_as_sequence*/
 
3158
  &__pyx_tp_as_mapping__LinkVisitor, /*tp_as_mapping*/
 
3159
  0, /*tp_hash*/
 
3160
  0, /*tp_call*/
 
3161
  0, /*tp_str*/
 
3162
  0, /*tp_getattro*/
 
3163
  0, /*tp_setattro*/
 
3164
  &__pyx_tp_as_buffer__LinkVisitor, /*tp_as_buffer*/
 
3165
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
 
3166
  __Pyx_DOCSTR(" Helper class for iteration callback "), /*tp_doc*/
 
3167
  __pyx_tp_traverse_4h5py_3h5l__LinkVisitor, /*tp_traverse*/
 
3168
  __pyx_tp_clear_4h5py_3h5l__LinkVisitor, /*tp_clear*/
 
3169
  0, /*tp_richcompare*/
 
3170
  0, /*tp_weaklistoffset*/
 
3171
  0, /*tp_iter*/
 
3172
  0, /*tp_iternext*/
 
3173
  __pyx_methods_4h5py_3h5l__LinkVisitor, /*tp_methods*/
 
3174
  0, /*tp_members*/
 
3175
  0, /*tp_getset*/
 
3176
  0, /*tp_base*/
 
3177
  0, /*tp_dict*/
 
3178
  0, /*tp_descr_get*/
 
3179
  0, /*tp_descr_set*/
 
3180
  0, /*tp_dictoffset*/
 
3181
  __pyx_pf_4h5py_3h5l_12_LinkVisitor___init__, /*tp_init*/
 
3182
  0, /*tp_alloc*/
 
3183
  __pyx_tp_new_4h5py_3h5l__LinkVisitor, /*tp_new*/
 
3184
  0, /*tp_free*/
 
3185
  0, /*tp_is_gc*/
 
3186
  0, /*tp_bases*/
 
3187
  0, /*tp_mro*/
 
3188
  0, /*tp_cache*/
 
3189
  0, /*tp_subclasses*/
 
3190
  0, /*tp_weaklist*/
 
3191
  0, /*tp_del*/
 
3192
  #if PY_VERSION_HEX >= 0x02060000
 
3193
  0, /*tp_version_tag*/
 
3194
  #endif
 
3195
};
364
3196
 
365
3197
static struct PyMethodDef __pyx_methods[] = {
366
3198
  {0, 0, 0, 0}
383
3215
#endif
384
3216
 
385
3217
static __Pyx_StringTabEntry __pyx_string_tab[] = {
 
3218
  {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
 
3219
  {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
 
3220
  {&__pyx_n_s__NotImplemented, __pyx_k__NotImplemented, sizeof(__pyx_k__NotImplemented), 0, 0, 1, 1},
 
3221
  {&__pyx_n_s__TYPE_EXTERNAL, __pyx_k__TYPE_EXTERNAL, sizeof(__pyx_k__TYPE_EXTERNAL), 0, 0, 1, 1},
 
3222
  {&__pyx_n_s__TYPE_HARD, __pyx_k__TYPE_HARD, sizeof(__pyx_k__TYPE_HARD), 0, 0, 1, 1},
 
3223
  {&__pyx_n_s__TYPE_SOFT, __pyx_k__TYPE_SOFT, sizeof(__pyx_k__TYPE_SOFT), 0, 0, 1, 1},
 
3224
  {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
386
3225
  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
 
3226
  {&__pyx_n_s__address, __pyx_k__address, sizeof(__pyx_k__address), 0, 0, 1, 1},
 
3227
  {&__pyx_n_s__corder, __pyx_k__corder, sizeof(__pyx_k__corder), 0, 0, 1, 1},
 
3228
  {&__pyx_n_s__corder_valid, __pyx_k__corder_valid, sizeof(__pyx_k__corder_valid), 0, 0, 1, 1},
 
3229
  {&__pyx_n_s__cset, __pyx_k__cset, sizeof(__pyx_k__cset), 0, 0, 1, 1},
 
3230
  {&__pyx_n_s__cur_loc, __pyx_k__cur_loc, sizeof(__pyx_k__cur_loc), 0, 0, 1, 1},
 
3231
  {&__pyx_n_s__cur_name, __pyx_k__cur_name, sizeof(__pyx_k__cur_name), 0, 0, 1, 1},
 
3232
  {&__pyx_n_s__file_name, __pyx_k__file_name, sizeof(__pyx_k__file_name), 0, 0, 1, 1},
 
3233
  {&__pyx_n_s__func, __pyx_k__func, sizeof(__pyx_k__func), 0, 0, 1, 1},
 
3234
  {&__pyx_n_s__id, __pyx_k__id, sizeof(__pyx_k__id), 0, 0, 1, 1},
 
3235
  {&__pyx_n_s__id_, __pyx_k__id_, sizeof(__pyx_k__id_), 0, 0, 1, 1},
 
3236
  {&__pyx_n_s__idx_type, __pyx_k__idx_type, sizeof(__pyx_k__idx_type), 0, 0, 1, 1},
 
3237
  {&__pyx_n_s__index, __pyx_k__index, sizeof(__pyx_k__index), 0, 0, 1, 1},
 
3238
  {&__pyx_n_s__info, __pyx_k__info, sizeof(__pyx_k__info), 0, 0, 1, 1},
 
3239
  {&__pyx_n_s__infostruct, __pyx_k__infostruct, sizeof(__pyx_k__infostruct), 0, 0, 1, 1},
 
3240
  {&__pyx_n_s__lapl, __pyx_k__lapl, sizeof(__pyx_k__lapl), 0, 0, 1, 1},
 
3241
  {&__pyx_n_s__lcpl, __pyx_k__lcpl, sizeof(__pyx_k__lcpl), 0, 0, 1, 1},
 
3242
  {&__pyx_n_s__link_name, __pyx_k__link_name, sizeof(__pyx_k__link_name), 0, 0, 1, 1},
 
3243
  {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1},
 
3244
  {&__pyx_n_s__new_name, __pyx_k__new_name, sizeof(__pyx_k__new_name), 0, 0, 1, 1},
 
3245
  {&__pyx_n_s__obj_name, __pyx_k__obj_name, sizeof(__pyx_k__obj_name), 0, 0, 1, 1},
 
3246
  {&__pyx_n_s__order, __pyx_k__order, sizeof(__pyx_k__order), 0, 0, 1, 1},
 
3247
  {&__pyx_n_s__retval, __pyx_k__retval, sizeof(__pyx_k__retval), 0, 0, 1, 1},
 
3248
  {&__pyx_n_s__target, __pyx_k__target, sizeof(__pyx_k__target), 0, 0, 1, 1},
 
3249
  {&__pyx_n_s__type, __pyx_k__type, sizeof(__pyx_k__type), 0, 0, 1, 1},
 
3250
  {&__pyx_n_s__u, __pyx_k__u, sizeof(__pyx_k__u), 0, 0, 1, 1},
 
3251
  {&__pyx_n_s__val_size, __pyx_k__val_size, sizeof(__pyx_k__val_size), 0, 0, 1, 1},
387
3252
  {0, 0, 0, 0, 0, 0, 0}
388
3253
};
389
3254
static int __Pyx_InitCachedBuiltins(void) {
 
3255
  __pyx_builtin_NotImplemented = __Pyx_GetName(__pyx_b, __pyx_n_s__NotImplemented); if (!__pyx_builtin_NotImplemented) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3256
  __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
390
3257
  return 0;
 
3258
  __pyx_L1_error:;
391
3259
  return -1;
392
3260
}
393
3261
 
394
3262
static int __Pyx_InitGlobals(void) {
395
 
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
3263
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
396
3264
  return 0;
397
3265
  __pyx_L1_error:;
398
3266
  return -1;
406
3274
PyMODINIT_FUNC PyInit_h5l(void)
407
3275
#endif
408
3276
{
 
3277
  PyObject *__pyx_t_1 = NULL;
 
3278
  PyObject *__pyx_t_2 = NULL;
 
3279
  PyObject *__pyx_t_3 = NULL;
 
3280
  int __pyx_t_4;
 
3281
  PyObject *__pyx_t_5 = NULL;
409
3282
  #if CYTHON_REFNANNY
410
3283
  void* __pyx_refnanny = NULL;
411
3284
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
418
3291
  __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_h5l(void)", __LINE__, __FILE__);
419
3292
  #endif
420
3293
  __pyx_init_filenames();
421
 
  __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;}
 
3294
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
422
3295
  #if PY_MAJOR_VERSION < 3
423
 
  __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;}
 
3296
  __pyx_empty_bytes = PyString_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
424
3297
  #else
425
 
  __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;}
 
3298
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
426
3299
  #endif
427
3300
  /*--- Library function declarations ---*/
428
3301
  /*--- Threads initialization code ---*/
437
3310
  #else
438
3311
  __pyx_m = PyModule_Create(&__pyx_moduledef);
439
3312
  #endif
440
 
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
3313
  if (!__pyx_m) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
441
3314
  #if PY_MAJOR_VERSION < 3
442
3315
  Py_INCREF(__pyx_m);
443
3316
  #endif
444
3317
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
445
 
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
446
 
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
3318
  if (!__pyx_b) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
3319
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
447
3320
  /*--- Initialize various global constants etc. ---*/
448
 
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3321
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
449
3322
  if (__pyx_module_is_main_h5py__h5l) {
450
 
    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;};
 
3323
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
451
3324
  }
452
3325
  /*--- Builtin init code ---*/
453
 
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3326
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
454
3327
  /*--- Global init code ---*/
455
3328
  /*--- Function export code ---*/
456
3329
  /*--- Type init code ---*/
 
3330
  if (PyType_Ready(&__pyx_type_4h5py_3h5l_LinkProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3331
  if (__Pyx_SetAttrString(__pyx_m, "LinkProxy", (PyObject *)&__pyx_type_4h5py_3h5l_LinkProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3332
  __pyx_ptype_4h5py_3h5l_LinkProxy = &__pyx_type_4h5py_3h5l_LinkProxy;
 
3333
  __pyx_ptype_4h5py_2h5_SmartStruct = __Pyx_ImportType("h5py.h5", "SmartStruct", sizeof(struct __pyx_obj_4h5py_2h5_SmartStruct), 1); if (unlikely(!__pyx_ptype_4h5py_2h5_SmartStruct)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3334
  __pyx_type_4h5py_3h5l_LinkInfo.tp_base = __pyx_ptype_4h5py_2h5_SmartStruct;
 
3335
  if (PyType_Ready(&__pyx_type_4h5py_3h5l_LinkInfo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3336
  if (__Pyx_SetAttrString(__pyx_m, "LinkInfo", (PyObject *)&__pyx_type_4h5py_3h5l_LinkInfo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3337
  if (__pyx_type_4h5py_3h5l_LinkInfo.tp_weaklistoffset == 0) __pyx_type_4h5py_3h5l_LinkInfo.tp_weaklistoffset = offsetof(struct __pyx_obj_4h5py_3h5l_LinkInfo, __pyx_base.__weakref__);
 
3338
  __pyx_ptype_4h5py_3h5l_LinkInfo = &__pyx_type_4h5py_3h5l_LinkInfo;
 
3339
  if (PyType_Ready(&__pyx_type_4h5py_3h5l__LinkVisitor) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3340
  if (__Pyx_SetAttrString(__pyx_m, "_LinkVisitor", (PyObject *)&__pyx_type_4h5py_3h5l__LinkVisitor) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3341
  __pyx_ptype_4h5py_3h5l__LinkVisitor = &__pyx_type_4h5py_3h5l__LinkVisitor;
457
3342
  /*--- Type import code ---*/
 
3343
  __pyx_ptype_4h5py_2h5_H5PYConfig = __Pyx_ImportType("h5py.h5", "H5PYConfig", sizeof(struct __pyx_obj_4h5py_2h5_H5PYConfig), 1); if (unlikely(!__pyx_ptype_4h5py_2h5_H5PYConfig)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3344
  __pyx_ptype_4h5py_2h5_IDProxy = __Pyx_ImportType("h5py.h5", "IDProxy", sizeof(struct __pyx_obj_4h5py_2h5_IDProxy), 1); if (unlikely(!__pyx_ptype_4h5py_2h5_IDProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3345
  __pyx_ptype_4h5py_2h5_ObjectID = __Pyx_ImportType("h5py.h5", "ObjectID", sizeof(struct __pyx_obj_4h5py_2h5_ObjectID), 1); if (unlikely(!__pyx_ptype_4h5py_2h5_ObjectID)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3346
  __pyx_ptype_4h5py_3h5p_PropID = __Pyx_ImportType("h5py.h5p", "PropID", sizeof(struct __pyx_obj_4h5py_3h5p_PropID), 1); if (unlikely(!__pyx_ptype_4h5py_3h5p_PropID)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3347
  __pyx_ptype_4h5py_3h5p_PropClassID = __Pyx_ImportType("h5py.h5p", "PropClassID", sizeof(struct __pyx_obj_4h5py_3h5p_PropClassID), 1); if (unlikely(!__pyx_ptype_4h5py_3h5p_PropClassID)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3348
  __pyx_ptype_4h5py_3h5p_PropInstanceID = __Pyx_ImportType("h5py.h5p", "PropInstanceID", sizeof(struct __pyx_obj_4h5py_3h5p_PropInstanceID), 1); if (unlikely(!__pyx_ptype_4h5py_3h5p_PropInstanceID)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3349
  __pyx_ptype_4h5py_3h5p_PropCreateID = __Pyx_ImportType("h5py.h5p", "PropCreateID", sizeof(struct __pyx_obj_4h5py_3h5p_PropCreateID), 1); if (unlikely(!__pyx_ptype_4h5py_3h5p_PropCreateID)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3350
  __pyx_ptype_4h5py_3h5p_PropCopyID = __Pyx_ImportType("h5py.h5p", "PropCopyID", sizeof(struct __pyx_obj_4h5py_3h5p_PropCopyID), 1); if (unlikely(!__pyx_ptype_4h5py_3h5p_PropCopyID)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3351
  __pyx_ptype_4h5py_3h5p_PropDCID = __Pyx_ImportType("h5py.h5p", "PropDCID", sizeof(struct __pyx_obj_4h5py_3h5p_PropDCID), 1); if (unlikely(!__pyx_ptype_4h5py_3h5p_PropDCID)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3352
  __pyx_ptype_4h5py_3h5p_PropFCID = __Pyx_ImportType("h5py.h5p", "PropFCID", sizeof(struct __pyx_obj_4h5py_3h5p_PropFCID), 1); if (unlikely(!__pyx_ptype_4h5py_3h5p_PropFCID)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3353
  __pyx_ptype_4h5py_3h5p_PropFAID = __Pyx_ImportType("h5py.h5p", "PropFAID", sizeof(struct __pyx_obj_4h5py_3h5p_PropFAID), 1); if (unlikely(!__pyx_ptype_4h5py_3h5p_PropFAID)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3354
  __pyx_ptype_4h5py_3h5p_PropDXID = __Pyx_ImportType("h5py.h5p", "PropDXID", sizeof(struct __pyx_obj_4h5py_3h5p_PropDXID), 1); if (unlikely(!__pyx_ptype_4h5py_3h5p_PropDXID)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3355
  __pyx_ptype_4h5py_3h5p_PropLCID = __Pyx_ImportType("h5py.h5p", "PropLCID", sizeof(struct __pyx_obj_4h5py_3h5p_PropLCID), 1); if (unlikely(!__pyx_ptype_4h5py_3h5p_PropLCID)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3356
  __pyx_ptype_4h5py_3h5p_PropLAID = __Pyx_ImportType("h5py.h5p", "PropLAID", sizeof(struct __pyx_obj_4h5py_3h5p_PropLAID), 1); if (unlikely(!__pyx_ptype_4h5py_3h5p_PropLAID)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3357
  __pyx_ptype_4h5py_3h5p_PropGCID = __Pyx_ImportType("h5py.h5p", "PropGCID", sizeof(struct __pyx_obj_4h5py_3h5p_PropGCID), 1); if (unlikely(!__pyx_ptype_4h5py_3h5p_PropGCID)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3358
  __pyx_ptype_4h5py_3h5g_GroupID = __Pyx_ImportType("h5py.h5g", "GroupID", sizeof(struct __pyx_obj_4h5py_3h5g_GroupID), 1); if (unlikely(!__pyx_ptype_4h5py_3h5g_GroupID)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3359
  __pyx_ptype_4h5py_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_4h5py_5numpy_dtype)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3360
  __pyx_ptype_4h5py_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_4h5py_5numpy_ndarray)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
458
3361
  /*--- Function import code ---*/
 
3362
  __pyx_t_1 = __Pyx_ImportModule("h5py.h5"); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3363
  if (__Pyx_ImportFunction(__pyx_t_1, "get_config", (void (**)(void))&__pyx_f_4h5py_2h5_get_config, "struct __pyx_obj_4h5py_2h5_H5PYConfig *(int __pyx_skip_dispatch)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3364
  if (__Pyx_ImportFunction(__pyx_t_1, "init_hdf5", (void (**)(void))&__pyx_f_4h5py_2h5_init_hdf5, "int (void)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3365
  Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
3366
  __pyx_t_2 = __Pyx_ImportModule("h5py.h5p"); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3367
  if (__Pyx_ImportFunction(__pyx_t_2, "pdefault", (void (**)(void))&__pyx_f_4h5py_3h5p_pdefault, "hid_t (struct __pyx_obj_4h5py_3h5p_PropID *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3368
  if (__Pyx_ImportFunction(__pyx_t_2, "propwrap", (void (**)(void))&__pyx_f_4h5py_3h5p_propwrap, "PyObject *(hid_t)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3369
  Py_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3370
  __pyx_t_3 = __Pyx_ImportModule("h5py.utils"); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3371
  if (__Pyx_ImportFunction(__pyx_t_3, "emalloc", (void (**)(void))&__pyx_f_4h5py_5utils_emalloc, "void *(size_t)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3372
  if (__Pyx_ImportFunction(__pyx_t_3, "efree", (void (**)(void))&__pyx_f_4h5py_5utils_efree, "void (void *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3373
  if (__Pyx_ImportFunction(__pyx_t_3, "check_numpy_read", (void (**)(void))&__pyx_f_4h5py_5utils_check_numpy_read, "int (PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_4h5py_5utils_check_numpy_read *__pyx_optional_args)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3374
  if (__Pyx_ImportFunction(__pyx_t_3, "check_numpy_write", (void (**)(void))&__pyx_f_4h5py_5utils_check_numpy_write, "int (PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_4h5py_5utils_check_numpy_write *__pyx_optional_args)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3375
  if (__Pyx_ImportFunction(__pyx_t_3, "convert_tuple", (void (**)(void))&__pyx_f_4h5py_5utils_convert_tuple, "int (PyObject *, hsize_t *, hsize_t)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3376
  if (__Pyx_ImportFunction(__pyx_t_3, "convert_dims", (void (**)(void))&__pyx_f_4h5py_5utils_convert_dims, "PyObject *(hsize_t *, hsize_t)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3377
  if (__Pyx_ImportFunction(__pyx_t_3, "require_tuple", (void (**)(void))&__pyx_f_4h5py_5utils_require_tuple, "int (PyObject *, int, int, char *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3378
  if (__Pyx_ImportFunction(__pyx_t_3, "create_numpy_hsize", (void (**)(void))&__pyx_f_4h5py_5utils_create_numpy_hsize, "PyObject *(int, hsize_t *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3379
  if (__Pyx_ImportFunction(__pyx_t_3, "create_hsize_array", (void (**)(void))&__pyx_f_4h5py_5utils_create_hsize_array, "PyObject *(PyObject *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3380
  Py_DECREF(__pyx_t_3); __pyx_t_3 = 0;
459
3381
  /*--- Execution code ---*/
460
3382
 
461
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5l.pxd":1
 
3383
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":25
 
3384
 * from utils cimport emalloc, efree
 
3385
 * 
 
3386
 * init_hdf5()             # <<<<<<<<<<<<<<
 
3387
 * 
 
3388
 * # === Public constants ========================================================
 
3389
 */
 
3390
  __pyx_t_4 = __pyx_f_4h5py_2h5_init_hdf5(); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3391
 
 
3392
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":29
 
3393
 * # === Public constants ========================================================
 
3394
 * 
 
3395
 * TYPE_HARD = H5L_TYPE_HARD             # <<<<<<<<<<<<<<
 
3396
 * TYPE_SOFT = H5L_TYPE_SOFT
 
3397
 * TYPE_EXTERNAL = H5L_TYPE_EXTERNAL
 
3398
 */
 
3399
  __pyx_t_5 = PyInt_FromLong(H5L_TYPE_HARD); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3400
  __Pyx_GOTREF(__pyx_t_5);
 
3401
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__TYPE_HARD, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3402
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
3403
 
 
3404
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":30
 
3405
 * 
 
3406
 * TYPE_HARD = H5L_TYPE_HARD
 
3407
 * TYPE_SOFT = H5L_TYPE_SOFT             # <<<<<<<<<<<<<<
 
3408
 * TYPE_EXTERNAL = H5L_TYPE_EXTERNAL
 
3409
 * 
 
3410
 */
 
3411
  __pyx_t_5 = PyInt_FromLong(H5L_TYPE_SOFT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3412
  __Pyx_GOTREF(__pyx_t_5);
 
3413
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__TYPE_SOFT, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3414
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
3415
 
 
3416
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":31
 
3417
 * TYPE_HARD = H5L_TYPE_HARD
 
3418
 * TYPE_SOFT = H5L_TYPE_SOFT
 
3419
 * TYPE_EXTERNAL = H5L_TYPE_EXTERNAL             # <<<<<<<<<<<<<<
 
3420
 * 
 
3421
 * cdef class LinkInfo(SmartStruct):
 
3422
 */
 
3423
  __pyx_t_5 = PyInt_FromLong(H5L_TYPE_EXTERNAL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3424
  __Pyx_GOTREF(__pyx_t_5);
 
3425
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__TYPE_EXTERNAL, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3426
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
3427
 
 
3428
  /* "/home/tachyon/h5py/h5py/h5l_body.pyx":214
 
3429
 * 
 
3430
 *     def visit(self, object func, *,
 
3431
 *               int idx_type=H5_INDEX_NAME, int order=H5_ITER_NATIVE,             # <<<<<<<<<<<<<<
 
3432
 *               char* obj_name='.', PropID lapl=None, bint info=0):
 
3433
 *         """(CALLABLE func, **kwds) => <Return value from func>
 
3434
 */
 
3435
  __pyx_k_3 = H5_INDEX_NAME;
 
3436
  __pyx_k_4 = H5_ITER_NATIVE;
 
3437
 
 
3438
  /* "/home/tachyon/h5py/h5py/numpy.pxd":1
462
3439
 * #+             # <<<<<<<<<<<<<<
463
3440
 * #
464
3441
 * # This file is part of h5py, a low-level Python interface to the HDF5 library.
465
3442
 */
466
3443
  goto __pyx_L0;
467
3444
  __pyx_L1_error:;
 
3445
  __Pyx_XDECREF(__pyx_t_1);
 
3446
  __Pyx_XDECREF(__pyx_t_2);
 
3447
  __Pyx_XDECREF(__pyx_t_3);
 
3448
  __Pyx_XDECREF(__pyx_t_5);
468
3449
  if (__pyx_m) {
469
3450
    __Pyx_AddTraceback("init h5py.h5l");
470
3451
    Py_DECREF(__pyx_m); __pyx_m = 0;
481
3462
}
482
3463
 
483
3464
static const char *__pyx_filenames[] = {
 
3465
  "h5l_body.pyx",
484
3466
  "h5l.pyx",
 
3467
  "h5.pxd",
 
3468
  "h5p.pxd",
 
3469
  "h5g.pxd",
 
3470
  "numpy.pxd",
485
3471
};
486
3472
 
487
3473
/* Runtime support code */
490
3476
  __pyx_f = __pyx_filenames;
491
3477
}
492
3478
 
493
 
static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
 
3479
static void __Pyx_RaiseDoubleKeywordsError(
 
3480
    const char* func_name,
 
3481
    PyObject* kw_name)
 
3482
{
 
3483
    PyErr_Format(PyExc_TypeError,
 
3484
        #if PY_MAJOR_VERSION >= 3
 
3485
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
 
3486
        #else
 
3487
        "%s() got multiple values for keyword argument '%s'", func_name,
 
3488
        PyString_AS_STRING(kw_name));
 
3489
        #endif
 
3490
}
 
3491
 
 
3492
static void __Pyx_RaiseArgtupleInvalid(
 
3493
    const char* func_name,
 
3494
    int exact,
 
3495
    Py_ssize_t num_min,
 
3496
    Py_ssize_t num_max,
 
3497
    Py_ssize_t num_found)
 
3498
{
 
3499
    Py_ssize_t num_expected;
 
3500
    const char *number, *more_or_less;
 
3501
 
 
3502
    if (num_found < num_min) {
 
3503
        num_expected = num_min;
 
3504
        more_or_less = "at least";
 
3505
    } else {
 
3506
        num_expected = num_max;
 
3507
        more_or_less = "at most";
 
3508
    }
 
3509
    if (exact) {
 
3510
        more_or_less = "exactly";
 
3511
    }
 
3512
    number = (num_expected == 1) ? "" : "s";
 
3513
    PyErr_Format(PyExc_TypeError,
 
3514
        #if PY_VERSION_HEX < 0x02050000
 
3515
            "%s() takes %s %d positional argument%s (%d given)",
 
3516
        #else
 
3517
            "%s() takes %s %zd positional argument%s (%zd given)",
 
3518
        #endif
 
3519
        func_name, more_or_less, num_expected, number, num_found);
 
3520
}
 
3521
 
 
3522
static int __Pyx_ParseOptionalKeywords(
 
3523
    PyObject *kwds,
 
3524
    PyObject **argnames[],
 
3525
    PyObject *kwds2,
 
3526
    PyObject *values[],
 
3527
    Py_ssize_t num_pos_args,
 
3528
    const char* function_name)
 
3529
{
 
3530
    PyObject *key = 0, *value = 0;
 
3531
    Py_ssize_t pos = 0;
 
3532
    PyObject*** name;
 
3533
    PyObject*** first_kw_arg = argnames + num_pos_args;
 
3534
 
 
3535
    while (PyDict_Next(kwds, &pos, &key, &value)) {
 
3536
        name = first_kw_arg;
 
3537
        while (*name && (**name != key)) name++;
 
3538
        if (*name) {
 
3539
            values[name-argnames] = value;
 
3540
        } else {
 
3541
            #if PY_MAJOR_VERSION < 3
 
3542
            if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
 
3543
            #else
 
3544
            if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
 
3545
            #endif
 
3546
                goto invalid_keyword_type;
 
3547
            } else {
 
3548
                for (name = first_kw_arg; *name; name++) {
 
3549
                    #if PY_MAJOR_VERSION >= 3
 
3550
                    if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
 
3551
                        PyUnicode_Compare(**name, key) == 0) break;
 
3552
                    #else
 
3553
                    if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
 
3554
                        _PyString_Eq(**name, key)) break;
 
3555
                    #endif
 
3556
                }
 
3557
                if (*name) {
 
3558
                    values[name-argnames] = value;
 
3559
                } else {
 
3560
                    /* unexpected keyword found */
 
3561
                    for (name=argnames; name != first_kw_arg; name++) {
 
3562
                        if (**name == key) goto arg_passed_twice;
 
3563
                        #if PY_MAJOR_VERSION >= 3
 
3564
                        if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
 
3565
                            PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
 
3566
                        #else
 
3567
                        if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
 
3568
                            _PyString_Eq(**name, key)) goto arg_passed_twice;
 
3569
                        #endif
 
3570
                    }
 
3571
                    if (kwds2) {
 
3572
                        if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
 
3573
                    } else {
 
3574
                        goto invalid_keyword;
 
3575
                    }
 
3576
                }
 
3577
            }
 
3578
        }
 
3579
    }
 
3580
    return 0;
 
3581
arg_passed_twice:
 
3582
    __Pyx_RaiseDoubleKeywordsError(function_name, **name);
 
3583
    goto bad;
 
3584
invalid_keyword_type:
 
3585
    PyErr_Format(PyExc_TypeError,
 
3586
        "%s() keywords must be strings", function_name);
 
3587
    goto bad;
 
3588
invalid_keyword:
 
3589
    PyErr_Format(PyExc_TypeError,
 
3590
    #if PY_MAJOR_VERSION < 3
 
3591
        "%s() got an unexpected keyword argument '%s'",
 
3592
        function_name, PyString_AsString(key));
 
3593
    #else
 
3594
        "%s() got an unexpected keyword argument '%U'",
 
3595
        function_name, key);
 
3596
    #endif
 
3597
bad:
 
3598
    return -1;
 
3599
}
 
3600
 
 
3601
static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
 
3602
    PyObject *tmp_type, *tmp_value, *tmp_tb;
 
3603
    PyThreadState *tstate = PyThreadState_GET();
 
3604
 
 
3605
    tmp_type = tstate->curexc_type;
 
3606
    tmp_value = tstate->curexc_value;
 
3607
    tmp_tb = tstate->curexc_traceback;
 
3608
    tstate->curexc_type = type;
 
3609
    tstate->curexc_value = value;
 
3610
    tstate->curexc_traceback = tb;
 
3611
    Py_XDECREF(tmp_type);
 
3612
    Py_XDECREF(tmp_value);
 
3613
    Py_XDECREF(tmp_tb);
 
3614
}
 
3615
 
 
3616
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
 
3617
    PyThreadState *tstate = PyThreadState_GET();
 
3618
    *type = tstate->curexc_type;
 
3619
    *value = tstate->curexc_value;
 
3620
    *tb = tstate->curexc_traceback;
 
3621
 
 
3622
    tstate->curexc_type = 0;
 
3623
    tstate->curexc_value = 0;
 
3624
    tstate->curexc_traceback = 0;
 
3625
}
 
3626
 
 
3627
 
 
3628
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
 
3629
    const char *name, int exact)
 
3630
{
 
3631
    if (!type) {
 
3632
        PyErr_Format(PyExc_SystemError, "Missing type object");
 
3633
        return 0;
 
3634
    }
 
3635
    if (none_allowed && obj == Py_None) return 1;
 
3636
    else if (exact) {
 
3637
        if (Py_TYPE(obj) == type) return 1;
 
3638
    }
 
3639
    else {
 
3640
        if (PyObject_TypeCheck(obj, type)) return 1;
 
3641
    }
 
3642
    PyErr_Format(PyExc_TypeError,
 
3643
        "Argument '%s' has incorrect type (expected %s, got %s)",
 
3644
        name, type->tp_name, Py_TYPE(obj)->tp_name);
 
3645
    return 0;
 
3646
}
 
3647
 
 
3648
static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_int64_t(int64_t val) {
 
3649
    const int64_t neg_one = (int64_t)-1, const_zero = 0;
 
3650
    const int is_unsigned = neg_one > const_zero;
 
3651
    if (sizeof(int64_t) <  sizeof(long)) {
 
3652
        return PyInt_FromLong((long)val);
 
3653
    } else if (sizeof(int64_t) == sizeof(long)) {
 
3654
        if (is_unsigned)
 
3655
            return PyLong_FromUnsignedLong((unsigned long)val);
 
3656
        else
 
3657
            return PyInt_FromLong((long)val);
 
3658
    } else { /* (sizeof(int64_t) > sizeof(long)) */
 
3659
        if (is_unsigned)
 
3660
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
 
3661
        else
 
3662
            return PyLong_FromLongLong((PY_LONG_LONG)val);
 
3663
    }
 
3664
}
 
3665
 
 
3666
static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_haddr_t(haddr_t val) {
 
3667
    const haddr_t neg_one = (haddr_t)-1, const_zero = 0;
 
3668
    const int is_unsigned = neg_one > const_zero;
 
3669
    if (sizeof(haddr_t) <  sizeof(long)) {
 
3670
        return PyInt_FromLong((long)val);
 
3671
    } else if (sizeof(haddr_t) == sizeof(long)) {
 
3672
        if (is_unsigned)
 
3673
            return PyLong_FromUnsignedLong((unsigned long)val);
 
3674
        else
 
3675
            return PyInt_FromLong((long)val);
 
3676
    } else { /* (sizeof(haddr_t) > sizeof(long)) */
 
3677
        if (is_unsigned)
 
3678
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
 
3679
        else
 
3680
            return PyLong_FromLongLong((PY_LONG_LONG)val);
 
3681
    }
 
3682
}
 
3683
 
 
3684
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
 
3685
    PyObject *result;
 
3686
    result = PyObject_GetAttr(dict, name);
 
3687
    if (!result)
 
3688
        PyErr_SetObject(PyExc_NameError, name);
 
3689
    return result;
 
3690
}
 
3691
 
 
3692
#if PY_MAJOR_VERSION < 3
 
3693
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
 
3694
    Py_XINCREF(type);
 
3695
    Py_XINCREF(value);
 
3696
    Py_XINCREF(tb);
 
3697
    /* First, check the traceback argument, replacing None with NULL. */
 
3698
    if (tb == Py_None) {
 
3699
        Py_DECREF(tb);
 
3700
        tb = 0;
 
3701
    }
 
3702
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
 
3703
        PyErr_SetString(PyExc_TypeError,
 
3704
            "raise: arg 3 must be a traceback or None");
 
3705
        goto raise_error;
 
3706
    }
 
3707
    /* Next, replace a missing value with None */
 
3708
    if (value == NULL) {
 
3709
        value = Py_None;
 
3710
        Py_INCREF(value);
 
3711
    }
 
3712
    #if PY_VERSION_HEX < 0x02050000
 
3713
    if (!PyClass_Check(type))
 
3714
    #else
 
3715
    if (!PyType_Check(type))
 
3716
    #endif
 
3717
    {
 
3718
        /* Raising an instance.  The value should be a dummy. */
 
3719
        if (value != Py_None) {
 
3720
            PyErr_SetString(PyExc_TypeError,
 
3721
                "instance exception may not have a separate value");
 
3722
            goto raise_error;
 
3723
        }
 
3724
        /* Normalize to raise <class>, <instance> */
 
3725
        Py_DECREF(value);
 
3726
        value = type;
 
3727
        #if PY_VERSION_HEX < 0x02050000
 
3728
            if (PyInstance_Check(type)) {
 
3729
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
 
3730
                Py_INCREF(type);
 
3731
            }
 
3732
            else {
 
3733
                type = 0;
 
3734
                PyErr_SetString(PyExc_TypeError,
 
3735
                    "raise: exception must be an old-style class or instance");
 
3736
                goto raise_error;
 
3737
            }
 
3738
        #else
 
3739
            type = (PyObject*) Py_TYPE(type);
 
3740
            Py_INCREF(type);
 
3741
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
 
3742
                PyErr_SetString(PyExc_TypeError,
 
3743
                    "raise: exception class must be a subclass of BaseException");
 
3744
                goto raise_error;
 
3745
            }
 
3746
        #endif
 
3747
    }
 
3748
 
 
3749
    __Pyx_ErrRestore(type, value, tb);
 
3750
    return;
 
3751
raise_error:
 
3752
    Py_XDECREF(value);
 
3753
    Py_XDECREF(type);
 
3754
    Py_XDECREF(tb);
 
3755
    return;
 
3756
}
 
3757
 
 
3758
#else /* Python 3+ */
 
3759
 
 
3760
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
 
3761
    if (tb == Py_None) {
 
3762
        tb = 0;
 
3763
    } else if (tb && !PyTraceBack_Check(tb)) {
 
3764
        PyErr_SetString(PyExc_TypeError,
 
3765
            "raise: arg 3 must be a traceback or None");
 
3766
        goto bad;
 
3767
    }
 
3768
    if (value == Py_None)
 
3769
        value = 0;
 
3770
 
 
3771
    if (PyExceptionInstance_Check(type)) {
 
3772
        if (value) {
 
3773
            PyErr_SetString(PyExc_TypeError,
 
3774
                "instance exception may not have a separate value");
 
3775
            goto bad;
 
3776
        }
 
3777
        value = type;
 
3778
        type = (PyObject*) Py_TYPE(value);
 
3779
    } else if (!PyExceptionClass_Check(type)) {
 
3780
        PyErr_SetString(PyExc_TypeError,
 
3781
            "raise: exception class must be a subclass of BaseException");
 
3782
        goto bad;
 
3783
    }
 
3784
 
 
3785
    PyErr_SetObject(type, value);
 
3786
 
 
3787
    if (tb) {
 
3788
        PyThreadState *tstate = PyThreadState_GET();
 
3789
        PyObject* tmp_tb = tstate->curexc_traceback;
 
3790
        if (tb != tmp_tb) {
 
3791
            Py_INCREF(tb);
 
3792
            tstate->curexc_traceback = tb;
 
3793
            Py_XDECREF(tmp_tb);
 
3794
        }
 
3795
    }
 
3796
 
 
3797
bad:
 
3798
    return;
 
3799
}
 
3800
#endif
 
3801
 
 
3802
static CYTHON_INLINE hid_t __Pyx_PyInt_from_py_hid_t(PyObject* x) {
 
3803
    const hid_t neg_one = (hid_t)-1, const_zero = 0;
 
3804
    const int is_unsigned = neg_one > const_zero;
 
3805
    if (sizeof(hid_t) == sizeof(char)) {
 
3806
        if (is_unsigned)
 
3807
            return (hid_t)__Pyx_PyInt_AsUnsignedChar(x);
 
3808
        else
 
3809
            return (hid_t)__Pyx_PyInt_AsSignedChar(x);
 
3810
    } else if (sizeof(hid_t) == sizeof(short)) {
 
3811
        if (is_unsigned)
 
3812
            return (hid_t)__Pyx_PyInt_AsUnsignedShort(x);
 
3813
        else
 
3814
            return (hid_t)__Pyx_PyInt_AsSignedShort(x);
 
3815
    } else if (sizeof(hid_t) == sizeof(int)) {
 
3816
        if (is_unsigned)
 
3817
            return (hid_t)__Pyx_PyInt_AsUnsignedInt(x);
 
3818
        else
 
3819
            return (hid_t)__Pyx_PyInt_AsSignedInt(x);
 
3820
    } else if (sizeof(hid_t) == sizeof(long)) {
 
3821
        if (is_unsigned)
 
3822
            return (hid_t)__Pyx_PyInt_AsUnsignedLong(x);
 
3823
        else
 
3824
            return (hid_t)__Pyx_PyInt_AsSignedLong(x);
 
3825
    } else if (sizeof(hid_t) == sizeof(PY_LONG_LONG)) {
 
3826
        if (is_unsigned)
 
3827
            return (hid_t)__Pyx_PyInt_AsUnsignedLongLong(x);
 
3828
        else
 
3829
            return (hid_t)__Pyx_PyInt_AsSignedLongLong(x);
 
3830
#if 0
 
3831
    } else if (sizeof(hid_t) > sizeof(short) &&
 
3832
               sizeof(hid_t) < sizeof(int)) { /*  __int32 ILP64 ? */
 
3833
        if (is_unsigned)
 
3834
            return (hid_t)__Pyx_PyInt_AsUnsignedInt(x);
 
3835
        else
 
3836
            return (hid_t)__Pyx_PyInt_AsSignedInt(x);
 
3837
#endif
 
3838
    }
 
3839
    PyErr_SetString(PyExc_TypeError, "hid_t");
 
3840
    return (hid_t)-1;
 
3841
}
 
3842
 
 
3843
static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
494
3844
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
495
3845
    const int is_unsigned = neg_one > const_zero;
496
3846
    if (sizeof(unsigned char) < sizeof(long)) {
509
3859
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
510
3860
}
511
3861
 
512
 
static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
 
3862
static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
513
3863
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
514
3864
    const int is_unsigned = neg_one > const_zero;
515
3865
    if (sizeof(unsigned short) < sizeof(long)) {
528
3878
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
529
3879
}
530
3880
 
531
 
static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
 
3881
static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
532
3882
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
533
3883
    const int is_unsigned = neg_one > const_zero;
534
3884
    if (sizeof(unsigned int) < sizeof(long)) {
547
3897
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
548
3898
}
549
3899
 
550
 
static INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
 
3900
static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
551
3901
    const char neg_one = (char)-1, const_zero = 0;
552
3902
    const int is_unsigned = neg_one > const_zero;
553
3903
    if (sizeof(char) < sizeof(long)) {
566
3916
    return (char)__Pyx_PyInt_AsLong(x);
567
3917
}
568
3918
 
569
 
static INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
 
3919
static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
570
3920
    const short neg_one = (short)-1, const_zero = 0;
571
3921
    const int is_unsigned = neg_one > const_zero;
572
3922
    if (sizeof(short) < sizeof(long)) {
585
3935
    return (short)__Pyx_PyInt_AsLong(x);
586
3936
}
587
3937
 
588
 
static INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
 
3938
static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
589
3939
    const int neg_one = (int)-1, const_zero = 0;
590
3940
    const int is_unsigned = neg_one > const_zero;
591
3941
    if (sizeof(int) < sizeof(long)) {
604
3954
    return (int)__Pyx_PyInt_AsLong(x);
605
3955
}
606
3956
 
607
 
static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
 
3957
static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
608
3958
    const signed char neg_one = (signed char)-1, const_zero = 0;
609
3959
    const int is_unsigned = neg_one > const_zero;
610
3960
    if (sizeof(signed char) < sizeof(long)) {
623
3973
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
624
3974
}
625
3975
 
626
 
static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
 
3976
static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
627
3977
    const signed short neg_one = (signed short)-1, const_zero = 0;
628
3978
    const int is_unsigned = neg_one > const_zero;
629
3979
    if (sizeof(signed short) < sizeof(long)) {
642
3992
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
643
3993
}
644
3994
 
645
 
static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
 
3995
static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
646
3996
    const signed int neg_one = (signed int)-1, const_zero = 0;
647
3997
    const int is_unsigned = neg_one > const_zero;
648
3998
    if (sizeof(signed int) < sizeof(long)) {
661
4011
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
662
4012
}
663
4013
 
664
 
static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
 
4014
static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
665
4015
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
666
4016
    const int is_unsigned = neg_one > const_zero;
667
4017
#if PY_VERSION_HEX < 0x03000000
696
4046
    }
697
4047
}
698
4048
 
699
 
static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
 
4049
static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
700
4050
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
701
4051
    const int is_unsigned = neg_one > const_zero;
702
4052
#if PY_VERSION_HEX < 0x03000000
731
4081
    }
732
4082
}
733
4083
 
734
 
static INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
 
4084
static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
735
4085
    const long neg_one = (long)-1, const_zero = 0;
736
4086
    const int is_unsigned = neg_one > const_zero;
737
4087
#if PY_VERSION_HEX < 0x03000000
766
4116
    }
767
4117
}
768
4118
 
769
 
static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
 
4119
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
770
4120
    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
771
4121
    const int is_unsigned = neg_one > const_zero;
772
4122
#if PY_VERSION_HEX < 0x03000000
801
4151
    }
802
4152
}
803
4153
 
804
 
static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
 
4154
static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
805
4155
    const signed long neg_one = (signed long)-1, const_zero = 0;
806
4156
    const int is_unsigned = neg_one > const_zero;
807
4157
#if PY_VERSION_HEX < 0x03000000
836
4186
    }
837
4187
}
838
4188
 
839
 
static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
 
4189
static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
840
4190
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
841
4191
    const int is_unsigned = neg_one > const_zero;
842
4192
#if PY_VERSION_HEX < 0x03000000
871
4221
    }
872
4222
}
873
4223
 
 
4224
#ifndef __PYX_HAVE_RT_ImportType
 
4225
#define __PYX_HAVE_RT_ImportType
 
4226
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
 
4227
    long size, int strict)
 
4228
{
 
4229
    PyObject *py_module = 0;
 
4230
    PyObject *result = 0;
 
4231
    PyObject *py_name = 0;
 
4232
    char warning[200];
 
4233
 
 
4234
    py_module = __Pyx_ImportModule(module_name);
 
4235
    if (!py_module)
 
4236
        goto bad;
 
4237
    #if PY_MAJOR_VERSION < 3
 
4238
    py_name = PyString_FromString(class_name);
 
4239
    #else
 
4240
    py_name = PyUnicode_FromString(class_name);
 
4241
    #endif
 
4242
    if (!py_name)
 
4243
        goto bad;
 
4244
    result = PyObject_GetAttr(py_module, py_name);
 
4245
    Py_DECREF(py_name);
 
4246
    py_name = 0;
 
4247
    Py_DECREF(py_module);
 
4248
    py_module = 0;
 
4249
    if (!result)
 
4250
        goto bad;
 
4251
    if (!PyType_Check(result)) {
 
4252
        PyErr_Format(PyExc_TypeError, 
 
4253
            "%s.%s is not a type object",
 
4254
            module_name, class_name);
 
4255
        goto bad;
 
4256
    }
 
4257
    if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) {
 
4258
        PyOS_snprintf(warning, sizeof(warning), 
 
4259
            "%s.%s size changed, may indicate binary incompatibility",
 
4260
            module_name, class_name);
 
4261
        PyErr_WarnEx(NULL, warning, 0);
 
4262
    }
 
4263
    else if (((PyTypeObject *)result)->tp_basicsize != size) {
 
4264
        PyErr_Format(PyExc_ValueError, 
 
4265
            "%s.%s has the wrong size, try recompiling",
 
4266
            module_name, class_name);
 
4267
        goto bad;
 
4268
    }
 
4269
    return (PyTypeObject *)result;
 
4270
bad:
 
4271
    Py_XDECREF(py_module);
 
4272
    Py_XDECREF(result);
 
4273
    return 0;
 
4274
}
 
4275
#endif
 
4276
 
 
4277
#ifndef __PYX_HAVE_RT_ImportModule
 
4278
#define __PYX_HAVE_RT_ImportModule
 
4279
static PyObject *__Pyx_ImportModule(const char *name) {
 
4280
    PyObject *py_name = 0;
 
4281
    PyObject *py_module = 0;
 
4282
 
 
4283
    #if PY_MAJOR_VERSION < 3
 
4284
    py_name = PyString_FromString(name);
 
4285
    #else
 
4286
    py_name = PyUnicode_FromString(name);
 
4287
    #endif
 
4288
    if (!py_name)
 
4289
        goto bad;
 
4290
    py_module = PyImport_Import(py_name);
 
4291
    Py_DECREF(py_name);
 
4292
    return py_module;
 
4293
bad:
 
4294
    Py_XDECREF(py_name);
 
4295
    return 0;
 
4296
}
 
4297
#endif
 
4298
 
 
4299
#ifndef __PYX_HAVE_RT_ImportFunction
 
4300
#define __PYX_HAVE_RT_ImportFunction
 
4301
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
 
4302
    PyObject *d = 0;
 
4303
    PyObject *cobj = 0;
 
4304
    union {
 
4305
        void (*fp)(void);
 
4306
        void *p;
 
4307
    } tmp;
 
4308
#if PY_VERSION_HEX < 0x03010000
 
4309
    const char *desc, *s1, *s2;
 
4310
#endif
 
4311
 
 
4312
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
 
4313
    if (!d)
 
4314
        goto bad;
 
4315
    cobj = PyDict_GetItemString(d, funcname);
 
4316
    if (!cobj) {
 
4317
        PyErr_Format(PyExc_ImportError,
 
4318
            "%s does not export expected C function %s",
 
4319
                PyModule_GetName(module), funcname);
 
4320
        goto bad;
 
4321
    }
 
4322
#if PY_VERSION_HEX < 0x03010000
 
4323
    desc = (const char *)PyCObject_GetDesc(cobj);
 
4324
    if (!desc)
 
4325
        goto bad;
 
4326
    s1 = desc; s2 = sig;
 
4327
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
 
4328
    if (*s1 != *s2) {
 
4329
        PyErr_Format(PyExc_TypeError,
 
4330
            "C function %s.%s has wrong signature (expected %s, got %s)",
 
4331
             PyModule_GetName(module), funcname, sig, desc);
 
4332
        goto bad;
 
4333
    }
 
4334
    tmp.p = PyCObject_AsVoidPtr(cobj);
 
4335
#else
 
4336
    if (!PyCapsule_IsValid(cobj, sig)) {
 
4337
        PyErr_Format(PyExc_TypeError,
 
4338
            "C function %s.%s has wrong signature (expected %s, got %s)",
 
4339
             PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
 
4340
        goto bad;
 
4341
    }
 
4342
    tmp.p = PyCapsule_GetPointer(cobj, sig);
 
4343
#endif
 
4344
    *f = tmp.fp;
 
4345
    if (!(*f))
 
4346
        goto bad;
 
4347
    Py_DECREF(d);
 
4348
    return 0;
 
4349
bad:
 
4350
    Py_XDECREF(d);
 
4351
    return -1;
 
4352
}
 
4353
#endif
 
4354
 
874
4355
#include "compile.h"
875
4356
#include "frameobject.h"
876
4357
#include "traceback.h"
973
4454
 
974
4455
/* Type Conversion Functions */
975
4456
 
976
 
static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
 
4457
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
977
4458
   if (x == Py_True) return 1;
978
4459
   else if ((x == Py_False) | (x == Py_None)) return 0;
979
4460
   else return PyObject_IsTrue(x);
980
4461
}
981
4462
 
982
 
static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
 
4463
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
983
4464
  PyNumberMethods *m;
984
4465
  const char *name = NULL;
985
4466
  PyObject *res = NULL;
1025
4506
  return res;
1026
4507
}
1027
4508
 
1028
 
static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
 
4509
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
1029
4510
  Py_ssize_t ival;
1030
4511
  PyObject* x = PyNumber_Index(b);
1031
4512
  if (!x) return -1;
1034
4515
  return ival;
1035
4516
}
1036
4517
 
1037
 
static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
 
4518
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
1038
4519
#if PY_VERSION_HEX < 0x02050000
1039
4520
   if (ival <= LONG_MAX)
1040
4521
       return PyInt_FromLong((long)ival);
1048
4529
#endif
1049
4530
}
1050
4531
 
1051
 
static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
 
4532
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
1052
4533
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
1053
4534
   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
1054
4535
       return (size_t)-1;