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

« back to all changes in this revision

Viewing changes to h5py/h5s.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:02 2010 */
 
1
/* Generated by Cython 0.12.1 on Tue Dec 21 22:32:02 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))
149
163
#include "hdf5.h"
150
164
#include "numpy/arrayobject.h"
151
165
 
152
 
#ifdef __GNUC__
153
 
#define INLINE __inline__
154
 
#elif _WIN32
155
 
#define INLINE __inline
156
 
#else
157
 
#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
158
174
#endif
159
175
 
160
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*/
176
192
#define __Pyx_PyBytes_AsUString(s)        ((unsigned char*) __Pyx_PyBytes_AsString(s))
177
193
 
178
194
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
179
 
static INLINE int __Pyx_PyObject_IsTrue(PyObject*);
180
 
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);
181
197
 
182
198
#if !defined(T_PYSSIZET)
183
199
#if PY_VERSION_HEX < 0x02050000
241
257
#endif
242
258
#endif
243
259
 
244
 
static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
245
 
static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
246
 
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*);
247
263
 
248
264
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
249
265
 
275
291
 
276
292
/* Type declarations */
277
293
 
278
 
/* "/home/tachyon/slave/unix-release/build/h5py/utils.pxd":20
 
294
/* "/home/tachyon/h5py/h5py/utils.pxd":20
279
295
 * cdef void efree(void* ptr)
280
296
 * 
281
297
 * cpdef int check_numpy_read(ndarray arr, hid_t space_id=*) except -1             # <<<<<<<<<<<<<<
288
304
  hid_t space_id;
289
305
};
290
306
 
291
 
/* "/home/tachyon/slave/unix-release/build/h5py/utils.pxd":21
 
307
/* "/home/tachyon/h5py/h5py/utils.pxd":21
292
308
 * 
293
309
 * cpdef int check_numpy_read(ndarray arr, hid_t space_id=*) except -1
294
310
 * cpdef int check_numpy_write(ndarray arr, hid_t space_id=*) except -1             # <<<<<<<<<<<<<<
301
317
  hid_t space_id;
302
318
};
303
319
 
304
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5.pxd":28
305
 
 * cpdef H5PYConfig get_config()
 
320
/* "/home/tachyon/h5py/h5py/h5.pxd":34
 
321
 *     cdef readonly int locked
306
322
 * 
307
323
 * cdef class ObjectID:             # <<<<<<<<<<<<<<
308
324
 * 
312
328
struct __pyx_obj_4h5py_2h5_ObjectID {
313
329
  PyObject_HEAD
314
330
  PyObject *__weakref__;
315
 
  hid_t id;
316
 
  int _locked;
 
331
  struct __pyx_obj_4h5py_2h5_IDProxy *_proxy;
317
332
  PyObject *_hash;
318
333
};
319
334
 
320
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pxd":17
 
335
/* "/home/tachyon/h5py/h5py/h5s.pxd":17
321
336
 * from h5 cimport class ObjectID
322
337
 * 
323
338
 * cdef class SpaceID(ObjectID):             # <<<<<<<<<<<<<<
329
344
  struct __pyx_obj_4h5py_2h5_ObjectID __pyx_base;
330
345
};
331
346
 
332
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5.pxd":15
 
347
/* "/home/tachyon/h5py/h5py/h5.pxd":15
333
348
 * include "defs.pxd"
334
349
 * 
335
350
 * cdef class H5PYConfig:             # <<<<<<<<<<<<<<
349
364
  PyObject *THREADS;
350
365
};
351
366
 
352
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5.pxd":35
 
367
/* "/home/tachyon/h5py/h5py/h5.pxd":40
353
368
 *     cdef object _hash
354
369
 * 
355
370
 * cdef class SmartStruct:             # <<<<<<<<<<<<<<
363
378
  PyObject *_title;
364
379
};
365
380
 
 
381
/* "/home/tachyon/h5py/h5py/h5.pxd":28
 
382
 * cpdef H5PYConfig get_config()
 
383
 * 
 
384
 * cdef class IDProxy:             # <<<<<<<<<<<<<<
 
385
 * 
 
386
 *     cdef object __weakref__
 
387
 */
 
388
 
 
389
struct __pyx_obj_4h5py_2h5_IDProxy {
 
390
  PyObject_HEAD
 
391
  PyObject *__weakref__;
 
392
  hid_t id;
 
393
  int locked;
 
394
};
 
395
 
366
396
#ifndef CYTHON_REFNANNY
367
397
  #define CYTHON_REFNANNY 0
368
398
#endif
417
447
 
418
448
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/
419
449
 
420
 
static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
421
 
static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 
450
static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
 
451
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
422
452
 
423
 
static INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
 
453
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
424
454
 
425
455
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
426
456
    const char *name, int exact); /*proto*/
427
457
 
428
 
static INLINE PyObject *__Pyx_PyInt_to_py_hsize_t(hsize_t);
429
 
 
430
 
static INLINE PyObject *__Pyx_PyInt_to_py_hid_t(hid_t);
 
458
static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_hsize_t(hsize_t);
 
459
 
 
460
static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_hid_t(hid_t);
 
461
 
 
462
static CYTHON_INLINE hid_t __Pyx_PyInt_from_py_hid_t(PyObject *);
431
463
 
432
464
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
433
465
 
434
466
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
435
467
 
436
 
static INLINE PyObject *__Pyx_PyInt_to_py_hssize_t(hssize_t);
437
 
 
438
 
static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
439
 
 
440
 
static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
441
 
 
442
 
static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
443
 
 
444
 
static INLINE char __Pyx_PyInt_AsChar(PyObject *);
445
 
 
446
 
static INLINE short __Pyx_PyInt_AsShort(PyObject *);
447
 
 
448
 
static INLINE int __Pyx_PyInt_AsInt(PyObject *);
449
 
 
450
 
static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
451
 
 
452
 
static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
453
 
 
454
 
static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
455
 
 
456
 
static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
457
 
 
458
 
static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
459
 
 
460
 
static INLINE long __Pyx_PyInt_AsLong(PyObject *);
461
 
 
462
 
static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
463
 
 
464
 
static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
465
 
 
466
 
static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
467
 
 
468
 
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size);  /*proto*/
 
468
static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_hssize_t(hssize_t);
 
469
 
 
470
static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
 
471
 
 
472
static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
 
473
 
 
474
static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
 
475
 
 
476
static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
 
477
 
 
478
static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
 
479
 
 
480
static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
 
481
 
 
482
static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
 
483
 
 
484
static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
 
485
 
 
486
static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
 
487
 
 
488
static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
 
489
 
 
490
static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
 
491
 
 
492
static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
 
493
 
 
494
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
 
495
 
 
496
static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
 
497
 
 
498
static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
 
499
 
 
500
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict);  /*proto*/
469
501
 
470
502
static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
471
503
 
477
509
/* Module declarations from h5py.h5 */
478
510
 
479
511
static PyTypeObject *__pyx_ptype_4h5py_2h5_H5PYConfig = 0;
 
512
static PyTypeObject *__pyx_ptype_4h5py_2h5_IDProxy = 0;
480
513
static PyTypeObject *__pyx_ptype_4h5py_2h5_ObjectID = 0;
481
514
static PyTypeObject *__pyx_ptype_4h5py_2h5_SmartStruct = 0;
482
515
static struct __pyx_obj_4h5py_2h5_H5PYConfig *(*__pyx_f_4h5py_2h5_get_config)(int __pyx_skip_dispatch); /*proto*/
498
531
static int (*__pyx_f_4h5py_5utils_require_tuple)(PyObject *, int, int, char *); /*proto*/
499
532
static PyObject *(*__pyx_f_4h5py_5utils_create_numpy_hsize)(int, hsize_t *); /*proto*/
500
533
static PyObject *(*__pyx_f_4h5py_5utils_create_hsize_array)(PyObject *); /*proto*/
501
 
/* Module declarations from python_ref */
502
 
 
503
 
/* Module declarations from python_string */
504
 
 
505
534
/* Module declarations from h5py.h5s */
506
535
 
507
536
static PyTypeObject *__pyx_ptype_4h5py_3h5s_SpaceID = 0;
528
557
static char __pyx_k__SCALAR[] = "SCALAR";
529
558
static char __pyx_k__SIMPLE[] = "SIMPLE";
530
559
static char __pyx_k__coords[] = "coords";
 
560
static char __pyx_k__encode[] = "encode";
531
561
static char __pyx_k__offset[] = "offset";
532
562
static char __pyx_k__stride[] = "stride";
533
563
static char __pyx_k__SEL_ALL[] = "SEL_ALL";
587
617
static PyObject *__pyx_n_s__data;
588
618
static PyObject *__pyx_n_s__dimensions;
589
619
static PyObject *__pyx_n_s__dims_tpl;
 
620
static PyObject *__pyx_n_s__encode;
590
621
static PyObject *__pyx_n_s__id;
591
622
static PyObject *__pyx_n_s__max_dims_tpl;
592
623
static PyObject *__pyx_n_s__maxdims;
595
626
static PyObject *__pyx_n_s__op;
596
627
static PyObject *__pyx_n_s__start;
597
628
static PyObject *__pyx_n_s__stride;
 
629
static PyObject *__pyx_int_1;
 
630
static PyObject *__pyx_int_neg_1;
598
631
static int __pyx_k_3;
599
632
static int __pyx_k_6;
600
633
 
601
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":29
 
634
/* "/home/tachyon/h5py/h5py/h5s.pyx":29
602
635
 * init_hdf5()
603
636
 * 
604
637
 * cdef object lockid(hid_t id_):             # <<<<<<<<<<<<<<
614
647
  __Pyx_RefNannySetupContext("lockid");
615
648
  __pyx_v_space = ((struct __pyx_obj_4h5py_3h5s_SpaceID *)Py_None); __Pyx_INCREF(Py_None);
616
649
 
617
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":31
 
650
  /* "/home/tachyon/h5py/h5py/h5s.pyx":31
618
651
 * cdef object lockid(hid_t id_):
619
652
 *     cdef SpaceID space
620
653
 *     space = SpaceID(id_)             # <<<<<<<<<<<<<<
635
668
  __pyx_v_space = ((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_t_1);
636
669
  __pyx_t_1 = 0;
637
670
 
638
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":32
 
671
  /* "/home/tachyon/h5py/h5py/h5s.pyx":32
639
672
 *     cdef SpaceID space
640
673
 *     space = SpaceID(id_)
641
674
 *     space._locked = 1             # <<<<<<<<<<<<<<
642
675
 *     return space
643
676
 * 
644
677
 */
645
 
  __pyx_v_space->__pyx_base._locked = 1;
 
678
  if (PyObject_SetAttr(((PyObject *)__pyx_v_space), __pyx_n_s___locked, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
646
679
 
647
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":33
 
680
  /* "/home/tachyon/h5py/h5py/h5s.pyx":33
648
681
 *     space = SpaceID(id_)
649
682
 *     space._locked = 1
650
683
 *     return space             # <<<<<<<<<<<<<<
670
703
  return __pyx_r;
671
704
}
672
705
 
673
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":68
 
706
/* "/home/tachyon/h5py/h5py/h5s.pyx":68
674
707
 * 
675
708
 * 
676
709
 * def create(int class_code):             # <<<<<<<<<<<<<<
697
730
  return NULL;
698
731
  __pyx_L4_argument_unpacking_done:;
699
732
 
700
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":74
 
733
  /* "/home/tachyon/h5py/h5py/h5s.pyx":74
701
734
 *     Legal values are SCALAR and SIMPLE.
702
735
 *     """
703
736
 *     return SpaceID(H5Screate(<H5S_class_t>class_code))             # <<<<<<<<<<<<<<
733
766
  return __pyx_r;
734
767
}
735
768
 
736
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":77
 
769
/* "/home/tachyon/h5py/h5py/h5s.pyx":77
737
770
 * 
738
771
 * 
739
772
 * def create_simple(object dims_tpl, object max_dims_tpl=None):             # <<<<<<<<<<<<<<
805
838
  __Pyx_INCREF(__pyx_v_dims_tpl);
806
839
  __Pyx_INCREF(__pyx_v_max_dims_tpl);
807
840
 
808
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":88
 
841
  /* "/home/tachyon/h5py/h5py/h5s.pyx":88
809
842
 *     """
810
843
 *     cdef int rank
811
844
 *     cdef hsize_t* dims = NULL             # <<<<<<<<<<<<<<
814
847
 */
815
848
  __pyx_v_dims = NULL;
816
849
 
817
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":89
 
850
  /* "/home/tachyon/h5py/h5py/h5s.pyx":89
818
851
 *     cdef int rank
819
852
 *     cdef hsize_t* dims = NULL
820
853
 *     cdef hsize_t* max_dims = NULL             # <<<<<<<<<<<<<<
823
856
 */
824
857
  __pyx_v_max_dims = NULL;
825
858
 
826
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":91
 
859
  /* "/home/tachyon/h5py/h5py/h5s.pyx":91
827
860
 *     cdef hsize_t* max_dims = NULL
828
861
 * 
829
862
 *     require_tuple(dims_tpl, 0, -1, "dims_tpl")             # <<<<<<<<<<<<<<
832
865
 */
833
866
  __pyx_t_1 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_dims_tpl, 0, -1, __pyx_k__dims_tpl); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
834
867
 
835
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":92
 
868
  /* "/home/tachyon/h5py/h5py/h5s.pyx":92
836
869
 * 
837
870
 *     require_tuple(dims_tpl, 0, -1, "dims_tpl")
838
871
 *     rank = len(dims_tpl)             # <<<<<<<<<<<<<<
842
875
  __pyx_t_2 = PyObject_Length(__pyx_v_dims_tpl); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
843
876
  __pyx_v_rank = __pyx_t_2;
844
877
 
845
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":93
 
878
  /* "/home/tachyon/h5py/h5py/h5s.pyx":93
846
879
 *     require_tuple(dims_tpl, 0, -1, "dims_tpl")
847
880
 *     rank = len(dims_tpl)
848
881
 *     require_tuple(max_dims_tpl, 1, rank, "max_dims_tpl")             # <<<<<<<<<<<<<<
851
884
 */
852
885
  __pyx_t_1 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_max_dims_tpl, 1, __pyx_v_rank, __pyx_k__max_dims_tpl); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
853
886
 
854
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":95
 
887
  /* "/home/tachyon/h5py/h5py/h5s.pyx":95
855
888
 *     require_tuple(max_dims_tpl, 1, rank, "max_dims_tpl")
856
889
 * 
857
890
 *     try:             # <<<<<<<<<<<<<<
860
893
 */
861
894
  /*try:*/ {
862
895
 
863
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":96
 
896
    /* "/home/tachyon/h5py/h5py/h5s.pyx":96
864
897
 * 
865
898
 *     try:
866
899
 *         dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
870
903
    __pyx_t_3 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_3 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L7;}
871
904
    __pyx_v_dims = ((hsize_t *)__pyx_t_3);
872
905
 
873
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":97
 
906
    /* "/home/tachyon/h5py/h5py/h5s.pyx":97
874
907
 *     try:
875
908
 *         dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
876
909
 *         convert_tuple(dims_tpl, dims, rank)             # <<<<<<<<<<<<<<
879
912
 */
880
913
    __pyx_t_1 = __pyx_f_4h5py_5utils_convert_tuple(__pyx_v_dims_tpl, __pyx_v_dims, __pyx_v_rank); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L7;}
881
914
 
882
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":99
 
915
    /* "/home/tachyon/h5py/h5py/h5s.pyx":99
883
916
 *         convert_tuple(dims_tpl, dims, rank)
884
917
 * 
885
918
 *         if max_dims_tpl is not None:             # <<<<<<<<<<<<<<
889
922
    __pyx_t_4 = (__pyx_v_max_dims_tpl != Py_None);
890
923
    if (__pyx_t_4) {
891
924
 
892
 
      /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":100
 
925
      /* "/home/tachyon/h5py/h5py/h5s.pyx":100
893
926
 * 
894
927
 *         if max_dims_tpl is not None:
895
928
 *             max_dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
899
932
      __pyx_t_3 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_3 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L7;}
900
933
      __pyx_v_max_dims = ((hsize_t *)__pyx_t_3);
901
934
 
902
 
      /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":101
 
935
      /* "/home/tachyon/h5py/h5py/h5s.pyx":101
903
936
 *         if max_dims_tpl is not None:
904
937
 *             max_dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
905
938
 *             convert_tuple(max_dims_tpl, max_dims, rank)             # <<<<<<<<<<<<<<
911
944
    }
912
945
    __pyx_L9:;
913
946
 
914
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":103
 
947
    /* "/home/tachyon/h5py/h5py/h5s.pyx":103
915
948
 *             convert_tuple(max_dims_tpl, max_dims, rank)
916
949
 * 
917
950
 *         return SpaceID(H5Screate_simple(rank, dims, max_dims))             # <<<<<<<<<<<<<<
952
985
    }
953
986
    __pyx_L8:;
954
987
 
955
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":106
 
988
    /* "/home/tachyon/h5py/h5py/h5s.pyx":106
956
989
 * 
957
990
 *     finally:
958
991
 *         efree(dims)             # <<<<<<<<<<<<<<
961
994
 */
962
995
    __pyx_f_4h5py_5utils_efree(__pyx_v_dims);
963
996
 
964
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":107
 
997
    /* "/home/tachyon/h5py/h5py/h5s.pyx":107
965
998
 *     finally:
966
999
 *         efree(dims)
967
1000
 *         efree(max_dims)             # <<<<<<<<<<<<<<
997
1030
  return __pyx_r;
998
1031
}
999
1032
 
1000
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":141
 
1033
/* "/home/tachyon/h5py/h5py/h5s.pyx":111
 
1034
 * IF H5PY_18API:
 
1035
 * 
 
1036
 *     def decode(buf):             # <<<<<<<<<<<<<<
 
1037
 *         """(STRING buf) => SpaceID
 
1038
 * 
 
1039
 */
 
1040
 
 
1041
static PyObject *__pyx_pf_4h5py_3h5s_decode(PyObject *__pyx_self, PyObject *__pyx_v_buf); /*proto*/
 
1042
static char __pyx_doc_4h5py_3h5s_decode[] = "(STRING buf) => SpaceID\n\n        Unserialize a dataspace.  Bear in mind you can also use the native\n        Python pickling machinery to do this.\n        ";
 
1043
static PyObject *__pyx_pf_4h5py_3h5s_decode(PyObject *__pyx_self, PyObject *__pyx_v_buf) {
 
1044
  char *__pyx_v_buf_;
 
1045
  PyObject *__pyx_r = NULL;
 
1046
  char *__pyx_t_1;
 
1047
  PyObject *__pyx_t_2 = NULL;
 
1048
  PyObject *__pyx_t_3 = NULL;
 
1049
  __Pyx_RefNannySetupContext("decode");
 
1050
  __pyx_self = __pyx_self;
 
1051
 
 
1052
  /* "/home/tachyon/h5py/h5py/h5s.pyx":117
 
1053
 *         Python pickling machinery to do this.
 
1054
 *         """
 
1055
 *         cdef char* buf_ = buf             # <<<<<<<<<<<<<<
 
1056
 *         return SpaceID(H5Sdecode(buf_))
 
1057
 * 
 
1058
 */
 
1059
  __pyx_t_1 = __Pyx_PyBytes_AsString(__pyx_v_buf); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1060
  __pyx_v_buf_ = __pyx_t_1;
 
1061
 
 
1062
  /* "/home/tachyon/h5py/h5py/h5s.pyx":118
 
1063
 *         """
 
1064
 *         cdef char* buf_ = buf
 
1065
 *         return SpaceID(H5Sdecode(buf_))             # <<<<<<<<<<<<<<
 
1066
 * 
 
1067
 * # === H5S class API ===========================================================
 
1068
 */
 
1069
  __Pyx_XDECREF(__pyx_r);
 
1070
  __pyx_t_2 = __Pyx_PyInt_to_py_hid_t(H5Sdecode(__pyx_v_buf_)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1071
  __Pyx_GOTREF(__pyx_t_2);
 
1072
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1073
  __Pyx_GOTREF(__pyx_t_3);
 
1074
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
 
1075
  __Pyx_GIVEREF(__pyx_t_2);
 
1076
  __pyx_t_2 = 0;
 
1077
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4h5py_3h5s_SpaceID)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1078
  __Pyx_GOTREF(__pyx_t_2);
 
1079
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
1080
  __pyx_r = __pyx_t_2;
 
1081
  __pyx_t_2 = 0;
 
1082
  goto __pyx_L0;
 
1083
 
 
1084
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1085
  goto __pyx_L0;
 
1086
  __pyx_L1_error:;
 
1087
  __Pyx_XDECREF(__pyx_t_2);
 
1088
  __Pyx_XDECREF(__pyx_t_3);
 
1089
  __Pyx_AddTraceback("h5py.h5s.decode");
 
1090
  __pyx_r = NULL;
 
1091
  __pyx_L0:;
 
1092
  __Pyx_XGIVEREF(__pyx_r);
 
1093
  __Pyx_RefNannyFinishContext();
 
1094
  return __pyx_r;
 
1095
}
 
1096
 
 
1097
/* "/home/tachyon/h5py/h5py/h5s.pyx":141
1001
1098
 *         """ Numpy-style shape tuple representing dimensions.  () == scalar.
1002
1099
 *         """
1003
1100
 *         def __get__(self):             # <<<<<<<<<<<<<<
1012
1109
  PyObject *__pyx_t_2 = NULL;
1013
1110
  __Pyx_RefNannySetupContext("__get__");
1014
1111
 
1015
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":142
 
1112
  /* "/home/tachyon/h5py/h5py/h5s.pyx":142
1016
1113
 *         """
1017
1114
 *         def __get__(self):
1018
1115
 *             return self.get_simple_extent_dims()             # <<<<<<<<<<<<<<
1042
1139
  return __pyx_r;
1043
1140
}
1044
1141
 
1045
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":145
 
1142
/* "/home/tachyon/h5py/h5py/h5s.pyx":145
1046
1143
 * 
1047
1144
 * 
1048
1145
 *     def _close(self):             # <<<<<<<<<<<<<<
1054
1151
static char __pyx_doc_4h5py_3h5s_7SpaceID__close[] = "()\n\n        Terminate access through this identifier.  You shouldn't have to\n        call this manually; dataspace objects are automatically destroyed\n        when their Python wrappers are freed.\n        ";
1055
1152
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID__close(PyObject *__pyx_v_self, PyObject *unused) {
1056
1153
  PyObject *__pyx_r = NULL;
1057
 
  herr_t __pyx_t_1;
 
1154
  PyObject *__pyx_t_1 = NULL;
 
1155
  hid_t __pyx_t_2;
 
1156
  herr_t __pyx_t_3;
1058
1157
  __Pyx_RefNannySetupContext("_close");
1059
1158
 
1060
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":152
 
1159
  /* "/home/tachyon/h5py/h5py/h5s.pyx":152
1061
1160
 *         when their Python wrappers are freed.
1062
1161
 *         """
1063
1162
 *         H5Sclose(self.id)             # <<<<<<<<<<<<<<
1064
1163
 * 
1065
1164
 * 
1066
1165
 */
1067
 
  __pyx_t_1 = H5Sclose(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1166
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1167
  __Pyx_GOTREF(__pyx_t_1);
 
1168
  __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 = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1169
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
1170
  __pyx_t_3 = H5Sclose(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1068
1171
 
1069
1172
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1070
1173
  goto __pyx_L0;
1071
1174
  __pyx_L1_error:;
 
1175
  __Pyx_XDECREF(__pyx_t_1);
1072
1176
  __Pyx_AddTraceback("h5py.h5s.SpaceID._close");
1073
1177
  __pyx_r = NULL;
1074
1178
  __pyx_L0:;
1077
1181
  return __pyx_r;
1078
1182
}
1079
1183
 
1080
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":155
 
1184
/* "/home/tachyon/h5py/h5py/h5s.pyx":155
1081
1185
 * 
1082
1186
 * 
1083
1187
 *     def copy(self):             # <<<<<<<<<<<<<<
1089
1193
static char __pyx_doc_4h5py_3h5s_7SpaceID_copy[] = "() => SpaceID\n\n        Create a new copy of this dataspace.\n        ";
1090
1194
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_copy(PyObject *__pyx_v_self, PyObject *unused) {
1091
1195
  PyObject *__pyx_r = NULL;
1092
 
  hid_t __pyx_t_1;
1093
 
  PyObject *__pyx_t_2 = NULL;
1094
 
  PyObject *__pyx_t_3 = NULL;
 
1196
  PyObject *__pyx_t_1 = NULL;
 
1197
  hid_t __pyx_t_2;
 
1198
  hid_t __pyx_t_3;
 
1199
  PyObject *__pyx_t_4 = NULL;
1095
1200
  __Pyx_RefNannySetupContext("copy");
1096
1201
 
1097
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":160
 
1202
  /* "/home/tachyon/h5py/h5py/h5s.pyx":160
1098
1203
 *         Create a new copy of this dataspace.
1099
1204
 *         """
1100
1205
 *         return SpaceID(H5Scopy(self.id))             # <<<<<<<<<<<<<<
1102
1207
 *     IF H5PY_18API:
1103
1208
 */
1104
1209
  __Pyx_XDECREF(__pyx_r);
1105
 
  __pyx_t_1 = H5Scopy(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1106
 
  __pyx_t_2 = __Pyx_PyInt_to_py_hid_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1107
 
  __Pyx_GOTREF(__pyx_t_2);
1108
 
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1109
 
  __Pyx_GOTREF(__pyx_t_3);
1110
 
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
1111
 
  __Pyx_GIVEREF(__pyx_t_2);
1112
 
  __pyx_t_2 = 0;
1113
 
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4h5py_3h5s_SpaceID)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1114
 
  __Pyx_GOTREF(__pyx_t_2);
1115
 
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1116
 
  __pyx_r = __pyx_t_2;
1117
 
  __pyx_t_2 = 0;
 
1210
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1211
  __Pyx_GOTREF(__pyx_t_1);
 
1212
  __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 = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1213
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
1214
  __pyx_t_3 = H5Scopy(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1215
  __pyx_t_1 = __Pyx_PyInt_to_py_hid_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1216
  __Pyx_GOTREF(__pyx_t_1);
 
1217
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1218
  __Pyx_GOTREF(__pyx_t_4);
 
1219
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
 
1220
  __Pyx_GIVEREF(__pyx_t_1);
 
1221
  __pyx_t_1 = 0;
 
1222
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4h5py_3h5s_SpaceID)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1223
  __Pyx_GOTREF(__pyx_t_1);
 
1224
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
1225
  __pyx_r = __pyx_t_1;
 
1226
  __pyx_t_1 = 0;
1118
1227
  goto __pyx_L0;
1119
1228
 
1120
1229
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1121
1230
  goto __pyx_L0;
1122
1231
  __pyx_L1_error:;
1123
 
  __Pyx_XDECREF(__pyx_t_2);
1124
 
  __Pyx_XDECREF(__pyx_t_3);
 
1232
  __Pyx_XDECREF(__pyx_t_1);
 
1233
  __Pyx_XDECREF(__pyx_t_4);
1125
1234
  __Pyx_AddTraceback("h5py.h5s.SpaceID.copy");
1126
1235
  __pyx_r = NULL;
1127
1236
  __pyx_L0:;
1130
1239
  return __pyx_r;
1131
1240
}
1132
1241
 
1133
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":198
 
1242
/* "/home/tachyon/h5py/h5py/h5s.pyx":164
 
1243
 *     IF H5PY_18API:
 
1244
 * 
 
1245
 *         def encode(self):             # <<<<<<<<<<<<<<
 
1246
 *             """() => STRING
 
1247
 * 
 
1248
 */
 
1249
 
 
1250
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_encode(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
1251
static char __pyx_doc_4h5py_3h5s_7SpaceID_encode[] = "() => STRING\n\n            Serialize a dataspace, including its selection.  Bear in mind you\n            can also use the native Python pickling machinery to do this.\n            ";
 
1252
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_encode(PyObject *__pyx_v_self, PyObject *unused) {
 
1253
  void *__pyx_v_buf;
 
1254
  size_t __pyx_v_nalloc;
 
1255
  PyObject *__pyx_v_pystr;
 
1256
  PyObject *__pyx_r = NULL;
 
1257
  PyObject *__pyx_t_1 = NULL;
 
1258
  hid_t __pyx_t_2;
 
1259
  void *__pyx_t_3;
 
1260
  __Pyx_RefNannySetupContext("encode");
 
1261
  __Pyx_INCREF((PyObject *)__pyx_v_self);
 
1262
  __pyx_v_pystr = Py_None; __Pyx_INCREF(Py_None);
 
1263
 
 
1264
  /* "/home/tachyon/h5py/h5py/h5s.pyx":170
 
1265
 *             can also use the native Python pickling machinery to do this.
 
1266
 *             """
 
1267
 *             cdef void* buf = NULL             # <<<<<<<<<<<<<<
 
1268
 *             cdef size_t nalloc = 0
 
1269
 * 
 
1270
 */
 
1271
  __pyx_v_buf = NULL;
 
1272
 
 
1273
  /* "/home/tachyon/h5py/h5py/h5s.pyx":171
 
1274
 *             """
 
1275
 *             cdef void* buf = NULL
 
1276
 *             cdef size_t nalloc = 0             # <<<<<<<<<<<<<<
 
1277
 * 
 
1278
 *             H5Sencode(self.id, NULL, &nalloc)
 
1279
 */
 
1280
  __pyx_v_nalloc = 0;
 
1281
 
 
1282
  /* "/home/tachyon/h5py/h5py/h5s.pyx":173
 
1283
 *             cdef size_t nalloc = 0
 
1284
 * 
 
1285
 *             H5Sencode(self.id, NULL, &nalloc)             # <<<<<<<<<<<<<<
 
1286
 *             buf = emalloc(nalloc)
 
1287
 *             try:
 
1288
 */
 
1289
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1290
  __Pyx_GOTREF(__pyx_t_1);
 
1291
  __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 = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1292
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
1293
  H5Sencode(__pyx_t_2, NULL, (&__pyx_v_nalloc));
 
1294
 
 
1295
  /* "/home/tachyon/h5py/h5py/h5s.pyx":174
 
1296
 * 
 
1297
 *             H5Sencode(self.id, NULL, &nalloc)
 
1298
 *             buf = emalloc(nalloc)             # <<<<<<<<<<<<<<
 
1299
 *             try:
 
1300
 *                 H5Sencode(self.id, buf, &nalloc)
 
1301
 */
 
1302
  __pyx_t_3 = __pyx_f_4h5py_5utils_emalloc(__pyx_v_nalloc); if (unlikely(__pyx_t_3 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1303
  __pyx_v_buf = __pyx_t_3;
 
1304
 
 
1305
  /* "/home/tachyon/h5py/h5py/h5s.pyx":175
 
1306
 *             H5Sencode(self.id, NULL, &nalloc)
 
1307
 *             buf = emalloc(nalloc)
 
1308
 *             try:             # <<<<<<<<<<<<<<
 
1309
 *                 H5Sencode(self.id, buf, &nalloc)
 
1310
 *                 pystr = PyString_FromStringAndSize(<char*>buf, nalloc)
 
1311
 */
 
1312
  /*try:*/ {
 
1313
 
 
1314
    /* "/home/tachyon/h5py/h5py/h5s.pyx":176
 
1315
 *             buf = emalloc(nalloc)
 
1316
 *             try:
 
1317
 *                 H5Sencode(self.id, buf, &nalloc)             # <<<<<<<<<<<<<<
 
1318
 *                 pystr = PyString_FromStringAndSize(<char*>buf, nalloc)
 
1319
 *             finally:
 
1320
 */
 
1321
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L6;}
 
1322
    __Pyx_GOTREF(__pyx_t_1);
 
1323
    __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 = 176; __pyx_clineno = __LINE__; goto __pyx_L6;}
 
1324
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
1325
    H5Sencode(__pyx_t_2, __pyx_v_buf, (&__pyx_v_nalloc));
 
1326
 
 
1327
    /* "/home/tachyon/h5py/h5py/h5s.pyx":177
 
1328
 *             try:
 
1329
 *                 H5Sencode(self.id, buf, &nalloc)
 
1330
 *                 pystr = PyString_FromStringAndSize(<char*>buf, nalloc)             # <<<<<<<<<<<<<<
 
1331
 *             finally:
 
1332
 *                 efree(buf)
 
1333
 */
 
1334
    __pyx_t_1 = PyString_FromStringAndSize(((char *)__pyx_v_buf), __pyx_v_nalloc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L6;}
 
1335
    __Pyx_GOTREF(__pyx_t_1);
 
1336
    __Pyx_DECREF(__pyx_v_pystr);
 
1337
    __pyx_v_pystr = __pyx_t_1;
 
1338
    __pyx_t_1 = 0;
 
1339
  }
 
1340
  /*finally:*/ {
 
1341
    int __pyx_why;
 
1342
    PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
 
1343
    int __pyx_exc_lineno;
 
1344
    __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
 
1345
    __pyx_why = 0; goto __pyx_L7;
 
1346
    __pyx_L6: {
 
1347
      __pyx_why = 4;
 
1348
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
 
1349
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
 
1350
      __pyx_exc_lineno = __pyx_lineno;
 
1351
      goto __pyx_L7;
 
1352
    }
 
1353
    __pyx_L7:;
 
1354
 
 
1355
    /* "/home/tachyon/h5py/h5py/h5s.pyx":179
 
1356
 *                 pystr = PyString_FromStringAndSize(<char*>buf, nalloc)
 
1357
 *             finally:
 
1358
 *                 efree(buf)             # <<<<<<<<<<<<<<
 
1359
 * 
 
1360
 *             return pystr
 
1361
 */
 
1362
    __pyx_f_4h5py_5utils_efree(__pyx_v_buf);
 
1363
    switch (__pyx_why) {
 
1364
      case 4: {
 
1365
        __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
 
1366
        __pyx_lineno = __pyx_exc_lineno;
 
1367
        __pyx_exc_type = 0;
 
1368
        __pyx_exc_value = 0;
 
1369
        __pyx_exc_tb = 0;
 
1370
        goto __pyx_L1_error;
 
1371
      }
 
1372
    }
 
1373
  }
 
1374
 
 
1375
  /* "/home/tachyon/h5py/h5py/h5s.pyx":181
 
1376
 *                 efree(buf)
 
1377
 * 
 
1378
 *             return pystr             # <<<<<<<<<<<<<<
 
1379
 * 
 
1380
 *     IF H5PY_18API:
 
1381
 */
 
1382
  __Pyx_XDECREF(__pyx_r);
 
1383
  __Pyx_INCREF(__pyx_v_pystr);
 
1384
  __pyx_r = __pyx_v_pystr;
 
1385
  goto __pyx_L0;
 
1386
 
 
1387
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1388
  goto __pyx_L0;
 
1389
  __pyx_L1_error:;
 
1390
  __Pyx_XDECREF(__pyx_t_1);
 
1391
  __Pyx_AddTraceback("h5py.h5s.SpaceID.encode");
 
1392
  __pyx_r = NULL;
 
1393
  __pyx_L0:;
 
1394
  __Pyx_DECREF(__pyx_v_pystr);
 
1395
  __Pyx_DECREF((PyObject *)__pyx_v_self);
 
1396
  __Pyx_XGIVEREF(__pyx_r);
 
1397
  __Pyx_RefNannyFinishContext();
 
1398
  return __pyx_r;
 
1399
}
 
1400
 
 
1401
/* "/home/tachyon/h5py/h5py/h5s.pyx":187
 
1402
 * 
 
1403
 * 
 
1404
 *         def __reduce__(self):             # <<<<<<<<<<<<<<
 
1405
 *             return (type(self), (-1,), self.encode())
 
1406
 * 
 
1407
 */
 
1408
 
 
1409
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID___reduce__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
1410
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID___reduce__(PyObject *__pyx_v_self, PyObject *unused) {
 
1411
  PyObject *__pyx_r = NULL;
 
1412
  PyObject *__pyx_t_1 = NULL;
 
1413
  PyObject *__pyx_t_2 = NULL;
 
1414
  PyObject *__pyx_t_3 = NULL;
 
1415
  __Pyx_RefNannySetupContext("__reduce__");
 
1416
 
 
1417
  /* "/home/tachyon/h5py/h5py/h5s.pyx":188
 
1418
 * 
 
1419
 *         def __reduce__(self):
 
1420
 *             return (type(self), (-1,), self.encode())             # <<<<<<<<<<<<<<
 
1421
 * 
 
1422
 * 
 
1423
 */
 
1424
  __Pyx_XDECREF(__pyx_r);
 
1425
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1426
  __Pyx_GOTREF(__pyx_t_1);
 
1427
  __Pyx_INCREF(__pyx_int_neg_1);
 
1428
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_neg_1);
 
1429
  __Pyx_GIVEREF(__pyx_int_neg_1);
 
1430
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1431
  __Pyx_GOTREF(__pyx_t_2);
 
1432
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1433
  __Pyx_GOTREF(__pyx_t_3);
 
1434
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
1435
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1436
  __Pyx_GOTREF(__pyx_t_2);
 
1437
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_self)));
 
1438
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(__pyx_v_self)));
 
1439
  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_self)));
 
1440
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
 
1441
  __Pyx_GIVEREF(__pyx_t_1);
 
1442
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_3);
 
1443
  __Pyx_GIVEREF(__pyx_t_3);
 
1444
  __pyx_t_1 = 0;
 
1445
  __pyx_t_3 = 0;
 
1446
  __pyx_r = __pyx_t_2;
 
1447
  __pyx_t_2 = 0;
 
1448
  goto __pyx_L0;
 
1449
 
 
1450
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1451
  goto __pyx_L0;
 
1452
  __pyx_L1_error:;
 
1453
  __Pyx_XDECREF(__pyx_t_1);
 
1454
  __Pyx_XDECREF(__pyx_t_2);
 
1455
  __Pyx_XDECREF(__pyx_t_3);
 
1456
  __Pyx_AddTraceback("h5py.h5s.SpaceID.__reduce__");
 
1457
  __pyx_r = NULL;
 
1458
  __pyx_L0:;
 
1459
  __Pyx_XGIVEREF(__pyx_r);
 
1460
  __Pyx_RefNannyFinishContext();
 
1461
  return __pyx_r;
 
1462
}
 
1463
 
 
1464
/* "/home/tachyon/h5py/h5py/h5s.pyx":191
 
1465
 * 
 
1466
 * 
 
1467
 *         def __setstate__(self, state):             # <<<<<<<<<<<<<<
 
1468
 *             cdef char* buf = state
 
1469
 *             self.id = H5Sdecode(buf)
 
1470
 */
 
1471
 
 
1472
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID___setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
 
1473
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID___setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
 
1474
  char *__pyx_v_buf;
 
1475
  PyObject *__pyx_r = NULL;
 
1476
  char *__pyx_t_1;
 
1477
  PyObject *__pyx_t_2 = NULL;
 
1478
  __Pyx_RefNannySetupContext("__setstate__");
 
1479
 
 
1480
  /* "/home/tachyon/h5py/h5py/h5s.pyx":192
 
1481
 * 
 
1482
 *         def __setstate__(self, state):
 
1483
 *             cdef char* buf = state             # <<<<<<<<<<<<<<
 
1484
 *             self.id = H5Sdecode(buf)
 
1485
 * 
 
1486
 */
 
1487
  __pyx_t_1 = __Pyx_PyBytes_AsString(__pyx_v_state); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1488
  __pyx_v_buf = __pyx_t_1;
 
1489
 
 
1490
  /* "/home/tachyon/h5py/h5py/h5s.pyx":193
 
1491
 *         def __setstate__(self, state):
 
1492
 *             cdef char* buf = state
 
1493
 *             self.id = H5Sdecode(buf)             # <<<<<<<<<<<<<<
 
1494
 * 
 
1495
 *     # === Simple dataspaces ===================================================
 
1496
 */
 
1497
  __pyx_t_2 = __Pyx_PyInt_to_py_hid_t(H5Sdecode(__pyx_v_buf)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1498
  __Pyx_GOTREF(__pyx_t_2);
 
1499
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__id, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1500
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
1501
 
 
1502
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1503
  goto __pyx_L0;
 
1504
  __pyx_L1_error:;
 
1505
  __Pyx_XDECREF(__pyx_t_2);
 
1506
  __Pyx_AddTraceback("h5py.h5s.SpaceID.__setstate__");
 
1507
  __pyx_r = NULL;
 
1508
  __pyx_L0:;
 
1509
  __Pyx_XGIVEREF(__pyx_r);
 
1510
  __Pyx_RefNannyFinishContext();
 
1511
  return __pyx_r;
 
1512
}
 
1513
 
 
1514
/* "/home/tachyon/h5py/h5py/h5s.pyx":198
1134
1515
 * 
1135
1516
 * 
1136
1517
 *     def is_simple(self):             # <<<<<<<<<<<<<<
1142
1523
static char __pyx_doc_4h5py_3h5s_7SpaceID_is_simple[] = "() => BOOL is_simple\n\n        Determine if an existing dataspace is \"simple\" (including scalar\n        dataspaces). Currently all HDF5 dataspaces are simple.\n        ";
1143
1524
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_is_simple(PyObject *__pyx_v_self, PyObject *unused) {
1144
1525
  PyObject *__pyx_r = NULL;
1145
 
  htri_t __pyx_t_1;
1146
 
  PyObject *__pyx_t_2 = NULL;
 
1526
  PyObject *__pyx_t_1 = NULL;
 
1527
  hid_t __pyx_t_2;
 
1528
  htri_t __pyx_t_3;
1147
1529
  __Pyx_RefNannySetupContext("is_simple");
1148
1530
 
1149
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":204
 
1531
  /* "/home/tachyon/h5py/h5py/h5s.pyx":204
1150
1532
 *         dataspaces). Currently all HDF5 dataspaces are simple.
1151
1533
 *         """
1152
1534
 *         return <bint>(H5Sis_simple(self.id))             # <<<<<<<<<<<<<<
1154
1536
 * 
1155
1537
 */
1156
1538
  __Pyx_XDECREF(__pyx_r);
1157
 
  __pyx_t_1 = H5Sis_simple(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1158
 
  __pyx_t_2 = __Pyx_PyBool_FromLong(((int)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1159
 
  __Pyx_GOTREF(__pyx_t_2);
1160
 
  __pyx_r = __pyx_t_2;
1161
 
  __pyx_t_2 = 0;
 
1539
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1540
  __Pyx_GOTREF(__pyx_t_1);
 
1541
  __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 = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1542
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
1543
  __pyx_t_3 = H5Sis_simple(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1544
  __pyx_t_1 = __Pyx_PyBool_FromLong(((int)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1545
  __Pyx_GOTREF(__pyx_t_1);
 
1546
  __pyx_r = __pyx_t_1;
 
1547
  __pyx_t_1 = 0;
1162
1548
  goto __pyx_L0;
1163
1549
 
1164
1550
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1165
1551
  goto __pyx_L0;
1166
1552
  __pyx_L1_error:;
1167
 
  __Pyx_XDECREF(__pyx_t_2);
 
1553
  __Pyx_XDECREF(__pyx_t_1);
1168
1554
  __Pyx_AddTraceback("h5py.h5s.SpaceID.is_simple");
1169
1555
  __pyx_r = NULL;
1170
1556
  __pyx_L0:;
1173
1559
  return __pyx_r;
1174
1560
}
1175
1561
 
1176
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":207
 
1562
/* "/home/tachyon/h5py/h5py/h5s.pyx":207
1177
1563
 * 
1178
1564
 * 
1179
1565
 *     def offset_simple(self, object offset=None):             # <<<<<<<<<<<<<<
1189
1575
  int __pyx_v_i;
1190
1576
  hssize_t *__pyx_v_dims;
1191
1577
  PyObject *__pyx_r = NULL;
1192
 
  htri_t __pyx_t_1;
1193
 
  int __pyx_t_2;
1194
 
  PyObject *__pyx_t_3 = NULL;
1195
 
  PyObject *__pyx_t_4 = NULL;
1196
 
  int __pyx_t_5;
1197
 
  void *__pyx_t_6;
1198
 
  herr_t __pyx_t_7;
 
1578
  PyObject *__pyx_t_1 = NULL;
 
1579
  hid_t __pyx_t_2;
 
1580
  htri_t __pyx_t_3;
 
1581
  int __pyx_t_4;
 
1582
  PyObject *__pyx_t_5 = NULL;
 
1583
  int __pyx_t_6;
 
1584
  void *__pyx_t_7;
 
1585
  herr_t __pyx_t_8;
1199
1586
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__offset,0};
1200
1587
  __Pyx_RefNannySetupContext("offset_simple");
1201
1588
  if (unlikely(__pyx_kwds)) {
1236
1623
  __Pyx_INCREF((PyObject *)__pyx_v_self);
1237
1624
  __Pyx_INCREF(__pyx_v_offset);
1238
1625
 
1239
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":216
 
1626
  /* "/home/tachyon/h5py/h5py/h5s.pyx":216
1240
1627
 *         cdef int rank
1241
1628
 *         cdef int i
1242
1629
 *         cdef hssize_t *dims = NULL             # <<<<<<<<<<<<<<
1245
1632
 */
1246
1633
  __pyx_v_dims = NULL;
1247
1634
 
1248
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":218
 
1635
  /* "/home/tachyon/h5py/h5py/h5s.pyx":218
1249
1636
 *         cdef hssize_t *dims = NULL
1250
1637
 * 
1251
1638
 *         try:             # <<<<<<<<<<<<<<
1254
1641
 */
1255
1642
  /*try:*/ {
1256
1643
 
1257
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":219
 
1644
    /* "/home/tachyon/h5py/h5py/h5s.pyx":219
1258
1645
 * 
1259
1646
 *         try:
1260
1647
 *             if not H5Sis_simple(self.id):             # <<<<<<<<<<<<<<
1261
1648
 *                 raise ValueError("%d is not a simple dataspace" % self.id)
1262
1649
 * 
1263
1650
 */
1264
 
    __pyx_t_1 = H5Sis_simple(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L7;}
1265
 
    __pyx_t_2 = (!__pyx_t_1);
1266
 
    if (__pyx_t_2) {
 
1651
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1652
    __Pyx_GOTREF(__pyx_t_1);
 
1653
    __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 = 219; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1654
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
1655
    __pyx_t_3 = H5Sis_simple(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1656
    __pyx_t_4 = (!__pyx_t_3);
 
1657
    if (__pyx_t_4) {
1267
1658
 
1268
 
      /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":220
 
1659
      /* "/home/tachyon/h5py/h5py/h5s.pyx":220
1269
1660
 *         try:
1270
1661
 *             if not H5Sis_simple(self.id):
1271
1662
 *                 raise ValueError("%d is not a simple dataspace" % self.id)             # <<<<<<<<<<<<<<
1272
1663
 * 
1273
1664
 *             rank = H5Sget_simple_extent_ndims(self.id)
1274
1665
 */
1275
 
      __pyx_t_3 = __Pyx_PyInt_to_py_hid_t(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L7;}
1276
 
      __Pyx_GOTREF(__pyx_t_3);
1277
 
      __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_2), __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L7;}
1278
 
      __Pyx_GOTREF(__pyx_t_4);
1279
 
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1280
 
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L7;}
1281
 
      __Pyx_GOTREF(__pyx_t_3);
1282
 
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
1283
 
      __Pyx_GIVEREF(__pyx_t_4);
1284
 
      __pyx_t_4 = 0;
1285
 
      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L7;}
1286
 
      __Pyx_GOTREF(__pyx_t_4);
1287
 
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1288
 
      __Pyx_Raise(__pyx_t_4, 0, 0);
1289
 
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
1666
      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1667
      __Pyx_GOTREF(__pyx_t_1);
 
1668
      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_2), __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1669
      __Pyx_GOTREF(__pyx_t_5);
 
1670
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
1671
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1672
      __Pyx_GOTREF(__pyx_t_1);
 
1673
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
 
1674
      __Pyx_GIVEREF(__pyx_t_5);
 
1675
      __pyx_t_5 = 0;
 
1676
      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1677
      __Pyx_GOTREF(__pyx_t_5);
 
1678
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
1679
      __Pyx_Raise(__pyx_t_5, 0, 0);
 
1680
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
1290
1681
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L7;}
1291
1682
      goto __pyx_L9;
1292
1683
    }
1293
1684
    __pyx_L9:;
1294
1685
 
1295
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":222
 
1686
    /* "/home/tachyon/h5py/h5py/h5s.pyx":222
1296
1687
 *                 raise ValueError("%d is not a simple dataspace" % self.id)
1297
1688
 * 
1298
1689
 *             rank = H5Sget_simple_extent_ndims(self.id)             # <<<<<<<<<<<<<<
1299
1690
 * 
1300
1691
 *             require_tuple(offset, 1, rank, "offset")
1301
1692
 */
1302
 
    __pyx_t_5 = H5Sget_simple_extent_ndims(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L7;}
1303
 
    __pyx_v_rank = __pyx_t_5;
 
1693
    __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1694
    __Pyx_GOTREF(__pyx_t_5);
 
1695
    __pyx_t_2 = __Pyx_PyInt_from_py_hid_t(__pyx_t_5); if (unlikely((__pyx_t_2 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1696
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
1697
    __pyx_t_6 = H5Sget_simple_extent_ndims(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1698
    __pyx_v_rank = __pyx_t_6;
1304
1699
 
1305
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":224
 
1700
    /* "/home/tachyon/h5py/h5py/h5s.pyx":224
1306
1701
 *             rank = H5Sget_simple_extent_ndims(self.id)
1307
1702
 * 
1308
1703
 *             require_tuple(offset, 1, rank, "offset")             # <<<<<<<<<<<<<<
1309
1704
 *             dims = <hssize_t*>emalloc(sizeof(hssize_t)*rank)
1310
1705
 *             if(offset is not None):
1311
1706
 */
1312
 
    __pyx_t_5 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_offset, 1, __pyx_v_rank, __pyx_k__offset); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1707
    __pyx_t_6 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_offset, 1, __pyx_v_rank, __pyx_k__offset); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L7;}
1313
1708
 
1314
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":225
 
1709
    /* "/home/tachyon/h5py/h5py/h5s.pyx":225
1315
1710
 * 
1316
1711
 *             require_tuple(offset, 1, rank, "offset")
1317
1712
 *             dims = <hssize_t*>emalloc(sizeof(hssize_t)*rank)             # <<<<<<<<<<<<<<
1318
1713
 *             if(offset is not None):
1319
1714
 *                 convert_tuple(offset, <hsize_t*>dims, rank)
1320
1715
 */
1321
 
    __pyx_t_6 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hssize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L7;}
1322
 
    __pyx_v_dims = ((hssize_t *)__pyx_t_6);
 
1716
    __pyx_t_7 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hssize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_7 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1717
    __pyx_v_dims = ((hssize_t *)__pyx_t_7);
1323
1718
 
1324
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":226
 
1719
    /* "/home/tachyon/h5py/h5py/h5s.pyx":226
1325
1720
 *             require_tuple(offset, 1, rank, "offset")
1326
1721
 *             dims = <hssize_t*>emalloc(sizeof(hssize_t)*rank)
1327
1722
 *             if(offset is not None):             # <<<<<<<<<<<<<<
1328
1723
 *                 convert_tuple(offset, <hsize_t*>dims, rank)
1329
1724
 *             else:
1330
1725
 */
1331
 
    __pyx_t_2 = (__pyx_v_offset != Py_None);
1332
 
    if (__pyx_t_2) {
 
1726
    __pyx_t_4 = (__pyx_v_offset != Py_None);
 
1727
    if (__pyx_t_4) {
1333
1728
 
1334
 
      /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":227
 
1729
      /* "/home/tachyon/h5py/h5py/h5s.pyx":227
1335
1730
 *             dims = <hssize_t*>emalloc(sizeof(hssize_t)*rank)
1336
1731
 *             if(offset is not None):
1337
1732
 *                 convert_tuple(offset, <hsize_t*>dims, rank)             # <<<<<<<<<<<<<<
1338
1733
 *             else:
1339
1734
 *                 # The HDF5 docs say passing in NULL resets the offset to 0.
1340
1735
 */
1341
 
      __pyx_t_5 = __pyx_f_4h5py_5utils_convert_tuple(__pyx_v_offset, ((hsize_t *)__pyx_v_dims), __pyx_v_rank); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1736
      __pyx_t_6 = __pyx_f_4h5py_5utils_convert_tuple(__pyx_v_offset, ((hsize_t *)__pyx_v_dims), __pyx_v_rank); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L7;}
1342
1737
      goto __pyx_L10;
1343
1738
    }
1344
1739
    /*else*/ {
1345
1740
 
1346
 
      /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":232
 
1741
      /* "/home/tachyon/h5py/h5py/h5s.pyx":232
1347
1742
 *                 # Instead it raises an exception.  Imagine my surprise. We'll
1348
1743
 *                 # do this manually.
1349
1744
 *                 for i from 0<=i<rank:             # <<<<<<<<<<<<<<
1350
1745
 *                     dims[i] = 0
1351
1746
 * 
1352
1747
 */
1353
 
      __pyx_t_5 = __pyx_v_rank;
1354
 
      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
 
1748
      __pyx_t_6 = __pyx_v_rank;
 
1749
      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {
1355
1750
 
1356
 
        /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":233
 
1751
        /* "/home/tachyon/h5py/h5py/h5s.pyx":233
1357
1752
 *                 # do this manually.
1358
1753
 *                 for i from 0<=i<rank:
1359
1754
 *                     dims[i] = 0             # <<<<<<<<<<<<<<
1365
1760
    }
1366
1761
    __pyx_L10:;
1367
1762
 
1368
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":235
 
1763
    /* "/home/tachyon/h5py/h5py/h5s.pyx":235
1369
1764
 *                     dims[i] = 0
1370
1765
 * 
1371
1766
 *             H5Soffset_simple(self.id, dims)             # <<<<<<<<<<<<<<
1372
1767
 * 
1373
1768
 *         finally:
1374
1769
 */
1375
 
    __pyx_t_7 = H5Soffset_simple(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id, __pyx_v_dims); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1770
    __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1771
    __Pyx_GOTREF(__pyx_t_5);
 
1772
    __pyx_t_2 = __Pyx_PyInt_from_py_hid_t(__pyx_t_5); if (unlikely((__pyx_t_2 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1773
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
1774
    __pyx_t_8 = H5Soffset_simple(__pyx_t_2, __pyx_v_dims); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L7;}
1376
1775
  }
1377
1776
  /*finally:*/ {
1378
1777
    int __pyx_why;
1382
1781
    __pyx_why = 0; goto __pyx_L8;
1383
1782
    __pyx_L7: {
1384
1783
      __pyx_why = 4;
1385
 
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
1386
 
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
 
1784
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
 
1785
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
1387
1786
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
1388
1787
      __pyx_exc_lineno = __pyx_lineno;
1389
1788
      goto __pyx_L8;
1390
1789
    }
1391
1790
    __pyx_L8:;
1392
1791
 
1393
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":238
 
1792
    /* "/home/tachyon/h5py/h5py/h5s.pyx":238
1394
1793
 * 
1395
1794
 *         finally:
1396
1795
 *             efree(dims)             # <<<<<<<<<<<<<<
1413
1812
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1414
1813
  goto __pyx_L0;
1415
1814
  __pyx_L1_error:;
1416
 
  __Pyx_XDECREF(__pyx_t_3);
1417
 
  __Pyx_XDECREF(__pyx_t_4);
 
1815
  __Pyx_XDECREF(__pyx_t_1);
 
1816
  __Pyx_XDECREF(__pyx_t_5);
1418
1817
  __Pyx_AddTraceback("h5py.h5s.SpaceID.offset_simple");
1419
1818
  __pyx_r = NULL;
1420
1819
  __pyx_L0:;
1425
1824
  return __pyx_r;
1426
1825
}
1427
1826
 
1428
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":241
 
1827
/* "/home/tachyon/h5py/h5py/h5s.pyx":241
1429
1828
 * 
1430
1829
 * 
1431
1830
 *     def get_simple_extent_ndims(self):             # <<<<<<<<<<<<<<
1437
1836
static char __pyx_doc_4h5py_3h5s_7SpaceID_get_simple_extent_ndims[] = "() => INT rank\n        \n        Determine the rank of a \"simple\" (slab) dataspace.\n        ";
1438
1837
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_simple_extent_ndims(PyObject *__pyx_v_self, PyObject *unused) {
1439
1838
  PyObject *__pyx_r = NULL;
1440
 
  int __pyx_t_1;
1441
 
  PyObject *__pyx_t_2 = NULL;
 
1839
  PyObject *__pyx_t_1 = NULL;
 
1840
  hid_t __pyx_t_2;
 
1841
  int __pyx_t_3;
1442
1842
  __Pyx_RefNannySetupContext("get_simple_extent_ndims");
1443
1843
 
1444
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":246
 
1844
  /* "/home/tachyon/h5py/h5py/h5s.pyx":246
1445
1845
 *         Determine the rank of a "simple" (slab) dataspace.
1446
1846
 *         """
1447
1847
 *         return H5Sget_simple_extent_ndims(self.id)             # <<<<<<<<<<<<<<
1449
1849
 * 
1450
1850
 */
1451
1851
  __Pyx_XDECREF(__pyx_r);
1452
 
  __pyx_t_1 = H5Sget_simple_extent_ndims(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1453
 
  __pyx_t_2 = PyInt_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1454
 
  __Pyx_GOTREF(__pyx_t_2);
1455
 
  __pyx_r = __pyx_t_2;
1456
 
  __pyx_t_2 = 0;
 
1852
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1853
  __Pyx_GOTREF(__pyx_t_1);
 
1854
  __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 = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1855
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
1856
  __pyx_t_3 = H5Sget_simple_extent_ndims(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1857
  __pyx_t_1 = PyInt_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1858
  __Pyx_GOTREF(__pyx_t_1);
 
1859
  __pyx_r = __pyx_t_1;
 
1860
  __pyx_t_1 = 0;
1457
1861
  goto __pyx_L0;
1458
1862
 
1459
1863
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1460
1864
  goto __pyx_L0;
1461
1865
  __pyx_L1_error:;
1462
 
  __Pyx_XDECREF(__pyx_t_2);
 
1866
  __Pyx_XDECREF(__pyx_t_1);
1463
1867
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_simple_extent_ndims");
1464
1868
  __pyx_r = NULL;
1465
1869
  __pyx_L0:;
1468
1872
  return __pyx_r;
1469
1873
}
1470
1874
 
1471
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":249
 
1875
/* "/home/tachyon/h5py/h5py/h5s.pyx":249
1472
1876
 * 
1473
1877
 * 
1474
1878
 *     def get_simple_extent_dims(self, int maxdims=0):             # <<<<<<<<<<<<<<
1483
1887
  int __pyx_v_rank;
1484
1888
  hsize_t *__pyx_v_dims;
1485
1889
  PyObject *__pyx_r = NULL;
1486
 
  int __pyx_t_1;
1487
 
  void *__pyx_t_2;
1488
 
  PyObject *__pyx_t_3 = NULL;
 
1890
  PyObject *__pyx_t_1 = NULL;
 
1891
  hid_t __pyx_t_2;
 
1892
  int __pyx_t_3;
 
1893
  void *__pyx_t_4;
1489
1894
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__maxdims,0};
1490
1895
  __Pyx_RefNannySetupContext("get_simple_extent_dims");
1491
1896
  if (unlikely(__pyx_kwds)) {
1528
1933
  __pyx_L4_argument_unpacking_done:;
1529
1934
  __Pyx_INCREF((PyObject *)__pyx_v_self);
1530
1935
 
1531
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":256
 
1936
  /* "/home/tachyon/h5py/h5py/h5s.pyx":256
1532
1937
 *         """
1533
1938
 *         cdef int rank
1534
1939
 *         cdef hsize_t* dims = NULL             # <<<<<<<<<<<<<<
1537
1942
 */
1538
1943
  __pyx_v_dims = NULL;
1539
1944
 
1540
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":258
 
1945
  /* "/home/tachyon/h5py/h5py/h5s.pyx":258
1541
1946
 *         cdef hsize_t* dims = NULL
1542
1947
 * 
1543
1948
 *         rank = H5Sget_simple_extent_dims(self.id, NULL, NULL)             # <<<<<<<<<<<<<<
1544
1949
 * 
1545
1950
 *         dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
1546
1951
 */
1547
 
  __pyx_t_1 = H5Sget_simple_extent_dims(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id, NULL, NULL); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1548
 
  __pyx_v_rank = __pyx_t_1;
 
1952
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1953
  __Pyx_GOTREF(__pyx_t_1);
 
1954
  __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 = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1955
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
1956
  __pyx_t_3 = H5Sget_simple_extent_dims(__pyx_t_2, NULL, NULL); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1957
  __pyx_v_rank = __pyx_t_3;
1549
1958
 
1550
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":260
 
1959
  /* "/home/tachyon/h5py/h5py/h5s.pyx":260
1551
1960
 *         rank = H5Sget_simple_extent_dims(self.id, NULL, NULL)
1552
1961
 * 
1553
1962
 *         dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
1554
1963
 *         try:
1555
1964
 *             if maxdims:
1556
1965
 */
1557
 
  __pyx_t_2 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_2 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1558
 
  __pyx_v_dims = ((hsize_t *)__pyx_t_2);
 
1966
  __pyx_t_4 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_4 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1967
  __pyx_v_dims = ((hsize_t *)__pyx_t_4);
1559
1968
 
1560
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":261
 
1969
  /* "/home/tachyon/h5py/h5py/h5s.pyx":261
1561
1970
 * 
1562
1971
 *         dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
1563
1972
 *         try:             # <<<<<<<<<<<<<<
1566
1975
 */
1567
1976
  /*try:*/ {
1568
1977
 
1569
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":262
 
1978
    /* "/home/tachyon/h5py/h5py/h5s.pyx":262
1570
1979
 *         dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
1571
1980
 *         try:
1572
1981
 *             if maxdims:             # <<<<<<<<<<<<<<
1573
1982
 *                 H5Sget_simple_extent_dims(self.id, NULL, dims)
1574
1983
 *             else:
1575
1984
 */
1576
 
    __pyx_t_1 = __pyx_v_maxdims;
1577
 
    if (__pyx_t_1) {
 
1985
    __pyx_t_3 = __pyx_v_maxdims;
 
1986
    if (__pyx_t_3) {
1578
1987
 
1579
 
      /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":263
 
1988
      /* "/home/tachyon/h5py/h5py/h5s.pyx":263
1580
1989
 *         try:
1581
1990
 *             if maxdims:
1582
1991
 *                 H5Sget_simple_extent_dims(self.id, NULL, dims)             # <<<<<<<<<<<<<<
1583
1992
 *             else:
1584
1993
 *                 H5Sget_simple_extent_dims(self.id, dims, NULL)
1585
1994
 */
1586
 
      __pyx_t_1 = H5Sget_simple_extent_dims(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id, NULL, __pyx_v_dims); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1995
      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1996
      __Pyx_GOTREF(__pyx_t_1);
 
1997
      __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 = 263; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1998
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
1999
      __pyx_t_3 = H5Sget_simple_extent_dims(__pyx_t_2, NULL, __pyx_v_dims); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L7;}
1587
2000
      goto __pyx_L9;
1588
2001
    }
1589
2002
    /*else*/ {
1590
2003
 
1591
 
      /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":265
 
2004
      /* "/home/tachyon/h5py/h5py/h5s.pyx":265
1592
2005
 *                 H5Sget_simple_extent_dims(self.id, NULL, dims)
1593
2006
 *             else:
1594
2007
 *                 H5Sget_simple_extent_dims(self.id, dims, NULL)             # <<<<<<<<<<<<<<
1595
2008
 * 
1596
2009
 *             return convert_dims(dims, rank)
1597
2010
 */
1598
 
      __pyx_t_1 = H5Sget_simple_extent_dims(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id, __pyx_v_dims, NULL); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
2011
      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
2012
      __Pyx_GOTREF(__pyx_t_1);
 
2013
      __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 = 265; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
2014
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2015
      __pyx_t_3 = H5Sget_simple_extent_dims(__pyx_t_2, __pyx_v_dims, NULL); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L7;}
1599
2016
    }
1600
2017
    __pyx_L9:;
1601
2018
 
1602
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":267
 
2019
    /* "/home/tachyon/h5py/h5py/h5s.pyx":267
1603
2020
 *                 H5Sget_simple_extent_dims(self.id, dims, NULL)
1604
2021
 * 
1605
2022
 *             return convert_dims(dims, rank)             # <<<<<<<<<<<<<<
1607
2024
 *         finally:
1608
2025
 */
1609
2026
    __Pyx_XDECREF(__pyx_r);
1610
 
    __pyx_t_3 = __pyx_f_4h5py_5utils_convert_dims(__pyx_v_dims, __pyx_v_rank); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L7;}
1611
 
    __Pyx_GOTREF(__pyx_t_3);
1612
 
    __pyx_r = __pyx_t_3;
1613
 
    __pyx_t_3 = 0;
 
2027
    __pyx_t_1 = __pyx_f_4h5py_5utils_convert_dims(__pyx_v_dims, __pyx_v_rank); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
2028
    __Pyx_GOTREF(__pyx_t_1);
 
2029
    __pyx_r = __pyx_t_1;
 
2030
    __pyx_t_1 = 0;
1614
2031
    goto __pyx_L6;
1615
2032
  }
1616
2033
  /*finally:*/ {
1623
2040
    __pyx_why = 3; goto __pyx_L8;
1624
2041
    __pyx_L7: {
1625
2042
      __pyx_why = 4;
1626
 
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
 
2043
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
1627
2044
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
1628
2045
      __pyx_exc_lineno = __pyx_lineno;
1629
2046
      goto __pyx_L8;
1630
2047
    }
1631
2048
    __pyx_L8:;
1632
2049
 
1633
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":270
 
2050
    /* "/home/tachyon/h5py/h5py/h5s.pyx":270
1634
2051
 * 
1635
2052
 *         finally:
1636
2053
 *             efree(dims)             # <<<<<<<<<<<<<<
1654
2071
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1655
2072
  goto __pyx_L0;
1656
2073
  __pyx_L1_error:;
1657
 
  __Pyx_XDECREF(__pyx_t_3);
 
2074
  __Pyx_XDECREF(__pyx_t_1);
1658
2075
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_simple_extent_dims");
1659
2076
  __pyx_r = NULL;
1660
2077
  __pyx_L0:;
1664
2081
  return __pyx_r;
1665
2082
}
1666
2083
 
1667
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":273
 
2084
/* "/home/tachyon/h5py/h5py/h5s.pyx":273
1668
2085
 * 
1669
2086
 * 
1670
2087
 *     def get_simple_extent_npoints(self):             # <<<<<<<<<<<<<<
1676
2093
static char __pyx_doc_4h5py_3h5s_7SpaceID_get_simple_extent_npoints[] = "() => LONG npoints\n\n        Determine the total number of elements in a dataspace.\n        ";
1677
2094
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_simple_extent_npoints(PyObject *__pyx_v_self, PyObject *unused) {
1678
2095
  PyObject *__pyx_r = NULL;
1679
 
  hssize_t __pyx_t_1;
1680
 
  PyObject *__pyx_t_2 = NULL;
 
2096
  PyObject *__pyx_t_1 = NULL;
 
2097
  hid_t __pyx_t_2;
 
2098
  hssize_t __pyx_t_3;
1681
2099
  __Pyx_RefNannySetupContext("get_simple_extent_npoints");
1682
2100
 
1683
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":278
 
2101
  /* "/home/tachyon/h5py/h5py/h5s.pyx":278
1684
2102
 *         Determine the total number of elements in a dataspace.
1685
2103
 *         """
1686
2104
 *         return H5Sget_simple_extent_npoints(self.id)             # <<<<<<<<<<<<<<
1688
2106
 * 
1689
2107
 */
1690
2108
  __Pyx_XDECREF(__pyx_r);
1691
 
  __pyx_t_1 = H5Sget_simple_extent_npoints(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1692
 
  __pyx_t_2 = __Pyx_PyInt_to_py_hssize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1693
 
  __Pyx_GOTREF(__pyx_t_2);
1694
 
  __pyx_r = __pyx_t_2;
1695
 
  __pyx_t_2 = 0;
 
2109
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2110
  __Pyx_GOTREF(__pyx_t_1);
 
2111
  __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 = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2112
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2113
  __pyx_t_3 = H5Sget_simple_extent_npoints(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2114
  __pyx_t_1 = __Pyx_PyInt_to_py_hssize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2115
  __Pyx_GOTREF(__pyx_t_1);
 
2116
  __pyx_r = __pyx_t_1;
 
2117
  __pyx_t_1 = 0;
1696
2118
  goto __pyx_L0;
1697
2119
 
1698
2120
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1699
2121
  goto __pyx_L0;
1700
2122
  __pyx_L1_error:;
1701
 
  __Pyx_XDECREF(__pyx_t_2);
 
2123
  __Pyx_XDECREF(__pyx_t_1);
1702
2124
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_simple_extent_npoints");
1703
2125
  __pyx_r = NULL;
1704
2126
  __pyx_L0:;
1707
2129
  return __pyx_r;
1708
2130
}
1709
2131
 
1710
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":281
 
2132
/* "/home/tachyon/h5py/h5py/h5s.pyx":281
1711
2133
 * 
1712
2134
 * 
1713
2135
 *     def get_simple_extent_type(self):             # <<<<<<<<<<<<<<
1719
2141
static char __pyx_doc_4h5py_3h5s_7SpaceID_get_simple_extent_type[] = "() => INT class_code\n\n        Class code is either SCALAR or SIMPLE.\n        ";
1720
2142
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_simple_extent_type(PyObject *__pyx_v_self, PyObject *unused) {
1721
2143
  PyObject *__pyx_r = NULL;
1722
 
  H5S_class_t __pyx_t_1;
1723
 
  PyObject *__pyx_t_2 = NULL;
 
2144
  PyObject *__pyx_t_1 = NULL;
 
2145
  hid_t __pyx_t_2;
 
2146
  H5S_class_t __pyx_t_3;
1724
2147
  __Pyx_RefNannySetupContext("get_simple_extent_type");
1725
2148
 
1726
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":286
 
2149
  /* "/home/tachyon/h5py/h5py/h5s.pyx":286
1727
2150
 *         Class code is either SCALAR or SIMPLE.
1728
2151
 *         """
1729
2152
 *         return <int>H5Sget_simple_extent_type(self.id)             # <<<<<<<<<<<<<<
1731
2154
 *     # === Extents =============================================================
1732
2155
 */
1733
2156
  __Pyx_XDECREF(__pyx_r);
1734
 
  __pyx_t_1 = H5Sget_simple_extent_type(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1735
 
  __pyx_t_2 = PyInt_FromLong(((int)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1736
 
  __Pyx_GOTREF(__pyx_t_2);
1737
 
  __pyx_r = __pyx_t_2;
1738
 
  __pyx_t_2 = 0;
 
2157
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2158
  __Pyx_GOTREF(__pyx_t_1);
 
2159
  __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 = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2160
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2161
  __pyx_t_3 = H5Sget_simple_extent_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2162
  __pyx_t_1 = PyInt_FromLong(((int)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2163
  __Pyx_GOTREF(__pyx_t_1);
 
2164
  __pyx_r = __pyx_t_1;
 
2165
  __pyx_t_1 = 0;
1739
2166
  goto __pyx_L0;
1740
2167
 
1741
2168
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1742
2169
  goto __pyx_L0;
1743
2170
  __pyx_L1_error:;
1744
 
  __Pyx_XDECREF(__pyx_t_2);
 
2171
  __Pyx_XDECREF(__pyx_t_1);
1745
2172
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_simple_extent_type");
1746
2173
  __pyx_r = NULL;
1747
2174
  __pyx_L0:;
1750
2177
  return __pyx_r;
1751
2178
}
1752
2179
 
1753
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":291
 
2180
/* "/home/tachyon/h5py/h5py/h5s.pyx":291
1754
2181
 * 
1755
2182
 * 
1756
2183
 *     def extent_copy(self, SpaceID source not None):             # <<<<<<<<<<<<<<
1762
2189
static char __pyx_doc_4h5py_3h5s_7SpaceID_extent_copy[] = "(SpaceID source)\n\n        Replace this dataspace's extent with another's, changing its\n        typecode if necessary.\n        ";
1763
2190
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_extent_copy(PyObject *__pyx_v_self, PyObject *__pyx_v_source) {
1764
2191
  PyObject *__pyx_r = NULL;
1765
 
  herr_t __pyx_t_1;
 
2192
  PyObject *__pyx_t_1 = NULL;
 
2193
  hid_t __pyx_t_2;
 
2194
  hid_t __pyx_t_3;
 
2195
  herr_t __pyx_t_4;
1766
2196
  __Pyx_RefNannySetupContext("extent_copy");
1767
2197
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_source), __pyx_ptype_4h5py_3h5s_SpaceID, 0, "source", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1768
2198
 
1769
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":297
 
2199
  /* "/home/tachyon/h5py/h5py/h5s.pyx":297
1770
2200
 *         typecode if necessary.
1771
2201
 *         """
1772
2202
 *         H5Sextent_copy(self.id, source.id)             # <<<<<<<<<<<<<<
1773
2203
 * 
1774
2204
 * 
1775
2205
 */
1776
 
  __pyx_t_1 = H5Sextent_copy(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id, ((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_source)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2206
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2207
  __Pyx_GOTREF(__pyx_t_1);
 
2208
  __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 = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2209
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2210
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_source, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2211
  __Pyx_GOTREF(__pyx_t_1);
 
2212
  __pyx_t_3 = __Pyx_PyInt_from_py_hid_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2213
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2214
  __pyx_t_4 = H5Sextent_copy(__pyx_t_2, __pyx_t_3); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1777
2215
 
1778
2216
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1779
2217
  goto __pyx_L0;
1780
2218
  __pyx_L1_error:;
 
2219
  __Pyx_XDECREF(__pyx_t_1);
1781
2220
  __Pyx_AddTraceback("h5py.h5s.SpaceID.extent_copy");
1782
2221
  __pyx_r = NULL;
1783
2222
  __pyx_L0:;
1786
2225
  return __pyx_r;
1787
2226
}
1788
2227
 
1789
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":300
 
2228
/* "/home/tachyon/h5py/h5py/h5s.pyx":300
1790
2229
 * 
1791
2230
 * 
1792
2231
 *     def set_extent_simple(self, object dims_tpl, object max_dims_tpl=None):             # <<<<<<<<<<<<<<
1807
2246
  Py_ssize_t __pyx_t_2;
1808
2247
  void *__pyx_t_3;
1809
2248
  int __pyx_t_4;
1810
 
  herr_t __pyx_t_5;
 
2249
  PyObject *__pyx_t_5 = NULL;
 
2250
  hid_t __pyx_t_6;
 
2251
  herr_t __pyx_t_7;
1811
2252
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dims_tpl,&__pyx_n_s__max_dims_tpl,0};
1812
2253
  __Pyx_RefNannySetupContext("set_extent_simple");
1813
2254
  if (unlikely(__pyx_kwds)) {
1856
2297
  __Pyx_INCREF(__pyx_v_dims_tpl);
1857
2298
  __Pyx_INCREF(__pyx_v_max_dims_tpl);
1858
2299
 
1859
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":311
 
2300
  /* "/home/tachyon/h5py/h5py/h5s.pyx":311
1860
2301
 *         """
1861
2302
 *         cdef int rank
1862
2303
 *         cdef hsize_t* dims = NULL             # <<<<<<<<<<<<<<
1865
2306
 */
1866
2307
  __pyx_v_dims = NULL;
1867
2308
 
1868
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":312
 
2309
  /* "/home/tachyon/h5py/h5py/h5s.pyx":312
1869
2310
 *         cdef int rank
1870
2311
 *         cdef hsize_t* dims = NULL
1871
2312
 *         cdef hsize_t* max_dims = NULL             # <<<<<<<<<<<<<<
1874
2315
 */
1875
2316
  __pyx_v_max_dims = NULL;
1876
2317
 
1877
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":314
 
2318
  /* "/home/tachyon/h5py/h5py/h5s.pyx":314
1878
2319
 *         cdef hsize_t* max_dims = NULL
1879
2320
 * 
1880
2321
 *         require_tuple(dims_tpl, 0, -1, "dims_tpl")             # <<<<<<<<<<<<<<
1883
2324
 */
1884
2325
  __pyx_t_1 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_dims_tpl, 0, -1, __pyx_k__dims_tpl); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1885
2326
 
1886
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":315
 
2327
  /* "/home/tachyon/h5py/h5py/h5s.pyx":315
1887
2328
 * 
1888
2329
 *         require_tuple(dims_tpl, 0, -1, "dims_tpl")
1889
2330
 *         rank = len(dims_tpl)             # <<<<<<<<<<<<<<
1893
2334
  __pyx_t_2 = PyObject_Length(__pyx_v_dims_tpl); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1894
2335
  __pyx_v_rank = __pyx_t_2;
1895
2336
 
1896
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":316
 
2337
  /* "/home/tachyon/h5py/h5py/h5s.pyx":316
1897
2338
 *         require_tuple(dims_tpl, 0, -1, "dims_tpl")
1898
2339
 *         rank = len(dims_tpl)
1899
2340
 *         require_tuple(max_dims_tpl, 1, rank, "max_dims_tpl")             # <<<<<<<<<<<<<<
1902
2343
 */
1903
2344
  __pyx_t_1 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_max_dims_tpl, 1, __pyx_v_rank, __pyx_k__max_dims_tpl); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1904
2345
 
1905
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":318
 
2346
  /* "/home/tachyon/h5py/h5py/h5s.pyx":318
1906
2347
 *         require_tuple(max_dims_tpl, 1, rank, "max_dims_tpl")
1907
2348
 * 
1908
2349
 *         try:             # <<<<<<<<<<<<<<
1911
2352
 */
1912
2353
  /*try:*/ {
1913
2354
 
1914
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":319
 
2355
    /* "/home/tachyon/h5py/h5py/h5s.pyx":319
1915
2356
 * 
1916
2357
 *         try:
1917
2358
 *             dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
1921
2362
    __pyx_t_3 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_3 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L7;}
1922
2363
    __pyx_v_dims = ((hsize_t *)__pyx_t_3);
1923
2364
 
1924
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":320
 
2365
    /* "/home/tachyon/h5py/h5py/h5s.pyx":320
1925
2366
 *         try:
1926
2367
 *             dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
1927
2368
 *             convert_tuple(dims_tpl, dims, rank)             # <<<<<<<<<<<<<<
1930
2371
 */
1931
2372
    __pyx_t_1 = __pyx_f_4h5py_5utils_convert_tuple(__pyx_v_dims_tpl, __pyx_v_dims, __pyx_v_rank); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L7;}
1932
2373
 
1933
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":322
 
2374
    /* "/home/tachyon/h5py/h5py/h5s.pyx":322
1934
2375
 *             convert_tuple(dims_tpl, dims, rank)
1935
2376
 * 
1936
2377
 *             if max_dims_tpl is not None:             # <<<<<<<<<<<<<<
1940
2381
    __pyx_t_4 = (__pyx_v_max_dims_tpl != Py_None);
1941
2382
    if (__pyx_t_4) {
1942
2383
 
1943
 
      /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":323
 
2384
      /* "/home/tachyon/h5py/h5py/h5s.pyx":323
1944
2385
 * 
1945
2386
 *             if max_dims_tpl is not None:
1946
2387
 *                 max_dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
1950
2391
      __pyx_t_3 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_3 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L7;}
1951
2392
      __pyx_v_max_dims = ((hsize_t *)__pyx_t_3);
1952
2393
 
1953
 
      /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":324
 
2394
      /* "/home/tachyon/h5py/h5py/h5s.pyx":324
1954
2395
 *             if max_dims_tpl is not None:
1955
2396
 *                 max_dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
1956
2397
 *                 convert_tuple(max_dims_tpl, max_dims, rank)             # <<<<<<<<<<<<<<
1962
2403
    }
1963
2404
    __pyx_L9:;
1964
2405
 
1965
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":326
 
2406
    /* "/home/tachyon/h5py/h5py/h5s.pyx":326
1966
2407
 *                 convert_tuple(max_dims_tpl, max_dims, rank)
1967
2408
 * 
1968
2409
 *             H5Sset_extent_simple(self.id, rank, dims, max_dims)             # <<<<<<<<<<<<<<
1969
2410
 * 
1970
2411
 *         finally:
1971
2412
 */
1972
 
    __pyx_t_5 = H5Sset_extent_simple(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id, __pyx_v_rank, __pyx_v_dims, __pyx_v_max_dims); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
2413
    __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
2414
    __Pyx_GOTREF(__pyx_t_5);
 
2415
    __pyx_t_6 = __Pyx_PyInt_from_py_hid_t(__pyx_t_5); if (unlikely((__pyx_t_6 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
2416
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
2417
    __pyx_t_7 = H5Sset_extent_simple(__pyx_t_6, __pyx_v_rank, __pyx_v_dims, __pyx_v_max_dims); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L7;}
1973
2418
  }
1974
2419
  /*finally:*/ {
1975
2420
    int __pyx_why;
1979
2424
    __pyx_why = 0; goto __pyx_L8;
1980
2425
    __pyx_L7: {
1981
2426
      __pyx_why = 4;
 
2427
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
1982
2428
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
1983
2429
      __pyx_exc_lineno = __pyx_lineno;
1984
2430
      goto __pyx_L8;
1985
2431
    }
1986
2432
    __pyx_L8:;
1987
2433
 
1988
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":329
 
2434
    /* "/home/tachyon/h5py/h5py/h5s.pyx":329
1989
2435
 * 
1990
2436
 *         finally:
1991
2437
 *             efree(dims)             # <<<<<<<<<<<<<<
1994
2440
 */
1995
2441
    __pyx_f_4h5py_5utils_efree(__pyx_v_dims);
1996
2442
 
1997
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":330
 
2443
    /* "/home/tachyon/h5py/h5py/h5s.pyx":330
1998
2444
 *         finally:
1999
2445
 *             efree(dims)
2000
2446
 *             efree(max_dims)             # <<<<<<<<<<<<<<
2017
2463
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2018
2464
  goto __pyx_L0;
2019
2465
  __pyx_L1_error:;
 
2466
  __Pyx_XDECREF(__pyx_t_5);
2020
2467
  __Pyx_AddTraceback("h5py.h5s.SpaceID.set_extent_simple");
2021
2468
  __pyx_r = NULL;
2022
2469
  __pyx_L0:;
2028
2475
  return __pyx_r;
2029
2476
}
2030
2477
 
2031
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":333
 
2478
/* "/home/tachyon/h5py/h5py/h5s.pyx":333
2032
2479
 * 
2033
2480
 * 
2034
2481
 *     def set_extent_none(self):             # <<<<<<<<<<<<<<
2040
2487
static char __pyx_doc_4h5py_3h5s_7SpaceID_set_extent_none[] = "()\n\n        Remove the dataspace extent; typecode changes to NO_CLASS.\n        ";
2041
2488
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_set_extent_none(PyObject *__pyx_v_self, PyObject *unused) {
2042
2489
  PyObject *__pyx_r = NULL;
2043
 
  herr_t __pyx_t_1;
 
2490
  PyObject *__pyx_t_1 = NULL;
 
2491
  hid_t __pyx_t_2;
 
2492
  herr_t __pyx_t_3;
2044
2493
  __Pyx_RefNannySetupContext("set_extent_none");
2045
2494
 
2046
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":338
 
2495
  /* "/home/tachyon/h5py/h5py/h5s.pyx":338
2047
2496
 *         Remove the dataspace extent; typecode changes to NO_CLASS.
2048
2497
 *         """
2049
2498
 *         H5Sset_extent_none(self.id)             # <<<<<<<<<<<<<<
2050
2499
 * 
2051
2500
 *     # === General selection operations ========================================
2052
2501
 */
2053
 
  __pyx_t_1 = H5Sset_extent_none(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2502
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2503
  __Pyx_GOTREF(__pyx_t_1);
 
2504
  __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 = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2505
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2506
  __pyx_t_3 = H5Sset_extent_none(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2054
2507
 
2055
2508
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2056
2509
  goto __pyx_L0;
2057
2510
  __pyx_L1_error:;
 
2511
  __Pyx_XDECREF(__pyx_t_1);
2058
2512
  __Pyx_AddTraceback("h5py.h5s.SpaceID.set_extent_none");
2059
2513
  __pyx_r = NULL;
2060
2514
  __pyx_L0:;
2063
2517
  return __pyx_r;
2064
2518
}
2065
2519
 
2066
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":343
 
2520
/* "/home/tachyon/h5py/h5py/h5s.pyx":343
2067
2521
 * 
2068
2522
 * 
2069
2523
 *     def get_select_type(self):             # <<<<<<<<<<<<<<
2075
2529
static char __pyx_doc_4h5py_3h5s_7SpaceID_get_select_type[] = " () => INT select_code\n\n            Determine selection type.  Return values are:\n\n            - SEL_NONE\n            - SEL_ALL\n            - SEL_POINTS\n            - SEL_HYPERSLABS\n        ";
2076
2530
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_type(PyObject *__pyx_v_self, PyObject *unused) {
2077
2531
  PyObject *__pyx_r = NULL;
2078
 
  H5S_sel_type __pyx_t_1;
2079
 
  PyObject *__pyx_t_2 = NULL;
 
2532
  PyObject *__pyx_t_1 = NULL;
 
2533
  hid_t __pyx_t_2;
 
2534
  H5S_sel_type __pyx_t_3;
2080
2535
  __Pyx_RefNannySetupContext("get_select_type");
2081
2536
 
2082
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":353
 
2537
  /* "/home/tachyon/h5py/h5py/h5s.pyx":353
2083
2538
 *             - SEL_HYPERSLABS
2084
2539
 *         """
2085
2540
 *         return <int>H5Sget_select_type(self.id)             # <<<<<<<<<<<<<<
2087
2542
 * 
2088
2543
 */
2089
2544
  __Pyx_XDECREF(__pyx_r);
2090
 
  __pyx_t_1 = H5Sget_select_type(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2091
 
  __pyx_t_2 = PyInt_FromLong(((int)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2092
 
  __Pyx_GOTREF(__pyx_t_2);
2093
 
  __pyx_r = __pyx_t_2;
2094
 
  __pyx_t_2 = 0;
 
2545
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2546
  __Pyx_GOTREF(__pyx_t_1);
 
2547
  __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 = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2548
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2549
  __pyx_t_3 = H5Sget_select_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2550
  __pyx_t_1 = PyInt_FromLong(((int)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2551
  __Pyx_GOTREF(__pyx_t_1);
 
2552
  __pyx_r = __pyx_t_1;
 
2553
  __pyx_t_1 = 0;
2095
2554
  goto __pyx_L0;
2096
2555
 
2097
2556
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2098
2557
  goto __pyx_L0;
2099
2558
  __pyx_L1_error:;
2100
 
  __Pyx_XDECREF(__pyx_t_2);
 
2559
  __Pyx_XDECREF(__pyx_t_1);
2101
2560
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_select_type");
2102
2561
  __pyx_r = NULL;
2103
2562
  __pyx_L0:;
2106
2565
  return __pyx_r;
2107
2566
}
2108
2567
 
2109
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":356
 
2568
/* "/home/tachyon/h5py/h5py/h5s.pyx":356
2110
2569
 * 
2111
2570
 * 
2112
2571
 *     def get_select_npoints(self):             # <<<<<<<<<<<<<<
2118
2577
static char __pyx_doc_4h5py_3h5s_7SpaceID_get_select_npoints[] = "() => LONG npoints\n\n        Determine the total number of points currently selected.  \n        Works for all selection techniques.\n        ";
2119
2578
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_npoints(PyObject *__pyx_v_self, PyObject *unused) {
2120
2579
  PyObject *__pyx_r = NULL;
2121
 
  hssize_t __pyx_t_1;
2122
 
  PyObject *__pyx_t_2 = NULL;
 
2580
  PyObject *__pyx_t_1 = NULL;
 
2581
  hid_t __pyx_t_2;
 
2582
  hssize_t __pyx_t_3;
2123
2583
  __Pyx_RefNannySetupContext("get_select_npoints");
2124
2584
 
2125
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":362
 
2585
  /* "/home/tachyon/h5py/h5py/h5s.pyx":362
2126
2586
 *         Works for all selection techniques.
2127
2587
 *         """
2128
2588
 *         return H5Sget_select_npoints(self.id)             # <<<<<<<<<<<<<<
2130
2590
 * 
2131
2591
 */
2132
2592
  __Pyx_XDECREF(__pyx_r);
2133
 
  __pyx_t_1 = H5Sget_select_npoints(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2134
 
  __pyx_t_2 = __Pyx_PyInt_to_py_hssize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2135
 
  __Pyx_GOTREF(__pyx_t_2);
2136
 
  __pyx_r = __pyx_t_2;
2137
 
  __pyx_t_2 = 0;
 
2593
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2594
  __Pyx_GOTREF(__pyx_t_1);
 
2595
  __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 = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2596
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2597
  __pyx_t_3 = H5Sget_select_npoints(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2598
  __pyx_t_1 = __Pyx_PyInt_to_py_hssize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2599
  __Pyx_GOTREF(__pyx_t_1);
 
2600
  __pyx_r = __pyx_t_1;
 
2601
  __pyx_t_1 = 0;
2138
2602
  goto __pyx_L0;
2139
2603
 
2140
2604
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2141
2605
  goto __pyx_L0;
2142
2606
  __pyx_L1_error:;
2143
 
  __Pyx_XDECREF(__pyx_t_2);
 
2607
  __Pyx_XDECREF(__pyx_t_1);
2144
2608
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_select_npoints");
2145
2609
  __pyx_r = NULL;
2146
2610
  __pyx_L0:;
2149
2613
  return __pyx_r;
2150
2614
}
2151
2615
 
2152
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":365
 
2616
/* "/home/tachyon/h5py/h5py/h5s.pyx":365
2153
2617
 * 
2154
2618
 * 
2155
2619
 *     def get_select_bounds(self):             # <<<<<<<<<<<<<<
2166
2630
  PyObject *__pyx_v_start_tpl;
2167
2631
  PyObject *__pyx_v_end_tpl;
2168
2632
  PyObject *__pyx_r = NULL;
2169
 
  int __pyx_t_1;
2170
 
  hssize_t __pyx_t_2;
 
2633
  PyObject *__pyx_t_1 = NULL;
 
2634
  hid_t __pyx_t_2;
2171
2635
  int __pyx_t_3;
2172
 
  void *__pyx_t_4;
2173
 
  herr_t __pyx_t_5;
2174
 
  PyObject *__pyx_t_6 = NULL;
 
2636
  hssize_t __pyx_t_4;
 
2637
  int __pyx_t_5;
 
2638
  void *__pyx_t_6;
 
2639
  herr_t __pyx_t_7;
2175
2640
  __Pyx_RefNannySetupContext("get_select_bounds");
2176
2641
  __Pyx_INCREF((PyObject *)__pyx_v_self);
2177
2642
  __pyx_v_start_tpl = Py_None; __Pyx_INCREF(Py_None);
2178
2643
  __pyx_v_end_tpl = Py_None; __Pyx_INCREF(Py_None);
2179
2644
 
2180
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":372
 
2645
  /* "/home/tachyon/h5py/h5py/h5s.pyx":372
2181
2646
 *         """
2182
2647
 *         cdef int rank
2183
2648
 *         cdef hsize_t *start = NULL             # <<<<<<<<<<<<<<
2186
2651
 */
2187
2652
  __pyx_v_start = NULL;
2188
2653
 
2189
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":373
 
2654
  /* "/home/tachyon/h5py/h5py/h5s.pyx":373
2190
2655
 *         cdef int rank
2191
2656
 *         cdef hsize_t *start = NULL
2192
2657
 *         cdef hsize_t *end = NULL             # <<<<<<<<<<<<<<
2195
2660
 */
2196
2661
  __pyx_v_end = NULL;
2197
2662
 
2198
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":375
 
2663
  /* "/home/tachyon/h5py/h5py/h5s.pyx":375
2199
2664
 *         cdef hsize_t *end = NULL
2200
2665
 * 
2201
2666
 *         rank = H5Sget_simple_extent_ndims(self.id)             # <<<<<<<<<<<<<<
2202
2667
 * 
2203
2668
 *         if H5Sget_select_npoints(self.id) == 0:
2204
2669
 */
2205
 
  __pyx_t_1 = H5Sget_simple_extent_ndims(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2206
 
  __pyx_v_rank = __pyx_t_1;
 
2670
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2671
  __Pyx_GOTREF(__pyx_t_1);
 
2672
  __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 = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2673
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2674
  __pyx_t_3 = H5Sget_simple_extent_ndims(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2675
  __pyx_v_rank = __pyx_t_3;
2207
2676
 
2208
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":377
 
2677
  /* "/home/tachyon/h5py/h5py/h5s.pyx":377
2209
2678
 *         rank = H5Sget_simple_extent_ndims(self.id)
2210
2679
 * 
2211
2680
 *         if H5Sget_select_npoints(self.id) == 0:             # <<<<<<<<<<<<<<
2212
2681
 *             return None
2213
2682
 * 
2214
2683
 */
2215
 
  __pyx_t_2 = H5Sget_select_npoints(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2216
 
  __pyx_t_3 = (__pyx_t_2 == 0);
2217
 
  if (__pyx_t_3) {
 
2684
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2685
  __Pyx_GOTREF(__pyx_t_1);
 
2686
  __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 = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2687
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2688
  __pyx_t_4 = H5Sget_select_npoints(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2689
  __pyx_t_5 = (__pyx_t_4 == 0);
 
2690
  if (__pyx_t_5) {
2218
2691
 
2219
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":378
 
2692
    /* "/home/tachyon/h5py/h5py/h5s.pyx":378
2220
2693
 * 
2221
2694
 *         if H5Sget_select_npoints(self.id) == 0:
2222
2695
 *             return None             # <<<<<<<<<<<<<<
2231
2704
  }
2232
2705
  __pyx_L5:;
2233
2706
 
2234
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":380
 
2707
  /* "/home/tachyon/h5py/h5py/h5s.pyx":380
2235
2708
 *             return None
2236
2709
 * 
2237
2710
 *         start = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
2238
2711
 *         end = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
2239
2712
 * 
2240
2713
 */
2241
 
  __pyx_t_4 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_4 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2242
 
  __pyx_v_start = ((hsize_t *)__pyx_t_4);
 
2714
  __pyx_t_6 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2715
  __pyx_v_start = ((hsize_t *)__pyx_t_6);
2243
2716
 
2244
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":381
 
2717
  /* "/home/tachyon/h5py/h5py/h5s.pyx":381
2245
2718
 * 
2246
2719
 *         start = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
2247
2720
 *         end = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
2248
2721
 * 
2249
2722
 *         try:
2250
2723
 */
2251
 
  __pyx_t_4 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_4 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2252
 
  __pyx_v_end = ((hsize_t *)__pyx_t_4);
 
2724
  __pyx_t_6 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2725
  __pyx_v_end = ((hsize_t *)__pyx_t_6);
2253
2726
 
2254
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":383
 
2727
  /* "/home/tachyon/h5py/h5py/h5s.pyx":383
2255
2728
 *         end = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
2256
2729
 * 
2257
2730
 *         try:             # <<<<<<<<<<<<<<
2260
2733
 */
2261
2734
  /*try:*/ {
2262
2735
 
2263
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":384
 
2736
    /* "/home/tachyon/h5py/h5py/h5s.pyx":384
2264
2737
 * 
2265
2738
 *         try:
2266
2739
 *             H5Sget_select_bounds(self.id, start, end)             # <<<<<<<<<<<<<<
2267
2740
 * 
2268
2741
 *             start_tpl = convert_dims(start, rank)
2269
2742
 */
2270
 
    __pyx_t_5 = H5Sget_select_bounds(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id, __pyx_v_start, __pyx_v_end); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
2743
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
2744
    __Pyx_GOTREF(__pyx_t_1);
 
2745
    __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 = 384; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
2746
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2747
    __pyx_t_7 = H5Sget_select_bounds(__pyx_t_2, __pyx_v_start, __pyx_v_end); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L7;}
2271
2748
 
2272
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":386
 
2749
    /* "/home/tachyon/h5py/h5py/h5s.pyx":386
2273
2750
 *             H5Sget_select_bounds(self.id, start, end)
2274
2751
 * 
2275
2752
 *             start_tpl = convert_dims(start, rank)             # <<<<<<<<<<<<<<
2276
2753
 *             end_tpl = convert_dims(end, rank)
2277
2754
 *             return (start_tpl, end_tpl)
2278
2755
 */
2279
 
    __pyx_t_6 = __pyx_f_4h5py_5utils_convert_dims(__pyx_v_start, __pyx_v_rank); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L7;}
2280
 
    __Pyx_GOTREF(__pyx_t_6);
 
2756
    __pyx_t_1 = __pyx_f_4h5py_5utils_convert_dims(__pyx_v_start, __pyx_v_rank); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
2757
    __Pyx_GOTREF(__pyx_t_1);
2281
2758
    __Pyx_DECREF(__pyx_v_start_tpl);
2282
 
    __pyx_v_start_tpl = __pyx_t_6;
2283
 
    __pyx_t_6 = 0;
 
2759
    __pyx_v_start_tpl = __pyx_t_1;
 
2760
    __pyx_t_1 = 0;
2284
2761
 
2285
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":387
 
2762
    /* "/home/tachyon/h5py/h5py/h5s.pyx":387
2286
2763
 * 
2287
2764
 *             start_tpl = convert_dims(start, rank)
2288
2765
 *             end_tpl = convert_dims(end, rank)             # <<<<<<<<<<<<<<
2289
2766
 *             return (start_tpl, end_tpl)
2290
2767
 * 
2291
2768
 */
2292
 
    __pyx_t_6 = __pyx_f_4h5py_5utils_convert_dims(__pyx_v_end, __pyx_v_rank); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L7;}
2293
 
    __Pyx_GOTREF(__pyx_t_6);
 
2769
    __pyx_t_1 = __pyx_f_4h5py_5utils_convert_dims(__pyx_v_end, __pyx_v_rank); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
2770
    __Pyx_GOTREF(__pyx_t_1);
2294
2771
    __Pyx_DECREF(__pyx_v_end_tpl);
2295
 
    __pyx_v_end_tpl = __pyx_t_6;
2296
 
    __pyx_t_6 = 0;
 
2772
    __pyx_v_end_tpl = __pyx_t_1;
 
2773
    __pyx_t_1 = 0;
2297
2774
 
2298
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":388
 
2775
    /* "/home/tachyon/h5py/h5py/h5s.pyx":388
2299
2776
 *             start_tpl = convert_dims(start, rank)
2300
2777
 *             end_tpl = convert_dims(end, rank)
2301
2778
 *             return (start_tpl, end_tpl)             # <<<<<<<<<<<<<<
2303
2780
 *         finally:
2304
2781
 */
2305
2782
    __Pyx_XDECREF(__pyx_r);
2306
 
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L7;}
2307
 
    __Pyx_GOTREF(__pyx_t_6);
 
2783
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
2784
    __Pyx_GOTREF(__pyx_t_1);
2308
2785
    __Pyx_INCREF(__pyx_v_start_tpl);
2309
 
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_start_tpl);
 
2786
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_start_tpl);
2310
2787
    __Pyx_GIVEREF(__pyx_v_start_tpl);
2311
2788
    __Pyx_INCREF(__pyx_v_end_tpl);
2312
 
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_end_tpl);
 
2789
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_end_tpl);
2313
2790
    __Pyx_GIVEREF(__pyx_v_end_tpl);
2314
 
    __pyx_r = __pyx_t_6;
2315
 
    __pyx_t_6 = 0;
 
2791
    __pyx_r = __pyx_t_1;
 
2792
    __pyx_t_1 = 0;
2316
2793
    goto __pyx_L6;
2317
2794
  }
2318
2795
  /*finally:*/ {
2325
2802
    __pyx_why = 3; goto __pyx_L8;
2326
2803
    __pyx_L7: {
2327
2804
      __pyx_why = 4;
2328
 
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 
2805
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
2329
2806
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
2330
2807
      __pyx_exc_lineno = __pyx_lineno;
2331
2808
      goto __pyx_L8;
2332
2809
    }
2333
2810
    __pyx_L8:;
2334
2811
 
2335
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":391
 
2812
    /* "/home/tachyon/h5py/h5py/h5s.pyx":391
2336
2813
 * 
2337
2814
 *         finally:
2338
2815
 *             efree(start)             # <<<<<<<<<<<<<<
2341
2818
 */
2342
2819
    __pyx_f_4h5py_5utils_efree(__pyx_v_start);
2343
2820
 
2344
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":392
 
2821
    /* "/home/tachyon/h5py/h5py/h5s.pyx":392
2345
2822
 *         finally:
2346
2823
 *             efree(start)
2347
2824
 *             efree(end)             # <<<<<<<<<<<<<<
2365
2842
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2366
2843
  goto __pyx_L0;
2367
2844
  __pyx_L1_error:;
2368
 
  __Pyx_XDECREF(__pyx_t_6);
 
2845
  __Pyx_XDECREF(__pyx_t_1);
2369
2846
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_select_bounds");
2370
2847
  __pyx_r = NULL;
2371
2848
  __pyx_L0:;
2377
2854
  return __pyx_r;
2378
2855
}
2379
2856
 
2380
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":395
 
2857
/* "/home/tachyon/h5py/h5py/h5s.pyx":395
2381
2858
 * 
2382
2859
 * 
2383
2860
 *     def select_all(self):             # <<<<<<<<<<<<<<
2389
2866
static char __pyx_doc_4h5py_3h5s_7SpaceID_select_all[] = "()\n\n        Select all points in the dataspace.\n        ";
2390
2867
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_select_all(PyObject *__pyx_v_self, PyObject *unused) {
2391
2868
  PyObject *__pyx_r = NULL;
2392
 
  herr_t __pyx_t_1;
 
2869
  PyObject *__pyx_t_1 = NULL;
 
2870
  hid_t __pyx_t_2;
 
2871
  herr_t __pyx_t_3;
2393
2872
  __Pyx_RefNannySetupContext("select_all");
2394
2873
 
2395
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":400
 
2874
  /* "/home/tachyon/h5py/h5py/h5s.pyx":400
2396
2875
 *         Select all points in the dataspace.
2397
2876
 *         """
2398
2877
 *         H5Sselect_all(self.id)             # <<<<<<<<<<<<<<
2399
2878
 * 
2400
2879
 * 
2401
2880
 */
2402
 
  __pyx_t_1 = H5Sselect_all(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2881
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2882
  __Pyx_GOTREF(__pyx_t_1);
 
2883
  __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 = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2884
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2885
  __pyx_t_3 = H5Sselect_all(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2403
2886
 
2404
2887
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2405
2888
  goto __pyx_L0;
2406
2889
  __pyx_L1_error:;
 
2890
  __Pyx_XDECREF(__pyx_t_1);
2407
2891
  __Pyx_AddTraceback("h5py.h5s.SpaceID.select_all");
2408
2892
  __pyx_r = NULL;
2409
2893
  __pyx_L0:;
2412
2896
  return __pyx_r;
2413
2897
}
2414
2898
 
2415
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":403
 
2899
/* "/home/tachyon/h5py/h5py/h5s.pyx":403
2416
2900
 * 
2417
2901
 * 
2418
2902
 *     def select_none(self):             # <<<<<<<<<<<<<<
2424
2908
static char __pyx_doc_4h5py_3h5s_7SpaceID_select_none[] = "()\n\n        Deselect entire dataspace.\n        ";
2425
2909
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_select_none(PyObject *__pyx_v_self, PyObject *unused) {
2426
2910
  PyObject *__pyx_r = NULL;
2427
 
  herr_t __pyx_t_1;
 
2911
  PyObject *__pyx_t_1 = NULL;
 
2912
  hid_t __pyx_t_2;
 
2913
  herr_t __pyx_t_3;
2428
2914
  __Pyx_RefNannySetupContext("select_none");
2429
2915
 
2430
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":408
 
2916
  /* "/home/tachyon/h5py/h5py/h5s.pyx":408
2431
2917
 *         Deselect entire dataspace.
2432
2918
 *         """
2433
2919
 *         H5Sselect_none(self.id)             # <<<<<<<<<<<<<<
2434
2920
 * 
2435
2921
 * 
2436
2922
 */
2437
 
  __pyx_t_1 = H5Sselect_none(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2923
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2924
  __Pyx_GOTREF(__pyx_t_1);
 
2925
  __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 = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2926
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2927
  __pyx_t_3 = H5Sselect_none(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2438
2928
 
2439
2929
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2440
2930
  goto __pyx_L0;
2441
2931
  __pyx_L1_error:;
 
2932
  __Pyx_XDECREF(__pyx_t_1);
2442
2933
  __Pyx_AddTraceback("h5py.h5s.SpaceID.select_none");
2443
2934
  __pyx_r = NULL;
2444
2935
  __pyx_L0:;
2447
2938
  return __pyx_r;
2448
2939
}
2449
2940
 
2450
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":411
 
2941
/* "/home/tachyon/h5py/h5py/h5s.pyx":411
2451
2942
 * 
2452
2943
 * 
2453
2944
 *     def select_valid(self):             # <<<<<<<<<<<<<<
2459
2950
static char __pyx_doc_4h5py_3h5s_7SpaceID_select_valid[] = "() => BOOL\n        \n        Determine if the current selection falls within\n        the dataspace extent.\n        ";
2460
2951
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_select_valid(PyObject *__pyx_v_self, PyObject *unused) {
2461
2952
  PyObject *__pyx_r = NULL;
2462
 
  htri_t __pyx_t_1;
2463
 
  PyObject *__pyx_t_2 = NULL;
 
2953
  PyObject *__pyx_t_1 = NULL;
 
2954
  hid_t __pyx_t_2;
 
2955
  htri_t __pyx_t_3;
2464
2956
  __Pyx_RefNannySetupContext("select_valid");
2465
2957
 
2466
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":417
 
2958
  /* "/home/tachyon/h5py/h5py/h5s.pyx":417
2467
2959
 *         the dataspace extent.
2468
2960
 *         """
2469
2961
 *         return <bint>(H5Sselect_valid(self.id))             # <<<<<<<<<<<<<<
2471
2963
 *     # === Point selection functions ===========================================
2472
2964
 */
2473
2965
  __Pyx_XDECREF(__pyx_r);
2474
 
  __pyx_t_1 = H5Sselect_valid(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2475
 
  __pyx_t_2 = __Pyx_PyBool_FromLong(((int)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2476
 
  __Pyx_GOTREF(__pyx_t_2);
2477
 
  __pyx_r = __pyx_t_2;
2478
 
  __pyx_t_2 = 0;
 
2966
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2967
  __Pyx_GOTREF(__pyx_t_1);
 
2968
  __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 = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2969
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2970
  __pyx_t_3 = H5Sselect_valid(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2971
  __pyx_t_1 = __Pyx_PyBool_FromLong(((int)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2972
  __Pyx_GOTREF(__pyx_t_1);
 
2973
  __pyx_r = __pyx_t_1;
 
2974
  __pyx_t_1 = 0;
2479
2975
  goto __pyx_L0;
2480
2976
 
2481
2977
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2482
2978
  goto __pyx_L0;
2483
2979
  __pyx_L1_error:;
2484
 
  __Pyx_XDECREF(__pyx_t_2);
 
2980
  __Pyx_XDECREF(__pyx_t_1);
2485
2981
  __Pyx_AddTraceback("h5py.h5s.SpaceID.select_valid");
2486
2982
  __pyx_r = NULL;
2487
2983
  __pyx_L0:;
2490
2986
  return __pyx_r;
2491
2987
}
2492
2988
 
2493
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":422
 
2989
/* "/home/tachyon/h5py/h5py/h5s.pyx":422
2494
2990
 * 
2495
2991
 * 
2496
2992
 *     def get_select_elem_npoints(self):             # <<<<<<<<<<<<<<
2502
2998
static char __pyx_doc_4h5py_3h5s_7SpaceID_get_select_elem_npoints[] = "() => LONG npoints\n\n        Determine the number of elements selected in point-selection mode.\n        ";
2503
2999
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_elem_npoints(PyObject *__pyx_v_self, PyObject *unused) {
2504
3000
  PyObject *__pyx_r = NULL;
2505
 
  hssize_t __pyx_t_1;
2506
 
  PyObject *__pyx_t_2 = NULL;
 
3001
  PyObject *__pyx_t_1 = NULL;
 
3002
  hid_t __pyx_t_2;
 
3003
  hssize_t __pyx_t_3;
2507
3004
  __Pyx_RefNannySetupContext("get_select_elem_npoints");
2508
3005
 
2509
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":427
 
3006
  /* "/home/tachyon/h5py/h5py/h5s.pyx":427
2510
3007
 *         Determine the number of elements selected in point-selection mode.
2511
3008
 *         """
2512
3009
 *         return H5Sget_select_elem_npoints(self.id)             # <<<<<<<<<<<<<<
2514
3011
 * 
2515
3012
 */
2516
3013
  __Pyx_XDECREF(__pyx_r);
2517
 
  __pyx_t_1 = H5Sget_select_elem_npoints(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2518
 
  __pyx_t_2 = __Pyx_PyInt_to_py_hssize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2519
 
  __Pyx_GOTREF(__pyx_t_2);
2520
 
  __pyx_r = __pyx_t_2;
2521
 
  __pyx_t_2 = 0;
 
3014
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3015
  __Pyx_GOTREF(__pyx_t_1);
 
3016
  __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 = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3017
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
3018
  __pyx_t_3 = H5Sget_select_elem_npoints(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3019
  __pyx_t_1 = __Pyx_PyInt_to_py_hssize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3020
  __Pyx_GOTREF(__pyx_t_1);
 
3021
  __pyx_r = __pyx_t_1;
 
3022
  __pyx_t_1 = 0;
2522
3023
  goto __pyx_L0;
2523
3024
 
2524
3025
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2525
3026
  goto __pyx_L0;
2526
3027
  __pyx_L1_error:;
2527
 
  __Pyx_XDECREF(__pyx_t_2);
 
3028
  __Pyx_XDECREF(__pyx_t_1);
2528
3029
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_select_elem_npoints");
2529
3030
  __pyx_r = NULL;
2530
3031
  __pyx_L0:;
2533
3034
  return __pyx_r;
2534
3035
}
2535
3036
 
2536
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":430
 
3037
/* "/home/tachyon/h5py/h5py/h5s.pyx":430
2537
3038
 * 
2538
3039
 * 
2539
3040
 *     def get_select_elem_pointlist(self):             # <<<<<<<<<<<<<<
2547
3048
  hsize_t __pyx_v_dims[2];
2548
3049
  PyArrayObject *__pyx_v_buf;
2549
3050
  PyObject *__pyx_r = NULL;
2550
 
  hssize_t __pyx_t_1;
2551
 
  int __pyx_t_2;
2552
 
  PyObject *__pyx_t_3 = NULL;
2553
 
  herr_t __pyx_t_4;
 
3051
  PyObject *__pyx_t_1 = NULL;
 
3052
  hid_t __pyx_t_2;
 
3053
  hssize_t __pyx_t_3;
 
3054
  int __pyx_t_4;
 
3055
  herr_t __pyx_t_5;
2554
3056
  __Pyx_RefNannySetupContext("get_select_elem_pointlist");
2555
3057
  __pyx_v_buf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
2556
3058
 
2557
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":439
 
3059
  /* "/home/tachyon/h5py/h5py/h5s.pyx":439
2558
3060
 *         cdef ndarray buf
2559
3061
 * 
2560
3062
 *         dims[0] = H5Sget_select_elem_npoints(self.id)             # <<<<<<<<<<<<<<
2561
3063
 *         dims[1] = H5Sget_simple_extent_ndims(self.id)
2562
3064
 * 
2563
3065
 */
2564
 
  __pyx_t_1 = H5Sget_select_elem_npoints(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2565
 
  (__pyx_v_dims[0]) = __pyx_t_1;
 
3066
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3067
  __Pyx_GOTREF(__pyx_t_1);
 
3068
  __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 = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3069
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
3070
  __pyx_t_3 = H5Sget_select_elem_npoints(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3071
  (__pyx_v_dims[0]) = __pyx_t_3;
2566
3072
 
2567
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":440
 
3073
  /* "/home/tachyon/h5py/h5py/h5s.pyx":440
2568
3074
 * 
2569
3075
 *         dims[0] = H5Sget_select_elem_npoints(self.id)
2570
3076
 *         dims[1] = H5Sget_simple_extent_ndims(self.id)             # <<<<<<<<<<<<<<
2571
3077
 * 
2572
3078
 *         buf = create_numpy_hsize(2, dims)
2573
3079
 */
2574
 
  __pyx_t_2 = H5Sget_simple_extent_ndims(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2575
 
  (__pyx_v_dims[1]) = __pyx_t_2;
 
3080
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3081
  __Pyx_GOTREF(__pyx_t_1);
 
3082
  __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 = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3083
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
3084
  __pyx_t_4 = H5Sget_simple_extent_ndims(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3085
  (__pyx_v_dims[1]) = __pyx_t_4;
2576
3086
 
2577
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":442
 
3087
  /* "/home/tachyon/h5py/h5py/h5s.pyx":442
2578
3088
 *         dims[1] = H5Sget_simple_extent_ndims(self.id)
2579
3089
 * 
2580
3090
 *         buf = create_numpy_hsize(2, dims)             # <<<<<<<<<<<<<<
2581
3091
 * 
2582
3092
 *         H5Sget_select_elem_pointlist(self.id, 0, dims[0], <hsize_t*>buf.data)
2583
3093
 */
2584
 
  __pyx_t_3 = __pyx_f_4h5py_5utils_create_numpy_hsize(2, __pyx_v_dims); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2585
 
  __Pyx_GOTREF(__pyx_t_3);
2586
 
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4h5py_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3094
  __pyx_t_1 = __pyx_f_4h5py_5utils_create_numpy_hsize(2, __pyx_v_dims); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3095
  __Pyx_GOTREF(__pyx_t_1);
 
3096
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4h5py_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2587
3097
  __Pyx_DECREF(((PyObject *)__pyx_v_buf));
2588
 
  __pyx_v_buf = ((PyArrayObject *)__pyx_t_3);
2589
 
  __pyx_t_3 = 0;
 
3098
  __pyx_v_buf = ((PyArrayObject *)__pyx_t_1);
 
3099
  __pyx_t_1 = 0;
2590
3100
 
2591
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":444
 
3101
  /* "/home/tachyon/h5py/h5py/h5s.pyx":444
2592
3102
 *         buf = create_numpy_hsize(2, dims)
2593
3103
 * 
2594
3104
 *         H5Sget_select_elem_pointlist(self.id, 0, dims[0], <hsize_t*>buf.data)             # <<<<<<<<<<<<<<
2595
3105
 * 
2596
3106
 *         return buf
2597
3107
 */
2598
 
  __pyx_t_4 = H5Sget_select_elem_pointlist(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id, 0, (__pyx_v_dims[0]), ((hsize_t *)__pyx_v_buf->data)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3108
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3109
  __Pyx_GOTREF(__pyx_t_1);
 
3110
  __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 = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3111
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
3112
  __pyx_t_5 = H5Sget_select_elem_pointlist(__pyx_t_2, 0, (__pyx_v_dims[0]), ((hsize_t *)__pyx_v_buf->data)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2599
3113
 
2600
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":446
 
3114
  /* "/home/tachyon/h5py/h5py/h5s.pyx":446
2601
3115
 *         H5Sget_select_elem_pointlist(self.id, 0, dims[0], <hsize_t*>buf.data)
2602
3116
 * 
2603
3117
 *         return buf             # <<<<<<<<<<<<<<
2612
3126
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2613
3127
  goto __pyx_L0;
2614
3128
  __pyx_L1_error:;
2615
 
  __Pyx_XDECREF(__pyx_t_3);
 
3129
  __Pyx_XDECREF(__pyx_t_1);
2616
3130
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_select_elem_pointlist");
2617
3131
  __pyx_r = NULL;
2618
3132
  __pyx_L0:;
2622
3136
  return __pyx_r;
2623
3137
}
2624
3138
 
2625
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":449
 
3139
/* "/home/tachyon/h5py/h5py/h5s.pyx":449
2626
3140
 * 
2627
3141
 * 
2628
3142
 *     def select_elements(self, object coords, int op=H5S_SELECT_SET):             # <<<<<<<<<<<<<<
2640
3154
  PyObject *__pyx_r = NULL;
2641
3155
  PyObject *__pyx_t_1 = NULL;
2642
3156
  int __pyx_t_2;
2643
 
  int __pyx_t_3;
 
3157
  hid_t __pyx_t_3;
2644
3158
  int __pyx_t_4;
2645
3159
  int __pyx_t_5;
2646
 
  PyObject *__pyx_t_6 = NULL;
2647
 
  herr_t __pyx_t_7;
 
3160
  int __pyx_t_6;
 
3161
  PyObject *__pyx_t_7 = NULL;
 
3162
  herr_t __pyx_t_8;
2648
3163
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__coords,&__pyx_n_s__op,0};
2649
3164
  __Pyx_RefNannySetupContext("select_elements");
2650
3165
  if (unlikely(__pyx_kwds)) {
2696
3211
  __Pyx_INCREF(__pyx_v_coords);
2697
3212
  __pyx_v_hcoords = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
2698
3213
 
2699
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":475
 
3214
  /* "/home/tachyon/h5py/h5py/h5s.pyx":475
2700
3215
 *         # a compatible type and initializing it to the input.
2701
3216
 * 
2702
3217
 *         hcoords = create_hsize_array(coords)             # <<<<<<<<<<<<<<
2710
3225
  __pyx_v_hcoords = ((PyArrayObject *)__pyx_t_1);
2711
3226
  __pyx_t_1 = 0;
2712
3227
 
2713
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":477
 
3228
  /* "/home/tachyon/h5py/h5py/h5s.pyx":477
2714
3229
 *         hcoords = create_hsize_array(coords)
2715
3230
 * 
2716
3231
 *         if hcoords.nd != 2 or hcoords.dimensions[1] != H5Sget_simple_extent_ndims(self.id):             # <<<<<<<<<<<<<<
2719
3234
 */
2720
3235
  __pyx_t_2 = (__pyx_v_hcoords->nd != 2);
2721
3236
  if (!__pyx_t_2) {
2722
 
    __pyx_t_3 = H5Sget_simple_extent_ndims(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2723
 
    __pyx_t_4 = ((__pyx_v_hcoords->dimensions[1]) != __pyx_t_3);
2724
 
    __pyx_t_5 = __pyx_t_4;
 
3237
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3238
    __Pyx_GOTREF(__pyx_t_1);
 
3239
    __pyx_t_3 = __Pyx_PyInt_from_py_hid_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3240
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
3241
    __pyx_t_4 = H5Sget_simple_extent_ndims(__pyx_t_3); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3242
    __pyx_t_5 = ((__pyx_v_hcoords->dimensions[1]) != __pyx_t_4);
 
3243
    __pyx_t_6 = __pyx_t_5;
2725
3244
  } else {
2726
 
    __pyx_t_5 = __pyx_t_2;
 
3245
    __pyx_t_6 = __pyx_t_2;
2727
3246
  }
2728
 
  if (__pyx_t_5) {
 
3247
  if (__pyx_t_6) {
2729
3248
 
2730
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":478
 
3249
    /* "/home/tachyon/h5py/h5py/h5s.pyx":478
2731
3250
 * 
2732
3251
 *         if hcoords.nd != 2 or hcoords.dimensions[1] != H5Sget_simple_extent_ndims(self.id):
2733
3252
 *             raise ValueError("Coordinate array must have shape (<npoints>, %d)" % self.get_simple_extent_ndims())             # <<<<<<<<<<<<<<
2736
3255
 */
2737
3256
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2738
3257
    __Pyx_GOTREF(__pyx_t_1);
2739
 
    __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2740
 
    __Pyx_GOTREF(__pyx_t_6);
 
3258
    __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3259
    __Pyx_GOTREF(__pyx_t_7);
2741
3260
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2742
 
    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_4), __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3261
    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_4), __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2743
3262
    __Pyx_GOTREF(__pyx_t_1);
2744
 
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2745
 
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2746
 
    __Pyx_GOTREF(__pyx_t_6);
2747
 
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
 
3263
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
3264
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3265
    __Pyx_GOTREF(__pyx_t_7);
 
3266
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
2748
3267
    __Pyx_GIVEREF(__pyx_t_1);
2749
3268
    __pyx_t_1 = 0;
2750
 
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3269
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2751
3270
    __Pyx_GOTREF(__pyx_t_1);
2752
 
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
3271
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2753
3272
    __Pyx_Raise(__pyx_t_1, 0, 0);
2754
3273
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2755
3274
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2757
3276
  }
2758
3277
  __pyx_L6:;
2759
3278
 
2760
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":480
 
3279
  /* "/home/tachyon/h5py/h5py/h5s.pyx":480
2761
3280
 *             raise ValueError("Coordinate array must have shape (<npoints>, %d)" % self.get_simple_extent_ndims())
2762
3281
 * 
2763
3282
 *         nelements = hcoords.dimensions[0]             # <<<<<<<<<<<<<<
2766
3285
 */
2767
3286
  __pyx_v_nelements = (__pyx_v_hcoords->dimensions[0]);
2768
3287
 
2769
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":482
 
3288
  /* "/home/tachyon/h5py/h5py/h5s.pyx":482
2770
3289
 *         nelements = hcoords.dimensions[0]
2771
3290
 * 
2772
3291
 *         H5Sselect_elements(self.id, <H5S_seloper_t>op, nelements, <hsize_t**>hcoords.data)             # <<<<<<<<<<<<<<
2773
3292
 * 
2774
3293
 *     # === Hyperslab selection functions =======================================
2775
3294
 */
2776
 
  __pyx_t_7 = H5Sselect_elements(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id, ((H5S_seloper_t)__pyx_v_op), __pyx_v_nelements, ((hsize_t **)__pyx_v_hcoords->data)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3295
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3296
  __Pyx_GOTREF(__pyx_t_1);
 
3297
  __pyx_t_3 = __Pyx_PyInt_from_py_hid_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3298
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
3299
  __pyx_t_8 = H5Sselect_elements(__pyx_t_3, ((H5S_seloper_t)__pyx_v_op), __pyx_v_nelements, ((hsize_t **)__pyx_v_hcoords->data)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2777
3300
 
2778
3301
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2779
3302
  goto __pyx_L0;
2780
3303
  __pyx_L1_error:;
2781
3304
  __Pyx_XDECREF(__pyx_t_1);
2782
 
  __Pyx_XDECREF(__pyx_t_6);
 
3305
  __Pyx_XDECREF(__pyx_t_7);
2783
3306
  __Pyx_AddTraceback("h5py.h5s.SpaceID.select_elements");
2784
3307
  __pyx_r = NULL;
2785
3308
  __pyx_L0:;
2791
3314
  return __pyx_r;
2792
3315
}
2793
3316
 
2794
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":487
 
3317
/* "/home/tachyon/h5py/h5py/h5s.pyx":487
2795
3318
 * 
2796
3319
 * 
2797
3320
 *     def get_select_hyper_nblocks(self):             # <<<<<<<<<<<<<<
2803
3326
static char __pyx_doc_4h5py_3h5s_7SpaceID_get_select_hyper_nblocks[] = "() => LONG nblocks\n\n        Get the number of hyperslab blocks currently selected.\n        ";
2804
3327
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_hyper_nblocks(PyObject *__pyx_v_self, PyObject *unused) {
2805
3328
  PyObject *__pyx_r = NULL;
2806
 
  hssize_t __pyx_t_1;
2807
 
  PyObject *__pyx_t_2 = NULL;
 
3329
  PyObject *__pyx_t_1 = NULL;
 
3330
  hid_t __pyx_t_2;
 
3331
  hssize_t __pyx_t_3;
2808
3332
  __Pyx_RefNannySetupContext("get_select_hyper_nblocks");
2809
3333
 
2810
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":492
 
3334
  /* "/home/tachyon/h5py/h5py/h5s.pyx":492
2811
3335
 *         Get the number of hyperslab blocks currently selected.
2812
3336
 *         """
2813
3337
 *         return H5Sget_select_hyper_nblocks(self.id)             # <<<<<<<<<<<<<<
2815
3339
 * 
2816
3340
 */
2817
3341
  __Pyx_XDECREF(__pyx_r);
2818
 
  __pyx_t_1 = H5Sget_select_hyper_nblocks(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2819
 
  __pyx_t_2 = __Pyx_PyInt_to_py_hssize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2820
 
  __Pyx_GOTREF(__pyx_t_2);
2821
 
  __pyx_r = __pyx_t_2;
2822
 
  __pyx_t_2 = 0;
 
3342
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3343
  __Pyx_GOTREF(__pyx_t_1);
 
3344
  __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 = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3345
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
3346
  __pyx_t_3 = H5Sget_select_hyper_nblocks(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3347
  __pyx_t_1 = __Pyx_PyInt_to_py_hssize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3348
  __Pyx_GOTREF(__pyx_t_1);
 
3349
  __pyx_r = __pyx_t_1;
 
3350
  __pyx_t_1 = 0;
2823
3351
  goto __pyx_L0;
2824
3352
 
2825
3353
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2826
3354
  goto __pyx_L0;
2827
3355
  __pyx_L1_error:;
2828
 
  __Pyx_XDECREF(__pyx_t_2);
 
3356
  __Pyx_XDECREF(__pyx_t_1);
2829
3357
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_select_hyper_nblocks");
2830
3358
  __pyx_r = NULL;
2831
3359
  __pyx_L0:;
2834
3362
  return __pyx_r;
2835
3363
}
2836
3364
 
2837
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":495
 
3365
/* "/home/tachyon/h5py/h5py/h5s.pyx":495
2838
3366
 * 
2839
3367
 * 
2840
3368
 *     def get_select_hyper_blocklist(self):             # <<<<<<<<<<<<<<
2848
3376
  hsize_t __pyx_v_dims[3];
2849
3377
  PyArrayObject *__pyx_v_buf;
2850
3378
  PyObject *__pyx_r = NULL;
2851
 
  hssize_t __pyx_t_1;
2852
 
  int __pyx_t_2;
2853
 
  PyObject *__pyx_t_3 = NULL;
2854
 
  herr_t __pyx_t_4;
 
3379
  PyObject *__pyx_t_1 = NULL;
 
3380
  hid_t __pyx_t_2;
 
3381
  hssize_t __pyx_t_3;
 
3382
  int __pyx_t_4;
 
3383
  herr_t __pyx_t_5;
2855
3384
  __Pyx_RefNannySetupContext("get_select_hyper_blocklist");
2856
3385
  __pyx_v_buf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
2857
3386
 
2858
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":511
 
3387
  /* "/home/tachyon/h5py/h5py/h5s.pyx":511
2859
3388
 *         cdef ndarray buf
2860
3389
 * 
2861
3390
 *         dims[0] = H5Sget_select_hyper_nblocks(self.id)             # <<<<<<<<<<<<<<
2862
3391
 *         dims[1] = 2
2863
3392
 *         dims[2] = H5Sget_simple_extent_ndims(self.id)
2864
3393
 */
2865
 
  __pyx_t_1 = H5Sget_select_hyper_nblocks(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2866
 
  (__pyx_v_dims[0]) = __pyx_t_1;
 
3394
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3395
  __Pyx_GOTREF(__pyx_t_1);
 
3396
  __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 = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3397
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
3398
  __pyx_t_3 = H5Sget_select_hyper_nblocks(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3399
  (__pyx_v_dims[0]) = __pyx_t_3;
2867
3400
 
2868
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":512
 
3401
  /* "/home/tachyon/h5py/h5py/h5s.pyx":512
2869
3402
 * 
2870
3403
 *         dims[0] = H5Sget_select_hyper_nblocks(self.id)
2871
3404
 *         dims[1] = 2             # <<<<<<<<<<<<<<
2874
3407
 */
2875
3408
  (__pyx_v_dims[1]) = 2;
2876
3409
 
2877
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":513
 
3410
  /* "/home/tachyon/h5py/h5py/h5s.pyx":513
2878
3411
 *         dims[0] = H5Sget_select_hyper_nblocks(self.id)
2879
3412
 *         dims[1] = 2
2880
3413
 *         dims[2] = H5Sget_simple_extent_ndims(self.id)             # <<<<<<<<<<<<<<
2881
3414
 * 
2882
3415
 *         buf = create_numpy_hsize(3, dims)
2883
3416
 */
2884
 
  __pyx_t_2 = H5Sget_simple_extent_ndims(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2885
 
  (__pyx_v_dims[2]) = __pyx_t_2;
 
3417
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3418
  __Pyx_GOTREF(__pyx_t_1);
 
3419
  __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 = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3420
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
3421
  __pyx_t_4 = H5Sget_simple_extent_ndims(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3422
  (__pyx_v_dims[2]) = __pyx_t_4;
2886
3423
 
2887
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":515
 
3424
  /* "/home/tachyon/h5py/h5py/h5s.pyx":515
2888
3425
 *         dims[2] = H5Sget_simple_extent_ndims(self.id)
2889
3426
 * 
2890
3427
 *         buf = create_numpy_hsize(3, dims)             # <<<<<<<<<<<<<<
2891
3428
 * 
2892
3429
 *         H5Sget_select_hyper_blocklist(self.id, 0, dims[0], <hsize_t*>buf.data)
2893
3430
 */
2894
 
  __pyx_t_3 = __pyx_f_4h5py_5utils_create_numpy_hsize(3, __pyx_v_dims); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2895
 
  __Pyx_GOTREF(__pyx_t_3);
2896
 
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4h5py_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3431
  __pyx_t_1 = __pyx_f_4h5py_5utils_create_numpy_hsize(3, __pyx_v_dims); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3432
  __Pyx_GOTREF(__pyx_t_1);
 
3433
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4h5py_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2897
3434
  __Pyx_DECREF(((PyObject *)__pyx_v_buf));
2898
 
  __pyx_v_buf = ((PyArrayObject *)__pyx_t_3);
2899
 
  __pyx_t_3 = 0;
 
3435
  __pyx_v_buf = ((PyArrayObject *)__pyx_t_1);
 
3436
  __pyx_t_1 = 0;
2900
3437
 
2901
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":517
 
3438
  /* "/home/tachyon/h5py/h5py/h5s.pyx":517
2902
3439
 *         buf = create_numpy_hsize(3, dims)
2903
3440
 * 
2904
3441
 *         H5Sget_select_hyper_blocklist(self.id, 0, dims[0], <hsize_t*>buf.data)             # <<<<<<<<<<<<<<
2905
3442
 * 
2906
3443
 *         return buf
2907
3444
 */
2908
 
  __pyx_t_4 = H5Sget_select_hyper_blocklist(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id, 0, (__pyx_v_dims[0]), ((hsize_t *)__pyx_v_buf->data)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3445
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3446
  __Pyx_GOTREF(__pyx_t_1);
 
3447
  __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 = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3448
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
3449
  __pyx_t_5 = H5Sget_select_hyper_blocklist(__pyx_t_2, 0, (__pyx_v_dims[0]), ((hsize_t *)__pyx_v_buf->data)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2909
3450
 
2910
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":519
 
3451
  /* "/home/tachyon/h5py/h5py/h5s.pyx":519
2911
3452
 *         H5Sget_select_hyper_blocklist(self.id, 0, dims[0], <hsize_t*>buf.data)
2912
3453
 * 
2913
3454
 *         return buf             # <<<<<<<<<<<<<<
2922
3463
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2923
3464
  goto __pyx_L0;
2924
3465
  __pyx_L1_error:;
2925
 
  __Pyx_XDECREF(__pyx_t_3);
 
3466
  __Pyx_XDECREF(__pyx_t_1);
2926
3467
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_select_hyper_blocklist");
2927
3468
  __pyx_r = NULL;
2928
3469
  __pyx_L0:;
2932
3473
  return __pyx_r;
2933
3474
}
2934
3475
 
2935
 
/* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":522
 
3476
/* "/home/tachyon/h5py/h5py/h5s.pyx":522
2936
3477
 * 
2937
3478
 * 
2938
3479
 *     def select_hyperslab(self, object start, object count, object stride=None,             # <<<<<<<<<<<<<<
2954
3495
  hsize_t *__pyx_v_stride_array;
2955
3496
  hsize_t *__pyx_v_block_array;
2956
3497
  PyObject *__pyx_r = NULL;
2957
 
  int __pyx_t_1;
2958
 
  void *__pyx_t_2;
 
3498
  PyObject *__pyx_t_1 = NULL;
 
3499
  hid_t __pyx_t_2;
2959
3500
  int __pyx_t_3;
2960
 
  herr_t __pyx_t_4;
 
3501
  void *__pyx_t_4;
 
3502
  int __pyx_t_5;
 
3503
  herr_t __pyx_t_6;
2961
3504
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__start,&__pyx_n_s__count,&__pyx_n_s__stride,&__pyx_n_s__block,&__pyx_n_s__op,0};
2962
3505
  __Pyx_RefNannySetupContext("select_hyperslab");
2963
3506
  if (unlikely(__pyx_kwds)) {
2964
3507
 
2965
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":523
 
3508
    /* "/home/tachyon/h5py/h5py/h5s.pyx":523
2966
3509
 * 
2967
3510
 *     def select_hyperslab(self, object start, object count, object stride=None,
2968
3511
 *                          object block=None, int op=H5S_SELECT_SET):             # <<<<<<<<<<<<<<
3023
3566
    }
3024
3567
  } else {
3025
3568
 
3026
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":522
 
3569
    /* "/home/tachyon/h5py/h5py/h5s.pyx":522
3027
3570
 * 
3028
3571
 * 
3029
3572
 *     def select_hyperslab(self, object start, object count, object stride=None,             # <<<<<<<<<<<<<<
3032
3575
 */
3033
3576
    __pyx_v_stride = ((PyObject *)Py_None);
3034
3577
 
3035
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":523
 
3578
    /* "/home/tachyon/h5py/h5py/h5s.pyx":523
3036
3579
 * 
3037
3580
 *     def select_hyperslab(self, object start, object count, object stride=None,
3038
3581
 *                          object block=None, int op=H5S_SELECT_SET):             # <<<<<<<<<<<<<<
3068
3611
  __Pyx_INCREF(__pyx_v_stride);
3069
3612
  __Pyx_INCREF(__pyx_v_block);
3070
3613
 
3071
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":531
 
3614
  /* "/home/tachyon/h5py/h5py/h5s.pyx":531
3072
3615
 *         """
3073
3616
 *         cdef int rank
3074
3617
 *         cdef hsize_t* start_array = NULL             # <<<<<<<<<<<<<<
3077
3620
 */
3078
3621
  __pyx_v_start_array = NULL;
3079
3622
 
3080
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":532
 
3623
  /* "/home/tachyon/h5py/h5py/h5s.pyx":532
3081
3624
 *         cdef int rank
3082
3625
 *         cdef hsize_t* start_array = NULL
3083
3626
 *         cdef hsize_t* count_array = NULL             # <<<<<<<<<<<<<<
3086
3629
 */
3087
3630
  __pyx_v_count_array = NULL;
3088
3631
 
3089
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":533
 
3632
  /* "/home/tachyon/h5py/h5py/h5s.pyx":533
3090
3633
 *         cdef hsize_t* start_array = NULL
3091
3634
 *         cdef hsize_t* count_array = NULL
3092
3635
 *         cdef hsize_t* stride_array = NULL             # <<<<<<<<<<<<<<
3095
3638
 */
3096
3639
  __pyx_v_stride_array = NULL;
3097
3640
 
3098
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":534
 
3641
  /* "/home/tachyon/h5py/h5py/h5s.pyx":534
3099
3642
 *         cdef hsize_t* count_array = NULL
3100
3643
 *         cdef hsize_t* stride_array = NULL
3101
3644
 *         cdef hsize_t* block_array = NULL             # <<<<<<<<<<<<<<
3104
3647
 */
3105
3648
  __pyx_v_block_array = NULL;
3106
3649
 
3107
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":537
 
3650
  /* "/home/tachyon/h5py/h5py/h5s.pyx":537
3108
3651
 * 
3109
3652
 *         # Dataspace rank.  All provided tuples must match this.
3110
3653
 *         rank = H5Sget_simple_extent_ndims(self.id)             # <<<<<<<<<<<<<<
3111
3654
 * 
3112
3655
 *         require_tuple(start, 0, rank, "start")
3113
3656
 */
3114
 
  __pyx_t_1 = H5Sget_simple_extent_ndims(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3115
 
  __pyx_v_rank = __pyx_t_1;
 
3657
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3658
  __Pyx_GOTREF(__pyx_t_1);
 
3659
  __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 = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3660
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
3661
  __pyx_t_3 = H5Sget_simple_extent_ndims(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3662
  __pyx_v_rank = __pyx_t_3;
3116
3663
 
3117
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":539
 
3664
  /* "/home/tachyon/h5py/h5py/h5s.pyx":539
3118
3665
 *         rank = H5Sget_simple_extent_ndims(self.id)
3119
3666
 * 
3120
3667
 *         require_tuple(start, 0, rank, "start")             # <<<<<<<<<<<<<<
3121
3668
 *         require_tuple(count, 0, rank, "count")
3122
3669
 *         require_tuple(stride, 1, rank, "stride")
3123
3670
 */
3124
 
  __pyx_t_1 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_start, 0, __pyx_v_rank, __pyx_k__start); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3671
  __pyx_t_3 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_start, 0, __pyx_v_rank, __pyx_k__start); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3125
3672
 
3126
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":540
 
3673
  /* "/home/tachyon/h5py/h5py/h5s.pyx":540
3127
3674
 * 
3128
3675
 *         require_tuple(start, 0, rank, "start")
3129
3676
 *         require_tuple(count, 0, rank, "count")             # <<<<<<<<<<<<<<
3130
3677
 *         require_tuple(stride, 1, rank, "stride")
3131
3678
 *         require_tuple(block, 1, rank, "block")
3132
3679
 */
3133
 
  __pyx_t_1 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_count, 0, __pyx_v_rank, __pyx_k__count); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3680
  __pyx_t_3 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_count, 0, __pyx_v_rank, __pyx_k__count); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3134
3681
 
3135
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":541
 
3682
  /* "/home/tachyon/h5py/h5py/h5s.pyx":541
3136
3683
 *         require_tuple(start, 0, rank, "start")
3137
3684
 *         require_tuple(count, 0, rank, "count")
3138
3685
 *         require_tuple(stride, 1, rank, "stride")             # <<<<<<<<<<<<<<
3139
3686
 *         require_tuple(block, 1, rank, "block")
3140
3687
 * 
3141
3688
 */
3142
 
  __pyx_t_1 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_stride, 1, __pyx_v_rank, __pyx_k__stride); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3689
  __pyx_t_3 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_stride, 1, __pyx_v_rank, __pyx_k__stride); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3143
3690
 
3144
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":542
 
3691
  /* "/home/tachyon/h5py/h5py/h5s.pyx":542
3145
3692
 *         require_tuple(count, 0, rank, "count")
3146
3693
 *         require_tuple(stride, 1, rank, "stride")
3147
3694
 *         require_tuple(block, 1, rank, "block")             # <<<<<<<<<<<<<<
3148
3695
 * 
3149
3696
 *         try:
3150
3697
 */
3151
 
  __pyx_t_1 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_block, 1, __pyx_v_rank, __pyx_k__block); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3698
  __pyx_t_3 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_block, 1, __pyx_v_rank, __pyx_k__block); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3152
3699
 
3153
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":544
 
3700
  /* "/home/tachyon/h5py/h5py/h5s.pyx":544
3154
3701
 *         require_tuple(block, 1, rank, "block")
3155
3702
 * 
3156
3703
 *         try:             # <<<<<<<<<<<<<<
3159
3706
 */
3160
3707
  /*try:*/ {
3161
3708
 
3162
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":545
 
3709
    /* "/home/tachyon/h5py/h5py/h5s.pyx":545
3163
3710
 * 
3164
3711
 *         try:
3165
3712
 *             start_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
3166
3713
 *             count_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
3167
3714
 *             convert_tuple(start, start_array, rank)
3168
3715
 */
3169
 
    __pyx_t_2 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_2 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L7;}
3170
 
    __pyx_v_start_array = ((hsize_t *)__pyx_t_2);
 
3716
    __pyx_t_4 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_4 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
3717
    __pyx_v_start_array = ((hsize_t *)__pyx_t_4);
3171
3718
 
3172
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":546
 
3719
    /* "/home/tachyon/h5py/h5py/h5s.pyx":546
3173
3720
 *         try:
3174
3721
 *             start_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
3175
3722
 *             count_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
3176
3723
 *             convert_tuple(start, start_array, rank)
3177
3724
 *             convert_tuple(count, count_array, rank)
3178
3725
 */
3179
 
    __pyx_t_2 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_2 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L7;}
3180
 
    __pyx_v_count_array = ((hsize_t *)__pyx_t_2);
 
3726
    __pyx_t_4 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_4 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
3727
    __pyx_v_count_array = ((hsize_t *)__pyx_t_4);
3181
3728
 
3182
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":547
 
3729
    /* "/home/tachyon/h5py/h5py/h5s.pyx":547
3183
3730
 *             start_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
3184
3731
 *             count_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
3185
3732
 *             convert_tuple(start, start_array, rank)             # <<<<<<<<<<<<<<
3186
3733
 *             convert_tuple(count, count_array, rank)
3187
3734
 * 
3188
3735
 */
3189
 
    __pyx_t_1 = __pyx_f_4h5py_5utils_convert_tuple(__pyx_v_start, __pyx_v_start_array, __pyx_v_rank); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
3736
    __pyx_t_3 = __pyx_f_4h5py_5utils_convert_tuple(__pyx_v_start, __pyx_v_start_array, __pyx_v_rank); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L7;}
3190
3737
 
3191
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":548
 
3738
    /* "/home/tachyon/h5py/h5py/h5s.pyx":548
3192
3739
 *             count_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
3193
3740
 *             convert_tuple(start, start_array, rank)
3194
3741
 *             convert_tuple(count, count_array, rank)             # <<<<<<<<<<<<<<
3195
3742
 * 
3196
3743
 *             if stride is not None:
3197
3744
 */
3198
 
    __pyx_t_1 = __pyx_f_4h5py_5utils_convert_tuple(__pyx_v_count, __pyx_v_count_array, __pyx_v_rank); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
3745
    __pyx_t_3 = __pyx_f_4h5py_5utils_convert_tuple(__pyx_v_count, __pyx_v_count_array, __pyx_v_rank); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L7;}
3199
3746
 
3200
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":550
 
3747
    /* "/home/tachyon/h5py/h5py/h5s.pyx":550
3201
3748
 *             convert_tuple(count, count_array, rank)
3202
3749
 * 
3203
3750
 *             if stride is not None:             # <<<<<<<<<<<<<<
3204
3751
 *                 stride_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
3205
3752
 *                 convert_tuple(stride, stride_array, rank)
3206
3753
 */
3207
 
    __pyx_t_3 = (__pyx_v_stride != Py_None);
3208
 
    if (__pyx_t_3) {
 
3754
    __pyx_t_5 = (__pyx_v_stride != Py_None);
 
3755
    if (__pyx_t_5) {
3209
3756
 
3210
 
      /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":551
 
3757
      /* "/home/tachyon/h5py/h5py/h5s.pyx":551
3211
3758
 * 
3212
3759
 *             if stride is not None:
3213
3760
 *                 stride_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
3214
3761
 *                 convert_tuple(stride, stride_array, rank)
3215
3762
 *             if block is not None:
3216
3763
 */
3217
 
      __pyx_t_2 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_2 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L7;}
3218
 
      __pyx_v_stride_array = ((hsize_t *)__pyx_t_2);
 
3764
      __pyx_t_4 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_4 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
3765
      __pyx_v_stride_array = ((hsize_t *)__pyx_t_4);
3219
3766
 
3220
 
      /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":552
 
3767
      /* "/home/tachyon/h5py/h5py/h5s.pyx":552
3221
3768
 *             if stride is not None:
3222
3769
 *                 stride_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
3223
3770
 *                 convert_tuple(stride, stride_array, rank)             # <<<<<<<<<<<<<<
3224
3771
 *             if block is not None:
3225
3772
 *                 block_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
3226
3773
 */
3227
 
      __pyx_t_1 = __pyx_f_4h5py_5utils_convert_tuple(__pyx_v_stride, __pyx_v_stride_array, __pyx_v_rank); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
3774
      __pyx_t_3 = __pyx_f_4h5py_5utils_convert_tuple(__pyx_v_stride, __pyx_v_stride_array, __pyx_v_rank); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L7;}
3228
3775
      goto __pyx_L9;
3229
3776
    }
3230
3777
    __pyx_L9:;
3231
3778
 
3232
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":553
 
3779
    /* "/home/tachyon/h5py/h5py/h5s.pyx":553
3233
3780
 *                 stride_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
3234
3781
 *                 convert_tuple(stride, stride_array, rank)
3235
3782
 *             if block is not None:             # <<<<<<<<<<<<<<
3236
3783
 *                 block_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
3237
3784
 *                 convert_tuple(block, block_array, rank)
3238
3785
 */
3239
 
    __pyx_t_3 = (__pyx_v_block != Py_None);
3240
 
    if (__pyx_t_3) {
 
3786
    __pyx_t_5 = (__pyx_v_block != Py_None);
 
3787
    if (__pyx_t_5) {
3241
3788
 
3242
 
      /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":554
 
3789
      /* "/home/tachyon/h5py/h5py/h5s.pyx":554
3243
3790
 *                 convert_tuple(stride, stride_array, rank)
3244
3791
 *             if block is not None:
3245
3792
 *                 block_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
3246
3793
 *                 convert_tuple(block, block_array, rank)
3247
3794
 * 
3248
3795
 */
3249
 
      __pyx_t_2 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_2 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L7;}
3250
 
      __pyx_v_block_array = ((hsize_t *)__pyx_t_2);
 
3796
      __pyx_t_4 = __pyx_f_4h5py_5utils_emalloc(((sizeof(hsize_t)) * __pyx_v_rank)); if (unlikely(__pyx_t_4 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
3797
      __pyx_v_block_array = ((hsize_t *)__pyx_t_4);
3251
3798
 
3252
 
      /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":555
 
3799
      /* "/home/tachyon/h5py/h5py/h5s.pyx":555
3253
3800
 *             if block is not None:
3254
3801
 *                 block_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
3255
3802
 *                 convert_tuple(block, block_array, rank)             # <<<<<<<<<<<<<<
3256
3803
 * 
3257
3804
 *             H5Sselect_hyperslab(self.id, <H5S_seloper_t>op, start_array,
3258
3805
 */
3259
 
      __pyx_t_1 = __pyx_f_4h5py_5utils_convert_tuple(__pyx_v_block, __pyx_v_block_array, __pyx_v_rank); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
3806
      __pyx_t_3 = __pyx_f_4h5py_5utils_convert_tuple(__pyx_v_block, __pyx_v_block_array, __pyx_v_rank); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L7;}
3260
3807
      goto __pyx_L10;
3261
3808
    }
3262
3809
    __pyx_L10:;
3263
3810
 
3264
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":558
 
3811
    /* "/home/tachyon/h5py/h5py/h5s.pyx":557
 
3812
 *                 convert_tuple(block, block_array, rank)
 
3813
 * 
 
3814
 *             H5Sselect_hyperslab(self.id, <H5S_seloper_t>op, start_array,             # <<<<<<<<<<<<<<
 
3815
 *                                          stride_array, count_array, block_array)
 
3816
 * 
 
3817
 */
 
3818
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
3819
    __Pyx_GOTREF(__pyx_t_1);
 
3820
    __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 = 557; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
3821
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
3822
 
 
3823
    /* "/home/tachyon/h5py/h5py/h5s.pyx":558
3265
3824
 * 
3266
3825
 *             H5Sselect_hyperslab(self.id, <H5S_seloper_t>op, start_array,
3267
3826
 *                                          stride_array, count_array, block_array)             # <<<<<<<<<<<<<<
3268
3827
 * 
3269
3828
 *         finally:
3270
3829
 */
3271
 
    __pyx_t_4 = H5Sselect_hyperslab(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id, ((H5S_seloper_t)__pyx_v_op), __pyx_v_start_array, __pyx_v_stride_array, __pyx_v_count_array, __pyx_v_block_array); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
3830
    __pyx_t_6 = H5Sselect_hyperslab(__pyx_t_2, ((H5S_seloper_t)__pyx_v_op), __pyx_v_start_array, __pyx_v_stride_array, __pyx_v_count_array, __pyx_v_block_array); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L7;}
3272
3831
  }
3273
3832
  /*finally:*/ {
3274
3833
    int __pyx_why;
3278
3837
    __pyx_why = 0; goto __pyx_L8;
3279
3838
    __pyx_L7: {
3280
3839
      __pyx_why = 4;
 
3840
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
3281
3841
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
3282
3842
      __pyx_exc_lineno = __pyx_lineno;
3283
3843
      goto __pyx_L8;
3284
3844
    }
3285
3845
    __pyx_L8:;
3286
3846
 
3287
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":561
 
3847
    /* "/home/tachyon/h5py/h5py/h5s.pyx":561
3288
3848
 * 
3289
3849
 *         finally:
3290
3850
 *             efree(start_array)             # <<<<<<<<<<<<<<
3293
3853
 */
3294
3854
    __pyx_f_4h5py_5utils_efree(__pyx_v_start_array);
3295
3855
 
3296
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":562
 
3856
    /* "/home/tachyon/h5py/h5py/h5s.pyx":562
3297
3857
 *         finally:
3298
3858
 *             efree(start_array)
3299
3859
 *             efree(count_array)             # <<<<<<<<<<<<<<
3302
3862
 */
3303
3863
    __pyx_f_4h5py_5utils_efree(__pyx_v_count_array);
3304
3864
 
3305
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":563
 
3865
    /* "/home/tachyon/h5py/h5py/h5s.pyx":563
3306
3866
 *             efree(start_array)
3307
3867
 *             efree(count_array)
3308
3868
 *             efree(stride_array)             # <<<<<<<<<<<<<<
3311
3871
 */
3312
3872
    __pyx_f_4h5py_5utils_efree(__pyx_v_stride_array);
3313
3873
 
3314
 
    /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":564
 
3874
    /* "/home/tachyon/h5py/h5py/h5s.pyx":564
3315
3875
 *             efree(count_array)
3316
3876
 *             efree(stride_array)
3317
3877
 *             efree(block_array)             # <<<<<<<<<<<<<<
3334
3894
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3335
3895
  goto __pyx_L0;
3336
3896
  __pyx_L1_error:;
 
3897
  __Pyx_XDECREF(__pyx_t_1);
3337
3898
  __Pyx_AddTraceback("h5py.h5s.SpaceID.select_hyperslab");
3338
3899
  __pyx_r = NULL;
3339
3900
  __pyx_L0:;
3379
3940
static struct PyMethodDef __pyx_methods_4h5py_3h5s_SpaceID[] = {
3380
3941
  {__Pyx_NAMESTR("_close"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID__close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID__close)},
3381
3942
  {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_copy)},
 
3943
  {__Pyx_NAMESTR("encode"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_encode, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_encode)},
 
3944
  {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID___reduce__, METH_NOARGS, __Pyx_DOCSTR(0)},
 
3945
  {__Pyx_NAMESTR("__setstate__"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID___setstate__, METH_O, __Pyx_DOCSTR(0)},
3382
3946
  {__Pyx_NAMESTR("is_simple"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_is_simple, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_is_simple)},
3383
3947
  {__Pyx_NAMESTR("offset_simple"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_offset_simple, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_offset_simple)},
3384
3948
  {__Pyx_NAMESTR("get_simple_extent_ndims"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_get_simple_extent_ndims, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_get_simple_extent_ndims)},
3561
4125
static struct PyMethodDef __pyx_methods[] = {
3562
4126
  {__Pyx_NAMESTR("create"), (PyCFunction)__pyx_pf_4h5py_3h5s_create, METH_O, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_create)},
3563
4127
  {__Pyx_NAMESTR("create_simple"), (PyCFunction)__pyx_pf_4h5py_3h5s_create_simple, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_create_simple)},
 
4128
  {__Pyx_NAMESTR("decode"), (PyCFunction)__pyx_pf_4h5py_3h5s_decode, METH_O, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_decode)},
3564
4129
  {0, 0, 0, 0}
3565
4130
};
3566
4131
 
3614
4179
  {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1},
3615
4180
  {&__pyx_n_s__dimensions, __pyx_k__dimensions, sizeof(__pyx_k__dimensions), 0, 0, 1, 1},
3616
4181
  {&__pyx_n_s__dims_tpl, __pyx_k__dims_tpl, sizeof(__pyx_k__dims_tpl), 0, 0, 1, 1},
 
4182
  {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1},
3617
4183
  {&__pyx_n_s__id, __pyx_k__id, sizeof(__pyx_k__id), 0, 0, 1, 1},
3618
4184
  {&__pyx_n_s__max_dims_tpl, __pyx_k__max_dims_tpl, sizeof(__pyx_k__max_dims_tpl), 0, 0, 1, 1},
3619
4185
  {&__pyx_n_s__maxdims, __pyx_k__maxdims, sizeof(__pyx_k__maxdims), 0, 0, 1, 1},
3633
4199
 
3634
4200
static int __Pyx_InitGlobals(void) {
3635
4201
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
4202
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
4203
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
3636
4204
  return 0;
3637
4205
  __pyx_L1_error:;
3638
4206
  return -1;
3698
4266
  /*--- Global init code ---*/
3699
4267
  /*--- Function export code ---*/
3700
4268
  /*--- Type init code ---*/
3701
 
  __pyx_ptype_4h5py_2h5_ObjectID = __Pyx_ImportType("h5py.h5", "ObjectID", sizeof(struct __pyx_obj_4h5py_2h5_ObjectID)); if (unlikely(!__pyx_ptype_4h5py_2h5_ObjectID)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4269
  __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[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3702
4270
  __pyx_type_4h5py_3h5s_SpaceID.tp_base = __pyx_ptype_4h5py_2h5_ObjectID;
3703
4271
  if (PyType_Ready(&__pyx_type_4h5py_3h5s_SpaceID) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3704
4272
  if (__Pyx_SetAttrString(__pyx_m, "SpaceID", (PyObject *)&__pyx_type_4h5py_3h5s_SpaceID) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3705
4273
  if (__pyx_type_4h5py_3h5s_SpaceID.tp_weaklistoffset == 0) __pyx_type_4h5py_3h5s_SpaceID.tp_weaklistoffset = offsetof(struct __pyx_obj_4h5py_3h5s_SpaceID, __pyx_base.__weakref__);
3706
4274
  __pyx_ptype_4h5py_3h5s_SpaceID = &__pyx_type_4h5py_3h5s_SpaceID;
3707
4275
  /*--- Type import code ---*/
3708
 
  __pyx_ptype_4h5py_2h5_H5PYConfig = __Pyx_ImportType("h5py.h5", "H5PYConfig", sizeof(struct __pyx_obj_4h5py_2h5_H5PYConfig)); if (unlikely(!__pyx_ptype_4h5py_2h5_H5PYConfig)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3709
 
  __pyx_ptype_4h5py_2h5_SmartStruct = __Pyx_ImportType("h5py.h5", "SmartStruct", sizeof(struct __pyx_obj_4h5py_2h5_SmartStruct)); if (unlikely(!__pyx_ptype_4h5py_2h5_SmartStruct)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3710
 
  __pyx_ptype_4h5py_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr)); if (unlikely(!__pyx_ptype_4h5py_5numpy_dtype)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3711
 
  __pyx_ptype_4h5py_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject)); if (unlikely(!__pyx_ptype_4h5py_5numpy_ndarray)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4276
  __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[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4277
  __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[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4278
  __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 = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4279
  __pyx_ptype_4h5py_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_4h5py_5numpy_dtype)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4280
  __pyx_ptype_4h5py_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_4h5py_5numpy_ndarray)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3712
4281
  /*--- Function import code ---*/
3713
4282
  __pyx_t_1 = __Pyx_ImportModule("h5py.h5"); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3714
4283
  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[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3727
4296
  Py_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3728
4297
  /*--- Execution code ---*/
3729
4298
 
3730
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":27
 
4299
  /* "/home/tachyon/h5py/h5py/h5s.pyx":27
3731
4300
 * 
3732
4301
 * # Initialization
3733
4302
 * init_hdf5()             # <<<<<<<<<<<<<<
3736
4305
 */
3737
4306
  __pyx_t_3 = __pyx_f_4h5py_2h5_init_hdf5(); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3738
4307
 
3739
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":38
 
4308
  /* "/home/tachyon/h5py/h5py/h5s.pyx":38
3740
4309
 * 
3741
4310
 * #enum H5S_seloper_t:
3742
4311
 * SELECT_NOOP     = H5S_SELECT_NOOP             # <<<<<<<<<<<<<<
3748
4317
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SELECT_NOOP, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3749
4318
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3750
4319
 
3751
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":39
 
4320
  /* "/home/tachyon/h5py/h5py/h5s.pyx":39
3752
4321
 * #enum H5S_seloper_t:
3753
4322
 * SELECT_NOOP     = H5S_SELECT_NOOP
3754
4323
 * SELECT_SET      = H5S_SELECT_SET             # <<<<<<<<<<<<<<
3760
4329
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SELECT_SET, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3761
4330
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3762
4331
 
3763
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":40
 
4332
  /* "/home/tachyon/h5py/h5py/h5s.pyx":40
3764
4333
 * SELECT_NOOP     = H5S_SELECT_NOOP
3765
4334
 * SELECT_SET      = H5S_SELECT_SET
3766
4335
 * SELECT_OR       = H5S_SELECT_OR             # <<<<<<<<<<<<<<
3772
4341
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SELECT_OR, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3773
4342
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3774
4343
 
3775
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":41
 
4344
  /* "/home/tachyon/h5py/h5py/h5s.pyx":41
3776
4345
 * SELECT_SET      = H5S_SELECT_SET
3777
4346
 * SELECT_OR       = H5S_SELECT_OR
3778
4347
 * SELECT_AND      = H5S_SELECT_AND             # <<<<<<<<<<<<<<
3784
4353
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SELECT_AND, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3785
4354
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3786
4355
 
3787
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":42
 
4356
  /* "/home/tachyon/h5py/h5py/h5s.pyx":42
3788
4357
 * SELECT_OR       = H5S_SELECT_OR
3789
4358
 * SELECT_AND      = H5S_SELECT_AND
3790
4359
 * SELECT_XOR      = H5S_SELECT_XOR             # <<<<<<<<<<<<<<
3796
4365
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SELECT_XOR, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3797
4366
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3798
4367
 
3799
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":43
 
4368
  /* "/home/tachyon/h5py/h5py/h5s.pyx":43
3800
4369
 * SELECT_AND      = H5S_SELECT_AND
3801
4370
 * SELECT_XOR      = H5S_SELECT_XOR
3802
4371
 * SELECT_NOTB     = H5S_SELECT_NOTB             # <<<<<<<<<<<<<<
3808
4377
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SELECT_NOTB, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3809
4378
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3810
4379
 
3811
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":44
 
4380
  /* "/home/tachyon/h5py/h5py/h5s.pyx":44
3812
4381
 * SELECT_XOR      = H5S_SELECT_XOR
3813
4382
 * SELECT_NOTB     = H5S_SELECT_NOTB
3814
4383
 * SELECT_NOTA     = H5S_SELECT_NOTA             # <<<<<<<<<<<<<<
3820
4389
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SELECT_NOTA, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3821
4390
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3822
4391
 
3823
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":45
 
4392
  /* "/home/tachyon/h5py/h5py/h5s.pyx":45
3824
4393
 * SELECT_NOTB     = H5S_SELECT_NOTB
3825
4394
 * SELECT_NOTA     = H5S_SELECT_NOTA
3826
4395
 * SELECT_APPEND   = H5S_SELECT_APPEND             # <<<<<<<<<<<<<<
3832
4401
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SELECT_APPEND, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3833
4402
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3834
4403
 
3835
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":46
 
4404
  /* "/home/tachyon/h5py/h5py/h5s.pyx":46
3836
4405
 * SELECT_NOTA     = H5S_SELECT_NOTA
3837
4406
 * SELECT_APPEND   = H5S_SELECT_APPEND
3838
4407
 * SELECT_PREPEND  = H5S_SELECT_PREPEND             # <<<<<<<<<<<<<<
3844
4413
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SELECT_PREPEND, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3845
4414
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3846
4415
 
3847
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":47
 
4416
  /* "/home/tachyon/h5py/h5py/h5s.pyx":47
3848
4417
 * SELECT_APPEND   = H5S_SELECT_APPEND
3849
4418
 * SELECT_PREPEND  = H5S_SELECT_PREPEND
3850
4419
 * SELECT_INVALID  = H5S_SELECT_INVALID             # <<<<<<<<<<<<<<
3856
4425
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SELECT_INVALID, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3857
4426
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3858
4427
 
3859
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":49
 
4428
  /* "/home/tachyon/h5py/h5py/h5s.pyx":49
3860
4429
 * SELECT_INVALID  = H5S_SELECT_INVALID
3861
4430
 * 
3862
4431
 * ALL = lockid(H5S_ALL)   # This is accepted in lieu of an actual identifier             # <<<<<<<<<<<<<<
3868
4437
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ALL, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3869
4438
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3870
4439
 
3871
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":51
 
4440
  /* "/home/tachyon/h5py/h5py/h5s.pyx":51
3872
4441
 * ALL = lockid(H5S_ALL)   # This is accepted in lieu of an actual identifier
3873
4442
 *                         # in functions like H5Dread, so wrap it.
3874
4443
 * UNLIMITED = H5S_UNLIMITED             # <<<<<<<<<<<<<<
3880
4449
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__UNLIMITED, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3881
4450
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3882
4451
 
3883
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":54
 
4452
  /* "/home/tachyon/h5py/h5py/h5s.pyx":54
3884
4453
 * 
3885
4454
 * #enum H5S_class_t
3886
4455
 * NO_CLASS = H5S_NO_CLASS             # <<<<<<<<<<<<<<
3892
4461
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__NO_CLASS, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3893
4462
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3894
4463
 
3895
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":55
 
4464
  /* "/home/tachyon/h5py/h5py/h5s.pyx":55
3896
4465
 * #enum H5S_class_t
3897
4466
 * NO_CLASS = H5S_NO_CLASS
3898
4467
 * SCALAR   = H5S_SCALAR             # <<<<<<<<<<<<<<
3904
4473
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SCALAR, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3905
4474
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3906
4475
 
3907
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":56
 
4476
  /* "/home/tachyon/h5py/h5py/h5s.pyx":56
3908
4477
 * NO_CLASS = H5S_NO_CLASS
3909
4478
 * SCALAR   = H5S_SCALAR
3910
4479
 * SIMPLE   = H5S_SIMPLE             # <<<<<<<<<<<<<<
3916
4485
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SIMPLE, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3917
4486
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3918
4487
 
3919
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":59
 
4488
  /* "/home/tachyon/h5py/h5py/h5s.pyx":59
3920
4489
 * 
3921
4490
 * #enum H5S_sel_type
3922
4491
 * SEL_ERROR       = H5S_SEL_ERROR             # <<<<<<<<<<<<<<
3928
4497
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SEL_ERROR, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3929
4498
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3930
4499
 
3931
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":60
 
4500
  /* "/home/tachyon/h5py/h5py/h5s.pyx":60
3932
4501
 * #enum H5S_sel_type
3933
4502
 * SEL_ERROR       = H5S_SEL_ERROR
3934
4503
 * SEL_NONE        = H5S_SEL_NONE             # <<<<<<<<<<<<<<
3940
4509
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SEL_NONE, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3941
4510
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3942
4511
 
3943
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":61
 
4512
  /* "/home/tachyon/h5py/h5py/h5s.pyx":61
3944
4513
 * SEL_ERROR       = H5S_SEL_ERROR
3945
4514
 * SEL_NONE        = H5S_SEL_NONE
3946
4515
 * SEL_POINTS      = H5S_SEL_POINTS             # <<<<<<<<<<<<<<
3952
4521
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SEL_POINTS, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3953
4522
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3954
4523
 
3955
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":62
 
4524
  /* "/home/tachyon/h5py/h5py/h5s.pyx":62
3956
4525
 * SEL_NONE        = H5S_SEL_NONE
3957
4526
 * SEL_POINTS      = H5S_SEL_POINTS
3958
4527
 * SEL_HYPERSLABS  = H5S_SEL_HYPERSLABS             # <<<<<<<<<<<<<<
3964
4533
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SEL_HYPERSLABS, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3965
4534
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3966
4535
 
3967
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":63
 
4536
  /* "/home/tachyon/h5py/h5py/h5s.pyx":63
3968
4537
 * SEL_POINTS      = H5S_SEL_POINTS
3969
4538
 * SEL_HYPERSLABS  = H5S_SEL_HYPERSLABS
3970
4539
 * SEL_ALL         = H5S_SEL_ALL             # <<<<<<<<<<<<<<
3976
4545
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SEL_ALL, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3977
4546
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3978
4547
 
3979
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":449
 
4548
  /* "/home/tachyon/h5py/h5py/h5s.pyx":449
3980
4549
 * 
3981
4550
 * 
3982
4551
 *     def select_elements(self, object coords, int op=H5S_SELECT_SET):             # <<<<<<<<<<<<<<
3985
4554
 */
3986
4555
  __pyx_k_3 = H5S_SELECT_SET;
3987
4556
 
3988
 
  /* "/home/tachyon/slave/unix-release/build/h5py/h5s.pyx":523
 
4557
  /* "/home/tachyon/h5py/h5py/h5s.pyx":523
3989
4558
 * 
3990
4559
 *     def select_hyperslab(self, object start, object count, object stride=None,
3991
4560
 *                          object block=None, int op=H5S_SELECT_SET):             # <<<<<<<<<<<<<<
3994
4563
 */
3995
4564
  __pyx_k_6 = H5S_SELECT_SET;
3996
4565
 
3997
 
  /* "/usr/local/lib/python2.6/dist-packages/Cython-0.12-py2.6-linux-x86_64.egg/Cython/Includes/python_ref.pxd":1
3998
 
 * cdef extern from "Python.h":             # <<<<<<<<<<<<<<
3999
 
 *     ctypedef struct PyTypeObject
4000
 
 *     ctypedef struct PyObject:
 
4566
  /* "/home/tachyon/h5py/h5py/h5.pxd":1
 
4567
 * #+             # <<<<<<<<<<<<<<
 
4568
 * #
 
4569
 * # This file is part of h5py, a low-level Python interface to the HDF5 library.
4001
4570
 */
4002
4571
  goto __pyx_L0;
4003
4572
  __pyx_L1_error:;
4153
4722
    return -1;
4154
4723
}
4155
4724
 
4156
 
static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
 
4725
static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
4157
4726
    PyObject *tmp_type, *tmp_value, *tmp_tb;
4158
4727
    PyThreadState *tstate = PyThreadState_GET();
4159
4728
 
4168
4737
    Py_XDECREF(tmp_tb);
4169
4738
}
4170
4739
 
4171
 
static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
 
4740
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
4172
4741
    PyThreadState *tstate = PyThreadState_GET();
4173
4742
    *type = tstate->curexc_type;
4174
4743
    *value = tstate->curexc_value;
4180
4749
}
4181
4750
 
4182
4751
 
4183
 
static INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
 
4752
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
4184
4753
    if (unlikely(!type)) {
4185
4754
        PyErr_Format(PyExc_SystemError, "Missing type object");
4186
4755
        return 0;
4212
4781
    return 0;
4213
4782
}
4214
4783
 
4215
 
static INLINE PyObject *__Pyx_PyInt_to_py_hsize_t(hsize_t val) {
 
4784
static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_hsize_t(hsize_t val) {
4216
4785
    const hsize_t neg_one = (hsize_t)-1, const_zero = 0;
4217
4786
    const int is_unsigned = neg_one > const_zero;
4218
4787
    if (sizeof(hsize_t) <  sizeof(long)) {
4230
4799
    }
4231
4800
}
4232
4801
 
4233
 
static INLINE PyObject *__Pyx_PyInt_to_py_hid_t(hid_t val) {
 
4802
static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_hid_t(hid_t val) {
4234
4803
    const hid_t neg_one = (hid_t)-1, const_zero = 0;
4235
4804
    const int is_unsigned = neg_one > const_zero;
4236
4805
    if (sizeof(hid_t) <  sizeof(long)) {
4248
4817
    }
4249
4818
}
4250
4819
 
 
4820
static CYTHON_INLINE hid_t __Pyx_PyInt_from_py_hid_t(PyObject* x) {
 
4821
    const hid_t neg_one = (hid_t)-1, const_zero = 0;
 
4822
    const int is_unsigned = neg_one > const_zero;
 
4823
    if (sizeof(hid_t) == sizeof(char)) {
 
4824
        if (is_unsigned)
 
4825
            return (hid_t)__Pyx_PyInt_AsUnsignedChar(x);
 
4826
        else
 
4827
            return (hid_t)__Pyx_PyInt_AsSignedChar(x);
 
4828
    } else if (sizeof(hid_t) == sizeof(short)) {
 
4829
        if (is_unsigned)
 
4830
            return (hid_t)__Pyx_PyInt_AsUnsignedShort(x);
 
4831
        else
 
4832
            return (hid_t)__Pyx_PyInt_AsSignedShort(x);
 
4833
    } else if (sizeof(hid_t) == sizeof(int)) {
 
4834
        if (is_unsigned)
 
4835
            return (hid_t)__Pyx_PyInt_AsUnsignedInt(x);
 
4836
        else
 
4837
            return (hid_t)__Pyx_PyInt_AsSignedInt(x);
 
4838
    } else if (sizeof(hid_t) == sizeof(long)) {
 
4839
        if (is_unsigned)
 
4840
            return (hid_t)__Pyx_PyInt_AsUnsignedLong(x);
 
4841
        else
 
4842
            return (hid_t)__Pyx_PyInt_AsSignedLong(x);
 
4843
    } else if (sizeof(hid_t) == sizeof(PY_LONG_LONG)) {
 
4844
        if (is_unsigned)
 
4845
            return (hid_t)__Pyx_PyInt_AsUnsignedLongLong(x);
 
4846
        else
 
4847
            return (hid_t)__Pyx_PyInt_AsSignedLongLong(x);
 
4848
#if 0
 
4849
    } else if (sizeof(hid_t) > sizeof(short) &&
 
4850
               sizeof(hid_t) < sizeof(int)) { /*  __int32 ILP64 ? */
 
4851
        if (is_unsigned)
 
4852
            return (hid_t)__Pyx_PyInt_AsUnsignedInt(x);
 
4853
        else
 
4854
            return (hid_t)__Pyx_PyInt_AsSignedInt(x);
 
4855
#endif
 
4856
    }
 
4857
    PyErr_SetString(PyExc_TypeError, "hid_t");
 
4858
    return (hid_t)-1;
 
4859
}
 
4860
 
4251
4861
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
4252
4862
    PyObject *result;
4253
4863
    result = PyObject_GetAttr(dict, name);
4366
4976
}
4367
4977
#endif
4368
4978
 
4369
 
static INLINE PyObject *__Pyx_PyInt_to_py_hssize_t(hssize_t val) {
 
4979
static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_hssize_t(hssize_t val) {
4370
4980
    const hssize_t neg_one = (hssize_t)-1, const_zero = 0;
4371
4981
    const int is_unsigned = neg_one > const_zero;
4372
4982
    if (sizeof(hssize_t) <  sizeof(long)) {
4384
4994
    }
4385
4995
}
4386
4996
 
4387
 
static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
 
4997
static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
4388
4998
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
4389
4999
    const int is_unsigned = neg_one > const_zero;
4390
5000
    if (sizeof(unsigned char) < sizeof(long)) {
4403
5013
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
4404
5014
}
4405
5015
 
4406
 
static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
 
5016
static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
4407
5017
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
4408
5018
    const int is_unsigned = neg_one > const_zero;
4409
5019
    if (sizeof(unsigned short) < sizeof(long)) {
4422
5032
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
4423
5033
}
4424
5034
 
4425
 
static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
 
5035
static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
4426
5036
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
4427
5037
    const int is_unsigned = neg_one > const_zero;
4428
5038
    if (sizeof(unsigned int) < sizeof(long)) {
4441
5051
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
4442
5052
}
4443
5053
 
4444
 
static INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
 
5054
static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
4445
5055
    const char neg_one = (char)-1, const_zero = 0;
4446
5056
    const int is_unsigned = neg_one > const_zero;
4447
5057
    if (sizeof(char) < sizeof(long)) {
4460
5070
    return (char)__Pyx_PyInt_AsLong(x);
4461
5071
}
4462
5072
 
4463
 
static INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
 
5073
static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
4464
5074
    const short neg_one = (short)-1, const_zero = 0;
4465
5075
    const int is_unsigned = neg_one > const_zero;
4466
5076
    if (sizeof(short) < sizeof(long)) {
4479
5089
    return (short)__Pyx_PyInt_AsLong(x);
4480
5090
}
4481
5091
 
4482
 
static INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
 
5092
static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
4483
5093
    const int neg_one = (int)-1, const_zero = 0;
4484
5094
    const int is_unsigned = neg_one > const_zero;
4485
5095
    if (sizeof(int) < sizeof(long)) {
4498
5108
    return (int)__Pyx_PyInt_AsLong(x);
4499
5109
}
4500
5110
 
4501
 
static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
 
5111
static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
4502
5112
    const signed char neg_one = (signed char)-1, const_zero = 0;
4503
5113
    const int is_unsigned = neg_one > const_zero;
4504
5114
    if (sizeof(signed char) < sizeof(long)) {
4517
5127
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
4518
5128
}
4519
5129
 
4520
 
static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
 
5130
static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
4521
5131
    const signed short neg_one = (signed short)-1, const_zero = 0;
4522
5132
    const int is_unsigned = neg_one > const_zero;
4523
5133
    if (sizeof(signed short) < sizeof(long)) {
4536
5146
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
4537
5147
}
4538
5148
 
4539
 
static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
 
5149
static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
4540
5150
    const signed int neg_one = (signed int)-1, const_zero = 0;
4541
5151
    const int is_unsigned = neg_one > const_zero;
4542
5152
    if (sizeof(signed int) < sizeof(long)) {
4555
5165
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
4556
5166
}
4557
5167
 
4558
 
static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
 
5168
static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
4559
5169
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
4560
5170
    const int is_unsigned = neg_one > const_zero;
4561
5171
#if PY_VERSION_HEX < 0x03000000
4590
5200
    }
4591
5201
}
4592
5202
 
4593
 
static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
 
5203
static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
4594
5204
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
4595
5205
    const int is_unsigned = neg_one > const_zero;
4596
5206
#if PY_VERSION_HEX < 0x03000000
4625
5235
    }
4626
5236
}
4627
5237
 
4628
 
static INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
 
5238
static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
4629
5239
    const long neg_one = (long)-1, const_zero = 0;
4630
5240
    const int is_unsigned = neg_one > const_zero;
4631
5241
#if PY_VERSION_HEX < 0x03000000
4660
5270
    }
4661
5271
}
4662
5272
 
4663
 
static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
 
5273
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
4664
5274
    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
4665
5275
    const int is_unsigned = neg_one > const_zero;
4666
5276
#if PY_VERSION_HEX < 0x03000000
4695
5305
    }
4696
5306
}
4697
5307
 
4698
 
static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
 
5308
static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
4699
5309
    const signed long neg_one = (signed long)-1, const_zero = 0;
4700
5310
    const int is_unsigned = neg_one > const_zero;
4701
5311
#if PY_VERSION_HEX < 0x03000000
4730
5340
    }
4731
5341
}
4732
5342
 
4733
 
static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
 
5343
static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
4734
5344
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
4735
5345
    const int is_unsigned = neg_one > const_zero;
4736
5346
#if PY_VERSION_HEX < 0x03000000
4768
5378
#ifndef __PYX_HAVE_RT_ImportType
4769
5379
#define __PYX_HAVE_RT_ImportType
4770
5380
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
4771
 
    long size)
 
5381
    long size, int strict)
4772
5382
{
4773
5383
    PyObject *py_module = 0;
4774
5384
    PyObject *result = 0;
4775
5385
    PyObject *py_name = 0;
 
5386
    char warning[200];
4776
5387
 
4777
5388
    py_module = __Pyx_ImportModule(module_name);
4778
5389
    if (!py_module)
4797
5408
            module_name, class_name);
4798
5409
        goto bad;
4799
5410
    }
4800
 
    if (((PyTypeObject *)result)->tp_basicsize != size) {
 
5411
    if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) {
 
5412
        PyOS_snprintf(warning, sizeof(warning), 
 
5413
            "%s.%s size changed, may indicate binary incompatibility",
 
5414
            module_name, class_name);
 
5415
        PyErr_WarnEx(NULL, warning, 0);
 
5416
    }
 
5417
    else if (((PyTypeObject *)result)->tp_basicsize != size) {
4801
5418
        PyErr_Format(PyExc_ValueError, 
4802
 
            "%s.%s does not appear to be the correct type object",
 
5419
            "%s.%s has the wrong size, try recompiling",
4803
5420
            module_name, class_name);
4804
5421
        goto bad;
4805
5422
    }
4991
5608
 
4992
5609
/* Type Conversion Functions */
4993
5610
 
4994
 
static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
 
5611
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
4995
5612
   if (x == Py_True) return 1;
4996
5613
   else if ((x == Py_False) | (x == Py_None)) return 0;
4997
5614
   else return PyObject_IsTrue(x);
4998
5615
}
4999
5616
 
5000
 
static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
 
5617
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
5001
5618
  PyNumberMethods *m;
5002
5619
  const char *name = NULL;
5003
5620
  PyObject *res = NULL;
5043
5660
  return res;
5044
5661
}
5045
5662
 
5046
 
static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
 
5663
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
5047
5664
  Py_ssize_t ival;
5048
5665
  PyObject* x = PyNumber_Index(b);
5049
5666
  if (!x) return -1;
5052
5669
  return ival;
5053
5670
}
5054
5671
 
5055
 
static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
 
5672
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
5056
5673
#if PY_VERSION_HEX < 0x02050000
5057
5674
   if (ival <= LONG_MAX)
5058
5675
       return PyInt_FromLong((long)ival);
5066
5683
#endif
5067
5684
}
5068
5685
 
5069
 
static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
 
5686
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
5070
5687
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
5071
5688
   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
5072
5689
       return (size_t)-1;