~ubuntu-branches/debian/experimental/h5py/experimental

« back to all changes in this revision

Viewing changes to h5py/h5s.c

  • Committer: Bazaar Package Importer
  • Author(s): Soeren Sonnenburg
  • Date: 2009-09-24 11:08:03 UTC
  • mfrom: (2.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090924110803-hz0en6f43x8opgj4
Tags: 1.2.1-2
Build-depend on hdf5 >= 1.8.3 and enable api 1.8 (Closes: #548049)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Generated by Cython 0.11.2 on Mon Aug 31 11:03:05 2009 */
 
2
 
 
3
#define PY_SSIZE_T_CLEAN
 
4
#include "Python.h"
 
5
#include "structmember.h"
 
6
#ifndef Py_PYTHON_H
 
7
    #error Python headers needed to compile C extensions, please install development version of Python.
 
8
#endif
 
9
#ifndef PY_LONG_LONG
 
10
  #define PY_LONG_LONG LONG_LONG
 
11
#endif
 
12
#ifndef DL_EXPORT
 
13
  #define DL_EXPORT(t) t
 
14
#endif
 
15
#if PY_VERSION_HEX < 0x02040000
 
16
  #define METH_COEXIST 0
 
17
  #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
 
18
#endif
 
19
#if PY_VERSION_HEX < 0x02050000
 
20
  typedef int Py_ssize_t;
 
21
  #define PY_SSIZE_T_MAX INT_MAX
 
22
  #define PY_SSIZE_T_MIN INT_MIN
 
23
  #define PY_FORMAT_SIZE_T ""
 
24
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
 
25
  #define PyInt_AsSsize_t(o)   PyInt_AsLong(o)
 
26
  #define PyNumber_Index(o)    PyNumber_Int(o)
 
27
  #define PyIndex_Check(o)     PyNumber_Check(o)
 
28
#endif
 
29
#if PY_VERSION_HEX < 0x02060000
 
30
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
 
31
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
 
32
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
 
33
  #define PyVarObject_HEAD_INIT(type, size) \
 
34
          PyObject_HEAD_INIT(type) size,
 
35
  #define PyType_Modified(t)
 
36
 
 
37
  typedef struct {
 
38
       void *buf;
 
39
       PyObject *obj;
 
40
       Py_ssize_t len;
 
41
       Py_ssize_t itemsize;
 
42
       int readonly;
 
43
       int ndim;
 
44
       char *format;
 
45
       Py_ssize_t *shape;
 
46
       Py_ssize_t *strides;
 
47
       Py_ssize_t *suboffsets;
 
48
       void *internal;
 
49
  } Py_buffer;
 
50
 
 
51
  #define PyBUF_SIMPLE 0
 
52
  #define PyBUF_WRITABLE 0x0001
 
53
  #define PyBUF_FORMAT 0x0004
 
54
  #define PyBUF_ND 0x0008
 
55
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
 
56
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
 
57
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
 
58
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
 
59
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
 
60
 
 
61
#endif
 
62
#if PY_MAJOR_VERSION < 3
 
63
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
 
64
#else
 
65
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
 
66
#endif
 
67
#if PY_MAJOR_VERSION >= 3
 
68
  #define Py_TPFLAGS_CHECKTYPES 0
 
69
  #define Py_TPFLAGS_HAVE_INDEX 0
 
70
#endif
 
71
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
 
72
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
 
73
#endif
 
74
#if PY_MAJOR_VERSION >= 3
 
75
  #define PyBaseString_Type            PyUnicode_Type
 
76
  #define PyString_Type                PyBytes_Type
 
77
  #define PyString_CheckExact          PyBytes_CheckExact
 
78
  #define PyInt_Type                   PyLong_Type
 
79
  #define PyInt_Check(op)              PyLong_Check(op)
 
80
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
 
81
  #define PyInt_FromString             PyLong_FromString
 
82
  #define PyInt_FromUnicode            PyLong_FromUnicode
 
83
  #define PyInt_FromLong               PyLong_FromLong
 
84
  #define PyInt_FromSize_t             PyLong_FromSize_t
 
85
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
 
86
  #define PyInt_AsLong                 PyLong_AsLong
 
87
  #define PyInt_AS_LONG                PyLong_AS_LONG
 
88
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
 
89
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
 
90
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
 
91
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
 
92
#else
 
93
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
 
94
  #define PyBytes_Type                 PyString_Type
 
95
#endif
 
96
#if PY_MAJOR_VERSION >= 3
 
97
  #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
 
98
#endif
 
99
#if !defined(WIN32) && !defined(MS_WINDOWS)
 
100
  #ifndef __stdcall
 
101
    #define __stdcall
 
102
  #endif
 
103
  #ifndef __cdecl
 
104
    #define __cdecl
 
105
  #endif
 
106
  #ifndef __fastcall
 
107
    #define __fastcall
 
108
  #endif
 
109
#else
 
110
  #define _USE_MATH_DEFINES
 
111
#endif
 
112
#if PY_VERSION_HEX < 0x02050000
 
113
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
 
114
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
 
115
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
 
116
#else
 
117
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
 
118
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
 
119
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
 
120
#endif
 
121
#if PY_VERSION_HEX < 0x02050000
 
122
  #define __Pyx_NAMESTR(n) ((char *)(n))
 
123
  #define __Pyx_DOCSTR(n)  ((char *)(n))
 
124
#else
 
125
  #define __Pyx_NAMESTR(n) (n)
 
126
  #define __Pyx_DOCSTR(n)  (n)
 
127
#endif
 
128
#ifdef __cplusplus
 
129
#define __PYX_EXTERN_C extern "C"
 
130
#else
 
131
#define __PYX_EXTERN_C extern
 
132
#endif
 
133
#include <math.h>
 
134
#define __PYX_HAVE_API__h5py__h5s
 
135
#include "stdlib.h"
 
136
#include "string.h"
 
137
#include "time.h"
 
138
#include "unistd.h"
 
139
#include "stdint.h"
 
140
#include "compat.h"
 
141
#include "lzf_filter.h"
 
142
#include "hdf5.h"
 
143
#include "typeconv.h"
 
144
#include "typeproxy.h"
 
145
#include "numpy/arrayobject.h"
 
146
#define __PYX_USE_C99_COMPLEX defined(_Complex_I)
 
147
 
 
148
 
 
149
#ifdef __GNUC__
 
150
#define INLINE __inline__
 
151
#elif _WIN32
 
152
#define INLINE __inline
 
153
#else
 
154
#define INLINE 
 
155
#endif
 
156
 
 
157
typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/
 
158
 
 
159
 
 
160
 
 
161
static int __pyx_skip_dispatch = 0;
 
162
 
 
163
 
 
164
/* Type Conversion Predeclarations */
 
165
 
 
166
#if PY_MAJOR_VERSION < 3
 
167
#define __Pyx_PyBytes_FromString          PyString_FromString
 
168
#define __Pyx_PyBytes_FromStringAndSize   PyString_FromStringAndSize
 
169
#define __Pyx_PyBytes_AsString            PyString_AsString
 
170
#else
 
171
#define __Pyx_PyBytes_FromString          PyBytes_FromString
 
172
#define __Pyx_PyBytes_FromStringAndSize   PyBytes_FromStringAndSize
 
173
#define __Pyx_PyBytes_AsString            PyBytes_AsString
 
174
#endif
 
175
 
 
176
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
 
177
static INLINE int __Pyx_PyObject_IsTrue(PyObject*);
 
178
static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
 
179
 
 
180
#if !defined(T_PYSSIZET)
 
181
#if PY_VERSION_HEX < 0x02050000
 
182
#define T_PYSSIZET T_INT
 
183
#elif !defined(T_LONGLONG)
 
184
#define T_PYSSIZET \
 
185
        ((sizeof(Py_ssize_t) == sizeof(int))  ? T_INT  : \
 
186
        ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1))
 
187
#else
 
188
#define T_PYSSIZET \
 
189
        ((sizeof(Py_ssize_t) == sizeof(int))          ? T_INT      : \
 
190
        ((sizeof(Py_ssize_t) == sizeof(long))         ? T_LONG     : \
 
191
        ((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))
 
192
#endif
 
193
#endif
 
194
 
 
195
#if !defined(T_SIZET)
 
196
#if !defined(T_ULONGLONG)
 
197
#define T_SIZET \
 
198
        ((sizeof(size_t) == sizeof(unsigned int))  ? T_UINT  : \
 
199
        ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1))
 
200
#else
 
201
#define T_SIZET \
 
202
        ((sizeof(size_t) == sizeof(unsigned int))          ? T_UINT      : \
 
203
        ((sizeof(size_t) == sizeof(unsigned long))         ? T_ULONG     : \
 
204
        ((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))
 
205
#endif
 
206
#endif
 
207
 
 
208
static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
 
209
static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
 
210
static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
 
211
 
 
212
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
 
213
 
 
214
 
 
215
#ifdef __GNUC__
 
216
/* Test for GCC > 2.95 */
 
217
#if __GNUC__ > 2 ||               (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) 
 
218
#define likely(x)   __builtin_expect(!!(x), 1)
 
219
#define unlikely(x) __builtin_expect(!!(x), 0)
 
220
#else /* __GNUC__ > 2 ... */
 
221
#define likely(x)   (x)
 
222
#define unlikely(x) (x)
 
223
#endif /* __GNUC__ > 2 ... */
 
224
#else /* __GNUC__ */
 
225
#define likely(x)   (x)
 
226
#define unlikely(x) (x)
 
227
#endif /* __GNUC__ */
 
228
    
 
229
static PyObject *__pyx_m;
 
230
static PyObject *__pyx_b;
 
231
static PyObject *__pyx_empty_tuple;
 
232
static int __pyx_lineno;
 
233
static int __pyx_clineno = 0;
 
234
static const char * __pyx_cfilenm= __FILE__;
 
235
static const char *__pyx_filename;
 
236
static const char **__pyx_f;
 
237
 
 
238
 
 
239
#ifdef CYTHON_REFNANNY
 
240
typedef struct {
 
241
  void (*INCREF)(void*, PyObject*, int);
 
242
  void (*DECREF)(void*, PyObject*, int);
 
243
  void (*GOTREF)(void*, PyObject*, int);
 
244
  void (*GIVEREF)(void*, PyObject*, int);
 
245
  void* (*NewContext)(const char*, int, const char*);
 
246
  void (*FinishContext)(void**);
 
247
} __Pyx_RefnannyAPIStruct;
 
248
static __Pyx_RefnannyAPIStruct *__Pyx_Refnanny = NULL;
 
249
#define __Pyx_ImportRefcountAPI(name)   (__Pyx_RefnannyAPIStruct *) PyCObject_Import((char *)name, (char *)"RefnannyAPI")
 
250
#define __Pyx_INCREF(r) __Pyx_Refnanny->INCREF(__pyx_refchk, (PyObject *)(r), __LINE__)
 
251
#define __Pyx_DECREF(r) __Pyx_Refnanny->DECREF(__pyx_refchk, (PyObject *)(r), __LINE__)
 
252
#define __Pyx_GOTREF(r) __Pyx_Refnanny->GOTREF(__pyx_refchk, (PyObject *)(r), __LINE__)
 
253
#define __Pyx_GIVEREF(r) __Pyx_Refnanny->GIVEREF(__pyx_refchk, (PyObject *)(r), __LINE__)
 
254
#define __Pyx_XDECREF(r) if((r) == NULL) ; else __Pyx_DECREF(r)
 
255
#define __Pyx_SetupRefcountContext(name)   void* __pyx_refchk = __Pyx_Refnanny->NewContext((name), __LINE__, __FILE__)
 
256
#define __Pyx_FinishRefcountContext()   __Pyx_Refnanny->FinishContext(&__pyx_refchk)
 
257
#else
 
258
#define __Pyx_INCREF(r) Py_INCREF(r)
 
259
#define __Pyx_DECREF(r) Py_DECREF(r)
 
260
#define __Pyx_GOTREF(r)
 
261
#define __Pyx_GIVEREF(r)
 
262
#define __Pyx_XDECREF(r) Py_XDECREF(r)
 
263
#define __Pyx_SetupRefcountContext(name)
 
264
#define __Pyx_FinishRefcountContext()
 
265
#endif /* CYTHON_REFNANNY */
 
266
#define __Pyx_XGIVEREF(r) if((r) == NULL) ; else __Pyx_GIVEREF(r)
 
267
#define __Pyx_XGOTREF(r) if((r) == NULL) ; else __Pyx_GOTREF(r)
 
268
 
 
269
static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
 
270
 
 
271
static void __Pyx_RaiseDoubleKeywordsError(
 
272
    const char* func_name, PyObject* kw_name); /*proto*/
 
273
 
 
274
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
 
275
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
 
276
 
 
277
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/
 
278
 
 
279
static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
 
280
static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 
281
 
 
282
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
 
283
    const char *name, int exact); /*proto*/
 
284
 
 
285
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
 
286
 
 
287
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
 
288
 
 
289
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
 
290
 
 
291
static INLINE int __Pyx_StrEq(const char *, const char *); /*proto*/
 
292
 
 
293
static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
 
294
 
 
295
static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
 
296
 
 
297
static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
 
298
 
 
299
static INLINE char __Pyx_PyInt_AsChar(PyObject *);
 
300
 
 
301
static INLINE short __Pyx_PyInt_AsShort(PyObject *);
 
302
 
 
303
static INLINE int __Pyx_PyInt_AsInt(PyObject *);
 
304
 
 
305
static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
 
306
 
 
307
static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
 
308
 
 
309
static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
 
310
 
 
311
static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
 
312
 
 
313
static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
 
314
 
 
315
static INLINE long __Pyx_PyInt_AsLong(PyObject *);
 
316
 
 
317
static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
 
318
 
 
319
static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
 
320
 
 
321
static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
 
322
 
 
323
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size);  /*proto*/
 
324
 
 
325
static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
 
326
 
 
327
static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/
 
328
 
 
329
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/
 
330
 
 
331
static void __Pyx_AddTraceback(const char *funcname); /*proto*/
 
332
 
 
333
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
 
334
 
 
335
/* Type declarations */
 
336
 
 
337
/* "/home/tachyon/pydev/h5py/h5py/h5.pxd":21
 
338
 *     cpdef bint __enter__(self) except -1
 
339
 *     cpdef bint __exit__(self, a, b, c) except -1
 
340
 *     cpdef bint acquire(self, int blocking=*) except -1             # <<<<<<<<<<<<<<
 
341
 *     cpdef bint release(self) except -1
 
342
 * 
 
343
 */
 
344
 
 
345
struct __pyx_opt_args_4h5py_2h5_4PHIL_acquire {
 
346
  int __pyx_n;
 
347
  int blocking;
 
348
};
 
349
 
 
350
/* "/home/tachyon/pydev/h5py/h5py/utils.pxd":20
 
351
 * cdef void efree(void* ptr)
 
352
 * 
 
353
 * cpdef int check_numpy_read(ndarray arr, hid_t space_id=*) except -1             # <<<<<<<<<<<<<<
 
354
 * cpdef int check_numpy_write(ndarray arr, hid_t space_id=*) except -1
 
355
 * 
 
356
 */
 
357
 
 
358
struct __pyx_opt_args_4h5py_5utils_check_numpy_read {
 
359
  int __pyx_n;
 
360
  hid_t space_id;
 
361
};
 
362
 
 
363
/* "/home/tachyon/pydev/h5py/h5py/utils.pxd":21
 
364
 * 
 
365
 * cpdef int check_numpy_read(ndarray arr, hid_t space_id=*) except -1
 
366
 * cpdef int check_numpy_write(ndarray arr, hid_t space_id=*) except -1             # <<<<<<<<<<<<<<
 
367
 * 
 
368
 * cdef int convert_tuple(object tuple, hsize_t *dims, hsize_t rank) except -1
 
369
 */
 
370
 
 
371
struct __pyx_opt_args_4h5py_5utils_check_numpy_write {
 
372
  int __pyx_n;
 
373
  hid_t space_id;
 
374
};
 
375
 
 
376
/* "/home/tachyon/pydev/h5py/h5py/h5.pxd":39
 
377
 * cpdef H5PYConfig get_config()
 
378
 * 
 
379
 * cdef class ObjectID:             # <<<<<<<<<<<<<<
 
380
 * 
 
381
 *     cdef object __weakref__
 
382
 */
 
383
 
 
384
struct __pyx_obj_4h5py_2h5_ObjectID {
 
385
  PyObject_HEAD
 
386
  PyObject *__weakref__;
 
387
  hid_t id;
 
388
  int _locked;
 
389
  PyObject *_hash;
 
390
};
 
391
 
 
392
/* "/home/tachyon/pydev/h5py/h5py/h5s.pxd":17
 
393
 * from h5 cimport class ObjectID
 
394
 * 
 
395
 * cdef class SpaceID(ObjectID):             # <<<<<<<<<<<<<<
 
396
 *     pass
 
397
 * 
 
398
 */
 
399
 
 
400
struct __pyx_obj_4h5py_3h5s_SpaceID {
 
401
  struct __pyx_obj_4h5py_2h5_ObjectID __pyx_base;
 
402
};
 
403
 
 
404
/* "/home/tachyon/pydev/h5py/h5py/h5.pxd":26
 
405
 * cpdef PHIL get_phil()
 
406
 * 
 
407
 * cdef class H5PYConfig:             # <<<<<<<<<<<<<<
 
408
 * 
 
409
 *     cdef object _r_name
 
410
 */
 
411
 
 
412
struct __pyx_obj_4h5py_2h5_H5PYConfig {
 
413
  PyObject_HEAD
 
414
  PyObject *_r_name;
 
415
  PyObject *_i_name;
 
416
  PyObject *_f_name;
 
417
  PyObject *_t_name;
 
418
  PyObject *API_16;
 
419
  PyObject *API_18;
 
420
  PyObject *DEBUG;
 
421
  PyObject *THREADS;
 
422
};
 
423
 
 
424
/* "/home/tachyon/pydev/h5py/h5py/h5.pxd":15
 
425
 * include "defs.pxd"
 
426
 * 
 
427
 * cdef class PHIL:             # <<<<<<<<<<<<<<
 
428
 * 
 
429
 *     cdef object lock
 
430
 */
 
431
 
 
432
struct __pyx_obj_4h5py_2h5_PHIL {
 
433
  PyObject_HEAD
 
434
  struct __pyx_vtabstruct_4h5py_2h5_PHIL *__pyx_vtab;
 
435
  PyObject *lock;
 
436
};
 
437
 
 
438
/* "/home/tachyon/pydev/h5py/h5py/h5.pxd":46
 
439
 *     cdef object _hash
 
440
 * 
 
441
 * cdef class SmartStruct:             # <<<<<<<<<<<<<<
 
442
 *     cdef object __weakref__
 
443
 *     cdef object _title
 
444
 */
 
445
 
 
446
struct __pyx_obj_4h5py_2h5_SmartStruct {
 
447
  PyObject_HEAD
 
448
  PyObject *__weakref__;
 
449
  PyObject *_title;
 
450
};
 
451
 
 
452
 
 
453
/* "/home/tachyon/pydev/h5py/h5py/h5.pxd":15
 
454
 * include "defs.pxd"
 
455
 * 
 
456
 * cdef class PHIL:             # <<<<<<<<<<<<<<
 
457
 * 
 
458
 *     cdef object lock
 
459
 */
 
460
 
 
461
struct __pyx_vtabstruct_4h5py_2h5_PHIL {
 
462
  int (*__enter__)(struct __pyx_obj_4h5py_2h5_PHIL *, int __pyx_skip_dispatch);
 
463
  int (*__exit__)(struct __pyx_obj_4h5py_2h5_PHIL *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
 
464
  int (*acquire)(struct __pyx_obj_4h5py_2h5_PHIL *, int __pyx_skip_dispatch, struct __pyx_opt_args_4h5py_2h5_4PHIL_acquire *__pyx_optional_args);
 
465
  int (*release)(struct __pyx_obj_4h5py_2h5_PHIL *, int __pyx_skip_dispatch);
 
466
};
 
467
static struct __pyx_vtabstruct_4h5py_2h5_PHIL *__pyx_vtabptr_4h5py_2h5_PHIL;
 
468
/* Module declarations from h5py.h5 */
 
469
 
 
470
static PyTypeObject *__pyx_ptype_4h5py_2h5_PHIL = 0;
 
471
static PyTypeObject *__pyx_ptype_4h5py_2h5_H5PYConfig = 0;
 
472
static PyTypeObject *__pyx_ptype_4h5py_2h5_ObjectID = 0;
 
473
static PyTypeObject *__pyx_ptype_4h5py_2h5_SmartStruct = 0;
 
474
static struct __pyx_obj_4h5py_2h5_PHIL *(*__pyx_f_4h5py_2h5_get_phil)(int __pyx_skip_dispatch); /*proto*/
 
475
static struct __pyx_obj_4h5py_2h5_H5PYConfig *(*__pyx_f_4h5py_2h5_get_config)(int __pyx_skip_dispatch); /*proto*/
 
476
static int (*__pyx_f_4h5py_2h5_init_hdf5)(void); /*proto*/
 
477
static hid_t (*__pyx_f_4h5py_2h5_get_object_type)(void); /*proto*/
 
478
static herr_t (*__pyx_f_4h5py_2h5_attr_rw)(hid_t, hid_t, void *, h5py_rw_t); /*proto*/
 
479
static herr_t (*__pyx_f_4h5py_2h5_dset_rw)(hid_t, hid_t, hid_t, hid_t, hid_t, void *, h5py_rw_t); /*proto*/
 
480
/* Module declarations from numpy */
 
481
 
 
482
/* Module declarations from h5py.numpy */
 
483
 
 
484
static PyTypeObject *__pyx_ptype_4h5py_5numpy_dtype = 0;
 
485
static PyTypeObject *__pyx_ptype_4h5py_5numpy_ndarray = 0;
 
486
/* Module declarations from h5py.utils */
 
487
 
 
488
static void *(*__pyx_f_4h5py_5utils_emalloc)(size_t); /*proto*/
 
489
static void (*__pyx_f_4h5py_5utils_efree)(void *); /*proto*/
 
490
static int (*__pyx_f_4h5py_5utils_check_numpy_read)(PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_4h5py_5utils_check_numpy_read *__pyx_optional_args); /*proto*/
 
491
static int (*__pyx_f_4h5py_5utils_check_numpy_write)(PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_4h5py_5utils_check_numpy_write *__pyx_optional_args); /*proto*/
 
492
static int (*__pyx_f_4h5py_5utils_convert_tuple)(PyObject *, hsize_t *, hsize_t); /*proto*/
 
493
static PyObject *(*__pyx_f_4h5py_5utils_convert_dims)(hsize_t *, hsize_t); /*proto*/
 
494
static int (*__pyx_f_4h5py_5utils_require_tuple)(PyObject *, int, int, char *); /*proto*/
 
495
static PyObject *(*__pyx_f_4h5py_5utils_create_numpy_hsize)(int, hsize_t *); /*proto*/
 
496
static PyObject *(*__pyx_f_4h5py_5utils_create_hsize_array)(PyObject *); /*proto*/
 
497
/* Module declarations from python_string */
 
498
 
 
499
/* Module declarations from h5py.h5s */
 
500
 
 
501
static PyTypeObject *__pyx_ptype_4h5py_3h5s_SpaceID = 0;
 
502
static int __pyx_k_112;
 
503
static int __pyx_k_113;
 
504
static PyObject *__pyx_f_4h5py_3h5s_lockid(hid_t); /*proto*/
 
505
#define __Pyx_MODULE_NAME "h5py.h5s"
 
506
int __pyx_module_is_main_h5py__h5s = 0;
 
507
 
 
508
/* Implementation of h5py.h5s */
 
509
static char __pyx_k_102[] = " Numpy-style shape tuple representing dimensions.  () == scalar.\n        ";
 
510
static char __pyx_k_111[] = "\n    Low-level interface to the \"H5S\" family of data-space functions.\n";
 
511
static char __pyx_k___main__[] = "__main__";
 
512
static PyObject *__pyx_kp___main__;
 
513
static char __pyx_k__close[] = "_close";
 
514
static PyObject *__pyx_kp__close;
 
515
static char __pyx_k_copy[] = "copy";
 
516
static PyObject *__pyx_kp_copy;
 
517
static char __pyx_k_is_simple[] = "is_simple";
 
518
static PyObject *__pyx_kp_is_simple;
 
519
static char __pyx_k_offset_simple[] = "offset_simple";
 
520
static PyObject *__pyx_kp_offset_simple;
 
521
static char __pyx_k_103[] = "get_simple_extent_ndims";
 
522
static PyObject *__pyx_kp_103;
 
523
static char __pyx_k_104[] = "get_simple_extent_dims";
 
524
static PyObject *__pyx_kp_104;
 
525
static char __pyx_k_105[] = "get_simple_extent_npoints";
 
526
static PyObject *__pyx_kp_105;
 
527
static char __pyx_k_106[] = "get_simple_extent_type";
 
528
static PyObject *__pyx_kp_106;
 
529
static char __pyx_k_extent_copy[] = "extent_copy";
 
530
static PyObject *__pyx_kp_extent_copy;
 
531
static char __pyx_k_set_extent_simple[] = "set_extent_simple";
 
532
static PyObject *__pyx_kp_set_extent_simple;
 
533
static char __pyx_k_set_extent_none[] = "set_extent_none";
 
534
static PyObject *__pyx_kp_set_extent_none;
 
535
static char __pyx_k_get_select_type[] = "get_select_type";
 
536
static PyObject *__pyx_kp_get_select_type;
 
537
static char __pyx_k_get_select_npoints[] = "get_select_npoints";
 
538
static PyObject *__pyx_kp_get_select_npoints;
 
539
static char __pyx_k_get_select_bounds[] = "get_select_bounds";
 
540
static PyObject *__pyx_kp_get_select_bounds;
 
541
static char __pyx_k_select_all[] = "select_all";
 
542
static PyObject *__pyx_kp_select_all;
 
543
static char __pyx_k_select_none[] = "select_none";
 
544
static PyObject *__pyx_kp_select_none;
 
545
static char __pyx_k_select_valid[] = "select_valid";
 
546
static PyObject *__pyx_kp_select_valid;
 
547
static char __pyx_k_107[] = "get_select_elem_npoints";
 
548
static PyObject *__pyx_kp_107;
 
549
static char __pyx_k_108[] = "get_select_elem_pointlist";
 
550
static PyObject *__pyx_kp_108;
 
551
static char __pyx_k_select_elements[] = "select_elements";
 
552
static PyObject *__pyx_kp_select_elements;
 
553
static char __pyx_k_109[] = "get_select_hyper_nblocks";
 
554
static PyObject *__pyx_kp_109;
 
555
static char __pyx_k_110[] = "get_select_hyper_blocklist";
 
556
static PyObject *__pyx_kp_110;
 
557
static char __pyx_k_select_hyperslab[] = "select_hyperslab";
 
558
static PyObject *__pyx_kp_select_hyperslab;
 
559
static char __pyx_k_class_code[] = "class_code";
 
560
static PyObject *__pyx_kp_class_code;
 
561
static char __pyx_k_dims_tpl[] = "dims_tpl";
 
562
static PyObject *__pyx_kp_dims_tpl;
 
563
static char __pyx_k_max_dims_tpl[] = "max_dims_tpl";
 
564
static PyObject *__pyx_kp_max_dims_tpl;
 
565
static char __pyx_k_offset[] = "offset";
 
566
static PyObject *__pyx_kp_offset;
 
567
static char __pyx_k_maxdims[] = "maxdims";
 
568
static PyObject *__pyx_kp_maxdims;
 
569
static char __pyx_k_source[] = "source";
 
570
static PyObject *__pyx_kp_source;
 
571
static char __pyx_k_coords[] = "coords";
 
572
static PyObject *__pyx_kp_coords;
 
573
static char __pyx_k_op[] = "op";
 
574
static PyObject *__pyx_kp_op;
 
575
static char __pyx_k_start[] = "start";
 
576
static PyObject *__pyx_kp_start;
 
577
static char __pyx_k_count[] = "count";
 
578
static PyObject *__pyx_kp_count;
 
579
static char __pyx_k_stride[] = "stride";
 
580
static PyObject *__pyx_kp_stride;
 
581
static char __pyx_k_block[] = "block";
 
582
static PyObject *__pyx_kp_block;
 
583
static char __pyx_k___doc__[] = "__doc__";
 
584
static PyObject *__pyx_kp___doc__;
 
585
static char __pyx_k__sync[] = "_sync";
 
586
static PyObject *__pyx_kp__sync;
 
587
static char __pyx_k_sync[] = "sync";
 
588
static PyObject *__pyx_kp_sync;
 
589
static char __pyx_k_nosync[] = "nosync";
 
590
static PyObject *__pyx_kp_nosync;
 
591
static char __pyx_k_SELECT_NOOP[] = "SELECT_NOOP";
 
592
static PyObject *__pyx_kp_SELECT_NOOP;
 
593
static char __pyx_k_SELECT_SET[] = "SELECT_SET";
 
594
static PyObject *__pyx_kp_SELECT_SET;
 
595
static char __pyx_k_SELECT_OR[] = "SELECT_OR";
 
596
static PyObject *__pyx_kp_SELECT_OR;
 
597
static char __pyx_k_SELECT_AND[] = "SELECT_AND";
 
598
static PyObject *__pyx_kp_SELECT_AND;
 
599
static char __pyx_k_SELECT_XOR[] = "SELECT_XOR";
 
600
static PyObject *__pyx_kp_SELECT_XOR;
 
601
static char __pyx_k_SELECT_NOTB[] = "SELECT_NOTB";
 
602
static PyObject *__pyx_kp_SELECT_NOTB;
 
603
static char __pyx_k_SELECT_NOTA[] = "SELECT_NOTA";
 
604
static PyObject *__pyx_kp_SELECT_NOTA;
 
605
static char __pyx_k_SELECT_APPEND[] = "SELECT_APPEND";
 
606
static PyObject *__pyx_kp_SELECT_APPEND;
 
607
static char __pyx_k_SELECT_PREPEND[] = "SELECT_PREPEND";
 
608
static PyObject *__pyx_kp_SELECT_PREPEND;
 
609
static char __pyx_k_SELECT_INVALID[] = "SELECT_INVALID";
 
610
static PyObject *__pyx_kp_SELECT_INVALID;
 
611
static char __pyx_k_ALL[] = "ALL";
 
612
static PyObject *__pyx_kp_ALL;
 
613
static char __pyx_k_UNLIMITED[] = "UNLIMITED";
 
614
static PyObject *__pyx_kp_UNLIMITED;
 
615
static char __pyx_k_NO_CLASS[] = "NO_CLASS";
 
616
static PyObject *__pyx_kp_NO_CLASS;
 
617
static char __pyx_k_SCALAR[] = "SCALAR";
 
618
static PyObject *__pyx_kp_SCALAR;
 
619
static char __pyx_k_SIMPLE[] = "SIMPLE";
 
620
static PyObject *__pyx_kp_SIMPLE;
 
621
static char __pyx_k_SEL_ERROR[] = "SEL_ERROR";
 
622
static PyObject *__pyx_kp_SEL_ERROR;
 
623
static char __pyx_k_SEL_NONE[] = "SEL_NONE";
 
624
static PyObject *__pyx_kp_SEL_NONE;
 
625
static char __pyx_k_SEL_POINTS[] = "SEL_POINTS";
 
626
static PyObject *__pyx_kp_SEL_POINTS;
 
627
static char __pyx_k_SEL_HYPERSLABS[] = "SEL_HYPERSLABS";
 
628
static PyObject *__pyx_kp_SEL_HYPERSLABS;
 
629
static char __pyx_k_SEL_ALL[] = "SEL_ALL";
 
630
static PyObject *__pyx_kp_SEL_ALL;
 
631
static char __pyx_k_create[] = "create";
 
632
static PyObject *__pyx_kp_create;
 
633
static char __pyx_k_create_simple[] = "create_simple";
 
634
static PyObject *__pyx_kp_create_simple;
 
635
static char __pyx_k_ValueError[] = "ValueError";
 
636
static PyObject *__pyx_kp_ValueError;
 
637
static PyObject *__pyx_kp_111;
 
638
static PyObject *__pyx_builtin_ValueError;
 
639
static char __pyx_k_114[] = "dims_tpl";
 
640
static char __pyx_k_115[] = "max_dims_tpl";
 
641
static PyObject *__pyx_kp_116;
 
642
static char __pyx_k_116[] = "%d is not a simple dataspace";
 
643
static char __pyx_k_117[] = "offset";
 
644
static char __pyx_k_118[] = "dims_tpl";
 
645
static char __pyx_k_119[] = "max_dims_tpl";
 
646
static PyObject *__pyx_kp_120;
 
647
static char __pyx_k_120[] = "Coordinate array must have shape (<npoints>, %d)";
 
648
static char __pyx_k_121[] = "start";
 
649
static char __pyx_k_122[] = "count";
 
650
static char __pyx_k_123[] = "stride";
 
651
static char __pyx_k_124[] = "block";
 
652
 
 
653
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":32
 
654
 * from _sync import sync, nosync
 
655
 * 
 
656
 * cdef object lockid(hid_t id_):             # <<<<<<<<<<<<<<
 
657
 *     cdef SpaceID space
 
658
 *     space = SpaceID(id_)
 
659
 */
 
660
 
 
661
static  PyObject *__pyx_f_4h5py_3h5s_lockid(hid_t __pyx_v_id_) {
 
662
  struct __pyx_obj_4h5py_3h5s_SpaceID *__pyx_v_space;
 
663
  PyObject *__pyx_r = NULL;
 
664
  PyObject *__pyx_t_1 = NULL;
 
665
  PyObject *__pyx_t_2 = NULL;
 
666
  __Pyx_SetupRefcountContext("lockid");
 
667
  __pyx_v_space = ((struct __pyx_obj_4h5py_3h5s_SpaceID *)Py_None); __Pyx_INCREF(Py_None);
 
668
 
 
669
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":34
 
670
 * cdef object lockid(hid_t id_):
 
671
 *     cdef SpaceID space
 
672
 *     space = SpaceID(id_)             # <<<<<<<<<<<<<<
 
673
 *     space._locked = 1
 
674
 *     return space
 
675
 */
 
676
  __pyx_t_1 = PyInt_FromLong(__pyx_v_id_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
677
  __Pyx_GOTREF(__pyx_t_1);
 
678
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
679
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
680
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
 
681
  __Pyx_GIVEREF(__pyx_t_1);
 
682
  __pyx_t_1 = 0;
 
683
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4h5py_3h5s_SpaceID)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
684
  __Pyx_GOTREF(__pyx_t_1);
 
685
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
686
  if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4h5py_3h5s_SpaceID))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
687
  __Pyx_DECREF(((PyObject *)__pyx_v_space));
 
688
  __pyx_v_space = ((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_t_1);
 
689
  __pyx_t_1 = 0;
 
690
 
 
691
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":35
 
692
 *     cdef SpaceID space
 
693
 *     space = SpaceID(id_)
 
694
 *     space._locked = 1             # <<<<<<<<<<<<<<
 
695
 *     return space
 
696
 * 
 
697
 */
 
698
  __pyx_v_space->__pyx_base._locked = 1;
 
699
 
 
700
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":36
 
701
 *     space = SpaceID(id_)
 
702
 *     space._locked = 1
 
703
 *     return space             # <<<<<<<<<<<<<<
 
704
 * 
 
705
 * # === Public constants and data structures ====================================
 
706
 */
 
707
  __Pyx_XDECREF(__pyx_r);
 
708
  __Pyx_INCREF(((PyObject *)__pyx_v_space));
 
709
  __pyx_r = ((PyObject *)__pyx_v_space);
 
710
  goto __pyx_L0;
 
711
 
 
712
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
713
  goto __pyx_L0;
 
714
  __pyx_L1_error:;
 
715
  __Pyx_XDECREF(__pyx_t_1);
 
716
  __Pyx_XDECREF(__pyx_t_2);
 
717
  __Pyx_AddTraceback("h5py.h5s.lockid");
 
718
  __pyx_r = 0;
 
719
  __pyx_L0:;
 
720
  __Pyx_DECREF((PyObject *)__pyx_v_space);
 
721
  __Pyx_XGIVEREF(__pyx_r);
 
722
  __Pyx_FinishRefcountContext();
 
723
  return __pyx_r;
 
724
}
 
725
 
 
726
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":71
 
727
 * 
 
728
 * @sync
 
729
 * def create(int class_code):             # <<<<<<<<<<<<<<
 
730
 *     """(INT class_code) => SpaceID
 
731
 * 
 
732
 */
 
733
 
 
734
static PyObject *__pyx_pf_4h5py_3h5s_create(PyObject *__pyx_self, PyObject *__pyx_arg_class_code); /*proto*/
 
735
static char __pyx_doc_4h5py_3h5s_create[] = "(INT class_code) => SpaceID\n\n    Create a new HDF5 dataspace object, of the given class.\n    Legal values are SCALAR and SIMPLE.\n    ";
 
736
static PyObject *__pyx_pf_4h5py_3h5s_create(PyObject *__pyx_self, PyObject *__pyx_arg_class_code) {
 
737
  int __pyx_v_class_code;
 
738
  PyObject *__pyx_r = NULL;
 
739
  hid_t __pyx_t_1;
 
740
  PyObject *__pyx_t_2 = NULL;
 
741
  PyObject *__pyx_t_3 = NULL;
 
742
  __Pyx_SetupRefcountContext("create");
 
743
  __pyx_self = __pyx_self;
 
744
  assert(__pyx_arg_class_code); {
 
745
    __pyx_v_class_code = __Pyx_PyInt_AsInt(__pyx_arg_class_code); if (unlikely((__pyx_v_class_code == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
746
  }
 
747
  goto __pyx_L4_argument_unpacking_done;
 
748
  __pyx_L3_error:;
 
749
  __Pyx_AddTraceback("h5py.h5s.create");
 
750
  return NULL;
 
751
  __pyx_L4_argument_unpacking_done:;
 
752
 
 
753
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":77
 
754
 *     Legal values are SCALAR and SIMPLE.
 
755
 *     """
 
756
 *     return SpaceID(H5Screate(<H5S_class_t>class_code))             # <<<<<<<<<<<<<<
 
757
 * 
 
758
 * @sync
 
759
 */
 
760
  __Pyx_XDECREF(__pyx_r);
 
761
  __pyx_t_1 = H5Screate(((H5S_class_t)__pyx_v_class_code)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
762
  __pyx_t_2 = PyInt_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
763
  __Pyx_GOTREF(__pyx_t_2);
 
764
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
765
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
766
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
 
767
  __Pyx_GIVEREF(__pyx_t_2);
 
768
  __pyx_t_2 = 0;
 
769
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4h5py_3h5s_SpaceID)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
770
  __Pyx_GOTREF(__pyx_t_2);
 
771
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
772
  __pyx_r = __pyx_t_2;
 
773
  __pyx_t_2 = 0;
 
774
  goto __pyx_L0;
 
775
 
 
776
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
777
  goto __pyx_L0;
 
778
  __pyx_L1_error:;
 
779
  __Pyx_XDECREF(__pyx_t_2);
 
780
  __Pyx_XDECREF(__pyx_t_3);
 
781
  __Pyx_AddTraceback("h5py.h5s.create");
 
782
  __pyx_r = NULL;
 
783
  __pyx_L0:;
 
784
  __Pyx_XGIVEREF(__pyx_r);
 
785
  __Pyx_FinishRefcountContext();
 
786
  return __pyx_r;
 
787
}
 
788
 
 
789
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":80
 
790
 * 
 
791
 * @sync
 
792
 * def create_simple(object dims_tpl, object max_dims_tpl=None):             # <<<<<<<<<<<<<<
 
793
 *     """(TUPLE dims_tpl, TUPLE max_dims_tpl) => SpaceID
 
794
 * 
 
795
 */
 
796
 
 
797
static PyObject *__pyx_pf_4h5py_3h5s_create_simple(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
798
static char __pyx_doc_4h5py_3h5s_create_simple[] = "(TUPLE dims_tpl, TUPLE max_dims_tpl) => SpaceID\n\n    Create a simple (slab) dataspace from a tuple of dimensions.  \n    Every element of dims_tpl must be a positive integer.  \n\n    You can optionally specify the maximum dataspace size. The \n    special value UNLIMITED, as an element of max_dims, indicates \n    an unlimited dimension.\n    ";
 
799
static PyObject *__pyx_pf_4h5py_3h5s_create_simple(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
800
  PyObject *__pyx_v_dims_tpl = 0;
 
801
  PyObject *__pyx_v_max_dims_tpl = 0;
 
802
  int __pyx_v_rank;
 
803
  hsize_t *__pyx_v_dims;
 
804
  hsize_t *__pyx_v_max_dims;
 
805
  PyObject *__pyx_r = NULL;
 
806
  int __pyx_t_1;
 
807
  Py_ssize_t __pyx_t_2;
 
808
  void *__pyx_t_3;
 
809
  int __pyx_t_4;
 
810
  hid_t __pyx_t_5;
 
811
  PyObject *__pyx_t_6 = NULL;
 
812
  PyObject *__pyx_t_7 = NULL;
 
813
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_dims_tpl,&__pyx_kp_max_dims_tpl,0};
 
814
  __Pyx_SetupRefcountContext("create_simple");
 
815
  __pyx_self = __pyx_self;
 
816
  if (unlikely(__pyx_kwds)) {
 
817
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
818
    PyObject* values[2] = {0,0};
 
819
    values[1] = Py_None;
 
820
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
821
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
822
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
823
      case  0: break;
 
824
      default: goto __pyx_L5_argtuple_error;
 
825
    }
 
826
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
827
      case  0:
 
828
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_dims_tpl);
 
829
      if (likely(values[0])) kw_args--;
 
830
      else goto __pyx_L5_argtuple_error;
 
831
      case  1:
 
832
      if (kw_args > 0) {
 
833
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_max_dims_tpl);
 
834
        if (unlikely(value)) { values[1] = value; kw_args--; }
 
835
      }
 
836
    }
 
837
    if (unlikely(kw_args > 0)) {
 
838
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "create_simple") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
839
    }
 
840
    __pyx_v_dims_tpl = values[0];
 
841
    __pyx_v_max_dims_tpl = values[1];
 
842
  } else {
 
843
    __pyx_v_max_dims_tpl = Py_None;
 
844
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
845
      case  2: __pyx_v_max_dims_tpl = PyTuple_GET_ITEM(__pyx_args, 1);
 
846
      case  1: __pyx_v_dims_tpl = PyTuple_GET_ITEM(__pyx_args, 0);
 
847
      break;
 
848
      default: goto __pyx_L5_argtuple_error;
 
849
    }
 
850
  }
 
851
  goto __pyx_L4_argument_unpacking_done;
 
852
  __pyx_L5_argtuple_error:;
 
853
  __Pyx_RaiseArgtupleInvalid("create_simple", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
854
  __pyx_L3_error:;
 
855
  __Pyx_AddTraceback("h5py.h5s.create_simple");
 
856
  return NULL;
 
857
  __pyx_L4_argument_unpacking_done:;
 
858
 
 
859
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":91
 
860
 *     """
 
861
 *     cdef int rank
 
862
 *     cdef hsize_t* dims = NULL             # <<<<<<<<<<<<<<
 
863
 *     cdef hsize_t* max_dims = NULL
 
864
 * 
 
865
 */
 
866
  __pyx_v_dims = NULL;
 
867
 
 
868
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":92
 
869
 *     cdef int rank
 
870
 *     cdef hsize_t* dims = NULL
 
871
 *     cdef hsize_t* max_dims = NULL             # <<<<<<<<<<<<<<
 
872
 * 
 
873
 *     require_tuple(dims_tpl, 0, -1, "dims_tpl")
 
874
 */
 
875
  __pyx_v_max_dims = NULL;
 
876
 
 
877
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":94
 
878
 *     cdef hsize_t* max_dims = NULL
 
879
 * 
 
880
 *     require_tuple(dims_tpl, 0, -1, "dims_tpl")             # <<<<<<<<<<<<<<
 
881
 *     rank = len(dims_tpl)
 
882
 *     require_tuple(max_dims_tpl, 1, rank, "max_dims_tpl")
 
883
 */
 
884
  __pyx_t_1 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_dims_tpl, 0, -1, __pyx_k_114); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
885
 
 
886
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":95
 
887
 * 
 
888
 *     require_tuple(dims_tpl, 0, -1, "dims_tpl")
 
889
 *     rank = len(dims_tpl)             # <<<<<<<<<<<<<<
 
890
 *     require_tuple(max_dims_tpl, 1, rank, "max_dims_tpl")
 
891
 * 
 
892
 */
 
893
  __pyx_t_2 = PyObject_Length(__pyx_v_dims_tpl); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
894
  __pyx_v_rank = __pyx_t_2;
 
895
 
 
896
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":96
 
897
 *     require_tuple(dims_tpl, 0, -1, "dims_tpl")
 
898
 *     rank = len(dims_tpl)
 
899
 *     require_tuple(max_dims_tpl, 1, rank, "max_dims_tpl")             # <<<<<<<<<<<<<<
 
900
 * 
 
901
 *     try:
 
902
 */
 
903
  __pyx_t_1 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_max_dims_tpl, 1, __pyx_v_rank, __pyx_k_115); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
904
 
 
905
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":98
 
906
 *     require_tuple(max_dims_tpl, 1, rank, "max_dims_tpl")
 
907
 * 
 
908
 *     try:             # <<<<<<<<<<<<<<
 
909
 *         dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
910
 *         convert_tuple(dims_tpl, dims, rank)
 
911
 */
 
912
  /*try:*/ {
 
913
 
 
914
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":99
 
915
 * 
 
916
 *     try:
 
917
 *         dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
 
918
 *         convert_tuple(dims_tpl, dims, rank)
 
919
 * 
 
920
 */
 
921
    __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 = 99; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
922
    __pyx_v_dims = ((hsize_t *)__pyx_t_3);
 
923
 
 
924
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":100
 
925
 *     try:
 
926
 *         dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
927
 *         convert_tuple(dims_tpl, dims, rank)             # <<<<<<<<<<<<<<
 
928
 * 
 
929
 *         if max_dims_tpl is not None:
 
930
 */
 
931
    __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 = 100; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
932
 
 
933
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":102
 
934
 *         convert_tuple(dims_tpl, dims, rank)
 
935
 * 
 
936
 *         if max_dims_tpl is not None:             # <<<<<<<<<<<<<<
 
937
 *             max_dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
938
 *             convert_tuple(max_dims_tpl, max_dims, rank)
 
939
 */
 
940
    __pyx_t_4 = (__pyx_v_max_dims_tpl != Py_None);
 
941
    if (__pyx_t_4) {
 
942
 
 
943
      /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":103
 
944
 * 
 
945
 *         if max_dims_tpl is not None:
 
946
 *             max_dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
 
947
 *             convert_tuple(max_dims_tpl, max_dims, rank)
 
948
 * 
 
949
 */
 
950
      __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 = 103; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
951
      __pyx_v_max_dims = ((hsize_t *)__pyx_t_3);
 
952
 
 
953
      /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":104
 
954
 *         if max_dims_tpl is not None:
 
955
 *             max_dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
956
 *             convert_tuple(max_dims_tpl, max_dims, rank)             # <<<<<<<<<<<<<<
 
957
 * 
 
958
 *         return SpaceID(H5Screate_simple(rank, dims, max_dims))
 
959
 */
 
960
      __pyx_t_1 = __pyx_f_4h5py_5utils_convert_tuple(__pyx_v_max_dims_tpl, __pyx_v_max_dims, __pyx_v_rank); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
961
      goto __pyx_L9;
 
962
    }
 
963
    __pyx_L9:;
 
964
 
 
965
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":106
 
966
 *             convert_tuple(max_dims_tpl, max_dims, rank)
 
967
 * 
 
968
 *         return SpaceID(H5Screate_simple(rank, dims, max_dims))             # <<<<<<<<<<<<<<
 
969
 * 
 
970
 *     finally:
 
971
 */
 
972
    __Pyx_XDECREF(__pyx_r);
 
973
    __pyx_t_5 = H5Screate_simple(__pyx_v_rank, __pyx_v_dims, __pyx_v_max_dims); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
974
    __pyx_t_6 = PyInt_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
975
    __Pyx_GOTREF(__pyx_t_6);
 
976
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
977
    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
978
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
 
979
    __Pyx_GIVEREF(__pyx_t_6);
 
980
    __pyx_t_6 = 0;
 
981
    __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4h5py_3h5s_SpaceID)), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
982
    __Pyx_GOTREF(__pyx_t_6);
 
983
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
984
    __pyx_r = __pyx_t_6;
 
985
    __pyx_t_6 = 0;
 
986
    goto __pyx_L6;
 
987
  }
 
988
  /*finally:*/ {
 
989
    int __pyx_why;
 
990
    PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
 
991
    int __pyx_exc_lineno;
 
992
    __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
 
993
    __pyx_why = 0; goto __pyx_L8;
 
994
    __pyx_L6: __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
 
995
    __pyx_why = 3; goto __pyx_L8;
 
996
    __pyx_L7: {
 
997
      __pyx_why = 4;
 
998
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
 
999
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 
1000
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
 
1001
      __pyx_exc_lineno = __pyx_lineno;
 
1002
      goto __pyx_L8;
 
1003
    }
 
1004
    __pyx_L8:;
 
1005
 
 
1006
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":109
 
1007
 * 
 
1008
 *     finally:
 
1009
 *         efree(dims)             # <<<<<<<<<<<<<<
 
1010
 *         efree(max_dims)
 
1011
 * 
 
1012
 */
 
1013
    __pyx_f_4h5py_5utils_efree(__pyx_v_dims);
 
1014
 
 
1015
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":110
 
1016
 *     finally:
 
1017
 *         efree(dims)
 
1018
 *         efree(max_dims)             # <<<<<<<<<<<<<<
 
1019
 * 
 
1020
 * IF H5PY_18API:
 
1021
 */
 
1022
    __pyx_f_4h5py_5utils_efree(__pyx_v_max_dims);
 
1023
    switch (__pyx_why) {
 
1024
      case 3: goto __pyx_L0;
 
1025
      case 4: {
 
1026
        __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
 
1027
        __pyx_lineno = __pyx_exc_lineno;
 
1028
        __pyx_exc_type = 0;
 
1029
        __pyx_exc_value = 0;
 
1030
        __pyx_exc_tb = 0;
 
1031
        goto __pyx_L1_error;
 
1032
      }
 
1033
    }
 
1034
  }
 
1035
 
 
1036
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1037
  goto __pyx_L0;
 
1038
  __pyx_L1_error:;
 
1039
  __Pyx_XDECREF(__pyx_t_6);
 
1040
  __Pyx_XDECREF(__pyx_t_7);
 
1041
  __Pyx_AddTraceback("h5py.h5s.create_simple");
 
1042
  __pyx_r = NULL;
 
1043
  __pyx_L0:;
 
1044
  __Pyx_XGIVEREF(__pyx_r);
 
1045
  __Pyx_FinishRefcountContext();
 
1046
  return __pyx_r;
 
1047
}
 
1048
 
 
1049
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":144
 
1050
 *         """ Numpy-style shape tuple representing dimensions.  () == scalar.
 
1051
 *         """
 
1052
 *         def __get__(self):             # <<<<<<<<<<<<<<
 
1053
 *             return self.get_simple_extent_dims()
 
1054
 * 
 
1055
 */
 
1056
 
 
1057
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_5shape___get__(PyObject *__pyx_v_self); /*proto*/
 
1058
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_5shape___get__(PyObject *__pyx_v_self) {
 
1059
  PyObject *__pyx_r = NULL;
 
1060
  PyObject *__pyx_t_1 = NULL;
 
1061
  PyObject *__pyx_t_2 = NULL;
 
1062
  __Pyx_SetupRefcountContext("__get__");
 
1063
 
 
1064
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":145
 
1065
 *         """
 
1066
 *         def __get__(self):
 
1067
 *             return self.get_simple_extent_dims()             # <<<<<<<<<<<<<<
 
1068
 * 
 
1069
 *     @sync
 
1070
 */
 
1071
  __Pyx_XDECREF(__pyx_r);
 
1072
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_104); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1073
  __Pyx_GOTREF(__pyx_t_1);
 
1074
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1075
  __Pyx_GOTREF(__pyx_t_2);
 
1076
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
1077
  __pyx_r = __pyx_t_2;
 
1078
  __pyx_t_2 = 0;
 
1079
  goto __pyx_L0;
 
1080
 
 
1081
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1082
  goto __pyx_L0;
 
1083
  __pyx_L1_error:;
 
1084
  __Pyx_XDECREF(__pyx_t_1);
 
1085
  __Pyx_XDECREF(__pyx_t_2);
 
1086
  __Pyx_AddTraceback("h5py.h5s.SpaceID.shape.__get__");
 
1087
  __pyx_r = NULL;
 
1088
  __pyx_L0:;
 
1089
  __Pyx_XGIVEREF(__pyx_r);
 
1090
  __Pyx_FinishRefcountContext();
 
1091
  return __pyx_r;
 
1092
}
 
1093
 
 
1094
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":148
 
1095
 * 
 
1096
 *     @sync
 
1097
 *     def _close(self):             # <<<<<<<<<<<<<<
 
1098
 *         """()
 
1099
 * 
 
1100
 */
 
1101
 
 
1102
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID__close(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
1103
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        ";
 
1104
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID__close(PyObject *__pyx_v_self, PyObject *unused) {
 
1105
  PyObject *__pyx_r = NULL;
 
1106
  herr_t __pyx_t_1;
 
1107
  __Pyx_SetupRefcountContext("_close");
 
1108
 
 
1109
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":155
 
1110
 *         when their Python wrappers are freed.
 
1111
 *         """
 
1112
 *         H5Sclose(self.id)             # <<<<<<<<<<<<<<
 
1113
 * 
 
1114
 *     @sync
 
1115
 */
 
1116
  __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 = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1117
 
 
1118
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1119
  goto __pyx_L0;
 
1120
  __pyx_L1_error:;
 
1121
  __Pyx_AddTraceback("h5py.h5s.SpaceID._close");
 
1122
  __pyx_r = NULL;
 
1123
  __pyx_L0:;
 
1124
  __Pyx_XGIVEREF(__pyx_r);
 
1125
  __Pyx_FinishRefcountContext();
 
1126
  return __pyx_r;
 
1127
}
 
1128
 
 
1129
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":158
 
1130
 * 
 
1131
 *     @sync
 
1132
 *     def copy(self):             # <<<<<<<<<<<<<<
 
1133
 *         """() => SpaceID
 
1134
 * 
 
1135
 */
 
1136
 
 
1137
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_copy(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
1138
static char __pyx_doc_4h5py_3h5s_7SpaceID_copy[] = "() => SpaceID\n\n        Create a new copy of this dataspace.\n        ";
 
1139
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_copy(PyObject *__pyx_v_self, PyObject *unused) {
 
1140
  PyObject *__pyx_r = NULL;
 
1141
  hid_t __pyx_t_1;
 
1142
  PyObject *__pyx_t_2 = NULL;
 
1143
  PyObject *__pyx_t_3 = NULL;
 
1144
  __Pyx_SetupRefcountContext("copy");
 
1145
 
 
1146
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":163
 
1147
 *         Create a new copy of this dataspace.
 
1148
 *         """
 
1149
 *         return SpaceID(H5Scopy(self.id))             # <<<<<<<<<<<<<<
 
1150
 * 
 
1151
 *     IF H5PY_18API:
 
1152
 */
 
1153
  __Pyx_XDECREF(__pyx_r);
 
1154
  __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 = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1155
  __pyx_t_2 = PyInt_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1156
  __Pyx_GOTREF(__pyx_t_2);
 
1157
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1158
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
1159
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
 
1160
  __Pyx_GIVEREF(__pyx_t_2);
 
1161
  __pyx_t_2 = 0;
 
1162
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4h5py_3h5s_SpaceID)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1163
  __Pyx_GOTREF(__pyx_t_2);
 
1164
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
1165
  __pyx_r = __pyx_t_2;
 
1166
  __pyx_t_2 = 0;
 
1167
  goto __pyx_L0;
 
1168
 
 
1169
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1170
  goto __pyx_L0;
 
1171
  __pyx_L1_error:;
 
1172
  __Pyx_XDECREF(__pyx_t_2);
 
1173
  __Pyx_XDECREF(__pyx_t_3);
 
1174
  __Pyx_AddTraceback("h5py.h5s.SpaceID.copy");
 
1175
  __pyx_r = NULL;
 
1176
  __pyx_L0:;
 
1177
  __Pyx_XGIVEREF(__pyx_r);
 
1178
  __Pyx_FinishRefcountContext();
 
1179
  return __pyx_r;
 
1180
}
 
1181
 
 
1182
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":201
 
1183
 * 
 
1184
 *     @sync
 
1185
 *     def is_simple(self):             # <<<<<<<<<<<<<<
 
1186
 *         """() => BOOL is_simple
 
1187
 * 
 
1188
 */
 
1189
 
 
1190
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_is_simple(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
1191
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        ";
 
1192
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_is_simple(PyObject *__pyx_v_self, PyObject *unused) {
 
1193
  PyObject *__pyx_r = NULL;
 
1194
  htri_t __pyx_t_1;
 
1195
  PyObject *__pyx_t_2 = NULL;
 
1196
  __Pyx_SetupRefcountContext("is_simple");
 
1197
 
 
1198
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":207
 
1199
 *         dataspaces). Currently all HDF5 dataspaces are simple.
 
1200
 *         """
 
1201
 *         return <bint>(H5Sis_simple(self.id))             # <<<<<<<<<<<<<<
 
1202
 * 
 
1203
 *     @sync
 
1204
 */
 
1205
  __Pyx_XDECREF(__pyx_r);
 
1206
  __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 = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1207
  __pyx_t_2 = __Pyx_PyBool_FromLong(((int)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1208
  __Pyx_GOTREF(__pyx_t_2);
 
1209
  __pyx_r = __pyx_t_2;
 
1210
  __pyx_t_2 = 0;
 
1211
  goto __pyx_L0;
 
1212
 
 
1213
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1214
  goto __pyx_L0;
 
1215
  __pyx_L1_error:;
 
1216
  __Pyx_XDECREF(__pyx_t_2);
 
1217
  __Pyx_AddTraceback("h5py.h5s.SpaceID.is_simple");
 
1218
  __pyx_r = NULL;
 
1219
  __pyx_L0:;
 
1220
  __Pyx_XGIVEREF(__pyx_r);
 
1221
  __Pyx_FinishRefcountContext();
 
1222
  return __pyx_r;
 
1223
}
 
1224
 
 
1225
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":210
 
1226
 * 
 
1227
 *     @sync
 
1228
 *     def offset_simple(self, object offset=None):             # <<<<<<<<<<<<<<
 
1229
 *         """(TUPLE offset=None)
 
1230
 * 
 
1231
 */
 
1232
 
 
1233
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_offset_simple(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
1234
static char __pyx_doc_4h5py_3h5s_7SpaceID_offset_simple[] = "(TUPLE offset=None)\n\n        Set the offset of a dataspace.  The length of the given tuple must\n        match the rank of the dataspace. If None is provided (default), \n        the offsets on all axes will be set to 0.\n        ";
 
1235
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_offset_simple(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
1236
  PyObject *__pyx_v_offset = 0;
 
1237
  int __pyx_v_rank;
 
1238
  int __pyx_v_i;
 
1239
  hssize_t *__pyx_v_dims;
 
1240
  PyObject *__pyx_r = NULL;
 
1241
  htri_t __pyx_t_1;
 
1242
  int __pyx_t_2;
 
1243
  PyObject *__pyx_t_3 = NULL;
 
1244
  PyObject *__pyx_t_4 = NULL;
 
1245
  int __pyx_t_5;
 
1246
  void *__pyx_t_6;
 
1247
  herr_t __pyx_t_7;
 
1248
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_offset,0};
 
1249
  __Pyx_SetupRefcountContext("offset_simple");
 
1250
  if (unlikely(__pyx_kwds)) {
 
1251
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
1252
    PyObject* values[1] = {0};
 
1253
    values[0] = Py_None;
 
1254
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1255
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
1256
      case  0: break;
 
1257
      default: goto __pyx_L5_argtuple_error;
 
1258
    }
 
1259
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1260
      case  0:
 
1261
      if (kw_args > 1) {
 
1262
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_offset);
 
1263
        if (unlikely(value)) { values[0] = value; kw_args--; }
 
1264
      }
 
1265
    }
 
1266
    if (unlikely(kw_args > 0)) {
 
1267
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "offset_simple") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1268
    }
 
1269
    __pyx_v_offset = values[0];
 
1270
  } else {
 
1271
    __pyx_v_offset = Py_None;
 
1272
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1273
      case  1: __pyx_v_offset = PyTuple_GET_ITEM(__pyx_args, 0);
 
1274
      case  0: break;
 
1275
      default: goto __pyx_L5_argtuple_error;
 
1276
    }
 
1277
  }
 
1278
  goto __pyx_L4_argument_unpacking_done;
 
1279
  __pyx_L5_argtuple_error:;
 
1280
  __Pyx_RaiseArgtupleInvalid("offset_simple", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1281
  __pyx_L3_error:;
 
1282
  __Pyx_AddTraceback("h5py.h5s.SpaceID.offset_simple");
 
1283
  return NULL;
 
1284
  __pyx_L4_argument_unpacking_done:;
 
1285
 
 
1286
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":219
 
1287
 *         cdef int rank
 
1288
 *         cdef int i
 
1289
 *         cdef hssize_t *dims = NULL             # <<<<<<<<<<<<<<
 
1290
 * 
 
1291
 *         try:
 
1292
 */
 
1293
  __pyx_v_dims = NULL;
 
1294
 
 
1295
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":221
 
1296
 *         cdef hssize_t *dims = NULL
 
1297
 * 
 
1298
 *         try:             # <<<<<<<<<<<<<<
 
1299
 *             if not H5Sis_simple(self.id):
 
1300
 *                 raise ValueError("%d is not a simple dataspace" % self.id)
 
1301
 */
 
1302
  /*try:*/ {
 
1303
 
 
1304
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":222
 
1305
 * 
 
1306
 *         try:
 
1307
 *             if not H5Sis_simple(self.id):             # <<<<<<<<<<<<<<
 
1308
 *                 raise ValueError("%d is not a simple dataspace" % self.id)
 
1309
 * 
 
1310
 */
 
1311
    __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 = 222; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1312
    __pyx_t_2 = (!__pyx_t_1);
 
1313
    if (__pyx_t_2) {
 
1314
 
 
1315
      /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":223
 
1316
 *         try:
 
1317
 *             if not H5Sis_simple(self.id):
 
1318
 *                 raise ValueError("%d is not a simple dataspace" % self.id)             # <<<<<<<<<<<<<<
 
1319
 * 
 
1320
 *             rank = H5Sget_simple_extent_ndims(self.id)
 
1321
 */
 
1322
      __pyx_t_3 = PyInt_FromLong(((struct __pyx_obj_4h5py_3h5s_SpaceID *)__pyx_v_self)->__pyx_base.id); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1323
      __Pyx_GOTREF(__pyx_t_3);
 
1324
      __pyx_t_4 = PyNumber_Remainder(__pyx_kp_116, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1325
      __Pyx_GOTREF(__pyx_t_4);
 
1326
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
1327
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1328
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
1329
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
 
1330
      __Pyx_GIVEREF(__pyx_t_4);
 
1331
      __pyx_t_4 = 0;
 
1332
      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1333
      __Pyx_GOTREF(__pyx_t_4);
 
1334
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
1335
      __Pyx_Raise(__pyx_t_4, 0, 0);
 
1336
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
1337
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1338
      goto __pyx_L9;
 
1339
    }
 
1340
    __pyx_L9:;
 
1341
 
 
1342
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":225
 
1343
 *                 raise ValueError("%d is not a simple dataspace" % self.id)
 
1344
 * 
 
1345
 *             rank = H5Sget_simple_extent_ndims(self.id)             # <<<<<<<<<<<<<<
 
1346
 * 
 
1347
 *             require_tuple(offset, 1, rank, "offset")
 
1348
 */
 
1349
    __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 = 225; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1350
    __pyx_v_rank = __pyx_t_5;
 
1351
 
 
1352
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":227
 
1353
 *             rank = H5Sget_simple_extent_ndims(self.id)
 
1354
 * 
 
1355
 *             require_tuple(offset, 1, rank, "offset")             # <<<<<<<<<<<<<<
 
1356
 *             dims = <hssize_t*>emalloc(sizeof(hssize_t)*rank)
 
1357
 *             if(offset is not None):
 
1358
 */
 
1359
    __pyx_t_5 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_offset, 1, __pyx_v_rank, __pyx_k_117); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1360
 
 
1361
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":228
 
1362
 * 
 
1363
 *             require_tuple(offset, 1, rank, "offset")
 
1364
 *             dims = <hssize_t*>emalloc(sizeof(hssize_t)*rank)             # <<<<<<<<<<<<<<
 
1365
 *             if(offset is not None):
 
1366
 *                 convert_tuple(offset, <hsize_t*>dims, rank)
 
1367
 */
 
1368
    __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 = 228; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1369
    __pyx_v_dims = ((hssize_t *)__pyx_t_6);
 
1370
 
 
1371
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":229
 
1372
 *             require_tuple(offset, 1, rank, "offset")
 
1373
 *             dims = <hssize_t*>emalloc(sizeof(hssize_t)*rank)
 
1374
 *             if(offset is not None):             # <<<<<<<<<<<<<<
 
1375
 *                 convert_tuple(offset, <hsize_t*>dims, rank)
 
1376
 *             else:
 
1377
 */
 
1378
    __pyx_t_2 = (__pyx_v_offset != Py_None);
 
1379
    if (__pyx_t_2) {
 
1380
 
 
1381
      /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":230
 
1382
 *             dims = <hssize_t*>emalloc(sizeof(hssize_t)*rank)
 
1383
 *             if(offset is not None):
 
1384
 *                 convert_tuple(offset, <hsize_t*>dims, rank)             # <<<<<<<<<<<<<<
 
1385
 *             else:
 
1386
 *                 # The HDF5 docs say passing in NULL resets the offset to 0.
 
1387
 */
 
1388
      __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 = 230; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1389
      goto __pyx_L10;
 
1390
    }
 
1391
    /*else*/ {
 
1392
 
 
1393
      /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":235
 
1394
 *                 # Instead it raises an exception.  Imagine my surprise. We'll
 
1395
 *                 # do this manually.
 
1396
 *                 for i from 0<=i<rank:             # <<<<<<<<<<<<<<
 
1397
 *                     dims[i] = 0
 
1398
 * 
 
1399
 */
 
1400
      __pyx_t_5 = __pyx_v_rank;
 
1401
      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
 
1402
 
 
1403
        /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":236
 
1404
 *                 # do this manually.
 
1405
 *                 for i from 0<=i<rank:
 
1406
 *                     dims[i] = 0             # <<<<<<<<<<<<<<
 
1407
 * 
 
1408
 *             H5Soffset_simple(self.id, dims)
 
1409
 */
 
1410
        (__pyx_v_dims[__pyx_v_i]) = 0;
 
1411
      }
 
1412
    }
 
1413
    __pyx_L10:;
 
1414
 
 
1415
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":238
 
1416
 *                     dims[i] = 0
 
1417
 * 
 
1418
 *             H5Soffset_simple(self.id, dims)             # <<<<<<<<<<<<<<
 
1419
 * 
 
1420
 *         finally:
 
1421
 */
 
1422
    __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 = 238; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1423
  }
 
1424
  /*finally:*/ {
 
1425
    int __pyx_why;
 
1426
    PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
 
1427
    int __pyx_exc_lineno;
 
1428
    __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
 
1429
    __pyx_why = 0; goto __pyx_L8;
 
1430
    __pyx_L7: {
 
1431
      __pyx_why = 4;
 
1432
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
 
1433
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
 
1434
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
 
1435
      __pyx_exc_lineno = __pyx_lineno;
 
1436
      goto __pyx_L8;
 
1437
    }
 
1438
    __pyx_L8:;
 
1439
 
 
1440
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":241
 
1441
 * 
 
1442
 *         finally:
 
1443
 *             efree(dims)             # <<<<<<<<<<<<<<
 
1444
 * 
 
1445
 *     @sync
 
1446
 */
 
1447
    __pyx_f_4h5py_5utils_efree(__pyx_v_dims);
 
1448
    switch (__pyx_why) {
 
1449
      case 4: {
 
1450
        __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
 
1451
        __pyx_lineno = __pyx_exc_lineno;
 
1452
        __pyx_exc_type = 0;
 
1453
        __pyx_exc_value = 0;
 
1454
        __pyx_exc_tb = 0;
 
1455
        goto __pyx_L1_error;
 
1456
      }
 
1457
    }
 
1458
  }
 
1459
 
 
1460
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1461
  goto __pyx_L0;
 
1462
  __pyx_L1_error:;
 
1463
  __Pyx_XDECREF(__pyx_t_3);
 
1464
  __Pyx_XDECREF(__pyx_t_4);
 
1465
  __Pyx_AddTraceback("h5py.h5s.SpaceID.offset_simple");
 
1466
  __pyx_r = NULL;
 
1467
  __pyx_L0:;
 
1468
  __Pyx_XGIVEREF(__pyx_r);
 
1469
  __Pyx_FinishRefcountContext();
 
1470
  return __pyx_r;
 
1471
}
 
1472
 
 
1473
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":244
 
1474
 * 
 
1475
 *     @sync
 
1476
 *     def get_simple_extent_ndims(self):             # <<<<<<<<<<<<<<
 
1477
 *         """() => INT rank
 
1478
 * 
 
1479
 */
 
1480
 
 
1481
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_simple_extent_ndims(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
1482
static char __pyx_doc_4h5py_3h5s_7SpaceID_get_simple_extent_ndims[] = "() => INT rank\n        \n        Determine the rank of a \"simple\" (slab) dataspace.\n        ";
 
1483
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_simple_extent_ndims(PyObject *__pyx_v_self, PyObject *unused) {
 
1484
  PyObject *__pyx_r = NULL;
 
1485
  int __pyx_t_1;
 
1486
  PyObject *__pyx_t_2 = NULL;
 
1487
  __Pyx_SetupRefcountContext("get_simple_extent_ndims");
 
1488
 
 
1489
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":249
 
1490
 *         Determine the rank of a "simple" (slab) dataspace.
 
1491
 *         """
 
1492
 *         return H5Sget_simple_extent_ndims(self.id)             # <<<<<<<<<<<<<<
 
1493
 * 
 
1494
 *     @sync
 
1495
 */
 
1496
  __Pyx_XDECREF(__pyx_r);
 
1497
  __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 = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1498
  __pyx_t_2 = PyInt_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1499
  __Pyx_GOTREF(__pyx_t_2);
 
1500
  __pyx_r = __pyx_t_2;
 
1501
  __pyx_t_2 = 0;
 
1502
  goto __pyx_L0;
 
1503
 
 
1504
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1505
  goto __pyx_L0;
 
1506
  __pyx_L1_error:;
 
1507
  __Pyx_XDECREF(__pyx_t_2);
 
1508
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_simple_extent_ndims");
 
1509
  __pyx_r = NULL;
 
1510
  __pyx_L0:;
 
1511
  __Pyx_XGIVEREF(__pyx_r);
 
1512
  __Pyx_FinishRefcountContext();
 
1513
  return __pyx_r;
 
1514
}
 
1515
 
 
1516
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":252
 
1517
 * 
 
1518
 *     @sync
 
1519
 *     def get_simple_extent_dims(self, int maxdims=0):             # <<<<<<<<<<<<<<
 
1520
 *         """(BOOL maxdims=False) => TUPLE shape
 
1521
 * 
 
1522
 */
 
1523
 
 
1524
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_simple_extent_dims(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
1525
static char __pyx_doc_4h5py_3h5s_7SpaceID_get_simple_extent_dims[] = "(BOOL maxdims=False) => TUPLE shape\n\n        Determine the shape of a \"simple\" (slab) dataspace.  If \"maxdims\" \n        is True, retrieve the maximum dataspace size instead.\n        ";
 
1526
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_simple_extent_dims(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
1527
  int __pyx_v_maxdims;
 
1528
  int __pyx_v_rank;
 
1529
  hsize_t *__pyx_v_dims;
 
1530
  PyObject *__pyx_r = NULL;
 
1531
  int __pyx_t_1;
 
1532
  void *__pyx_t_2;
 
1533
  PyObject *__pyx_t_3 = NULL;
 
1534
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_maxdims,0};
 
1535
  __Pyx_SetupRefcountContext("get_simple_extent_dims");
 
1536
  if (unlikely(__pyx_kwds)) {
 
1537
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
1538
    PyObject* values[1] = {0};
 
1539
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1540
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
1541
      case  0: break;
 
1542
      default: goto __pyx_L5_argtuple_error;
 
1543
    }
 
1544
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1545
      case  0:
 
1546
      if (kw_args > 1) {
 
1547
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_maxdims);
 
1548
        if (unlikely(value)) { values[0] = value; kw_args--; }
 
1549
      }
 
1550
    }
 
1551
    if (unlikely(kw_args > 0)) {
 
1552
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get_simple_extent_dims") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1553
    }
 
1554
    if (values[0]) {
 
1555
      __pyx_v_maxdims = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_maxdims == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1556
    } else {
 
1557
      __pyx_v_maxdims = 0;
 
1558
    }
 
1559
  } else {
 
1560
    __pyx_v_maxdims = 0;
 
1561
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1562
      case  1: __pyx_v_maxdims = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_maxdims == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1563
      case  0: break;
 
1564
      default: goto __pyx_L5_argtuple_error;
 
1565
    }
 
1566
  }
 
1567
  goto __pyx_L4_argument_unpacking_done;
 
1568
  __pyx_L5_argtuple_error:;
 
1569
  __Pyx_RaiseArgtupleInvalid("get_simple_extent_dims", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1570
  __pyx_L3_error:;
 
1571
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_simple_extent_dims");
 
1572
  return NULL;
 
1573
  __pyx_L4_argument_unpacking_done:;
 
1574
 
 
1575
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":259
 
1576
 *         """
 
1577
 *         cdef int rank
 
1578
 *         cdef hsize_t* dims = NULL             # <<<<<<<<<<<<<<
 
1579
 * 
 
1580
 *         rank = H5Sget_simple_extent_dims(self.id, NULL, NULL)
 
1581
 */
 
1582
  __pyx_v_dims = NULL;
 
1583
 
 
1584
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":261
 
1585
 *         cdef hsize_t* dims = NULL
 
1586
 * 
 
1587
 *         rank = H5Sget_simple_extent_dims(self.id, NULL, NULL)             # <<<<<<<<<<<<<<
 
1588
 * 
 
1589
 *         dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
1590
 */
 
1591
  __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 = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1592
  __pyx_v_rank = __pyx_t_1;
 
1593
 
 
1594
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":263
 
1595
 *         rank = H5Sget_simple_extent_dims(self.id, NULL, NULL)
 
1596
 * 
 
1597
 *         dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
 
1598
 *         try:
 
1599
 *             if maxdims:
 
1600
 */
 
1601
  __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 = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1602
  __pyx_v_dims = ((hsize_t *)__pyx_t_2);
 
1603
 
 
1604
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":264
 
1605
 * 
 
1606
 *         dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
1607
 *         try:             # <<<<<<<<<<<<<<
 
1608
 *             if maxdims:
 
1609
 *                 H5Sget_simple_extent_dims(self.id, NULL, dims)
 
1610
 */
 
1611
  /*try:*/ {
 
1612
 
 
1613
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":265
 
1614
 *         dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
1615
 *         try:
 
1616
 *             if maxdims:             # <<<<<<<<<<<<<<
 
1617
 *                 H5Sget_simple_extent_dims(self.id, NULL, dims)
 
1618
 *             else:
 
1619
 */
 
1620
    __pyx_t_1 = __pyx_v_maxdims;
 
1621
    if (__pyx_t_1) {
 
1622
 
 
1623
      /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":266
 
1624
 *         try:
 
1625
 *             if maxdims:
 
1626
 *                 H5Sget_simple_extent_dims(self.id, NULL, dims)             # <<<<<<<<<<<<<<
 
1627
 *             else:
 
1628
 *                 H5Sget_simple_extent_dims(self.id, dims, NULL)
 
1629
 */
 
1630
      __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 = 266; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1631
      goto __pyx_L9;
 
1632
    }
 
1633
    /*else*/ {
 
1634
 
 
1635
      /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":268
 
1636
 *                 H5Sget_simple_extent_dims(self.id, NULL, dims)
 
1637
 *             else:
 
1638
 *                 H5Sget_simple_extent_dims(self.id, dims, NULL)             # <<<<<<<<<<<<<<
 
1639
 * 
 
1640
 *             return convert_dims(dims, rank)
 
1641
 */
 
1642
      __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 = 268; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1643
    }
 
1644
    __pyx_L9:;
 
1645
 
 
1646
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":270
 
1647
 *                 H5Sget_simple_extent_dims(self.id, dims, NULL)
 
1648
 * 
 
1649
 *             return convert_dims(dims, rank)             # <<<<<<<<<<<<<<
 
1650
 * 
 
1651
 *         finally:
 
1652
 */
 
1653
    __Pyx_XDECREF(__pyx_r);
 
1654
    __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 = 270; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1655
    __Pyx_GOTREF(__pyx_t_3);
 
1656
    __pyx_r = __pyx_t_3;
 
1657
    __pyx_t_3 = 0;
 
1658
    goto __pyx_L6;
 
1659
  }
 
1660
  /*finally:*/ {
 
1661
    int __pyx_why;
 
1662
    PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
 
1663
    int __pyx_exc_lineno;
 
1664
    __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
 
1665
    __pyx_why = 0; goto __pyx_L8;
 
1666
    __pyx_L6: __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
 
1667
    __pyx_why = 3; goto __pyx_L8;
 
1668
    __pyx_L7: {
 
1669
      __pyx_why = 4;
 
1670
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
 
1671
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
 
1672
      __pyx_exc_lineno = __pyx_lineno;
 
1673
      goto __pyx_L8;
 
1674
    }
 
1675
    __pyx_L8:;
 
1676
 
 
1677
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":273
 
1678
 * 
 
1679
 *         finally:
 
1680
 *             efree(dims)             # <<<<<<<<<<<<<<
 
1681
 * 
 
1682
 *     @sync
 
1683
 */
 
1684
    __pyx_f_4h5py_5utils_efree(__pyx_v_dims);
 
1685
    switch (__pyx_why) {
 
1686
      case 3: goto __pyx_L0;
 
1687
      case 4: {
 
1688
        __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
 
1689
        __pyx_lineno = __pyx_exc_lineno;
 
1690
        __pyx_exc_type = 0;
 
1691
        __pyx_exc_value = 0;
 
1692
        __pyx_exc_tb = 0;
 
1693
        goto __pyx_L1_error;
 
1694
      }
 
1695
    }
 
1696
  }
 
1697
 
 
1698
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1699
  goto __pyx_L0;
 
1700
  __pyx_L1_error:;
 
1701
  __Pyx_XDECREF(__pyx_t_3);
 
1702
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_simple_extent_dims");
 
1703
  __pyx_r = NULL;
 
1704
  __pyx_L0:;
 
1705
  __Pyx_XGIVEREF(__pyx_r);
 
1706
  __Pyx_FinishRefcountContext();
 
1707
  return __pyx_r;
 
1708
}
 
1709
 
 
1710
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":276
 
1711
 * 
 
1712
 *     @sync
 
1713
 *     def get_simple_extent_npoints(self):             # <<<<<<<<<<<<<<
 
1714
 *         """() => LONG npoints
 
1715
 * 
 
1716
 */
 
1717
 
 
1718
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_simple_extent_npoints(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
1719
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        ";
 
1720
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_simple_extent_npoints(PyObject *__pyx_v_self, PyObject *unused) {
 
1721
  PyObject *__pyx_r = NULL;
 
1722
  hssize_t __pyx_t_1;
 
1723
  PyObject *__pyx_t_2 = NULL;
 
1724
  __Pyx_SetupRefcountContext("get_simple_extent_npoints");
 
1725
 
 
1726
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":281
 
1727
 *         Determine the total number of elements in a dataspace.
 
1728
 *         """
 
1729
 *         return H5Sget_simple_extent_npoints(self.id)             # <<<<<<<<<<<<<<
 
1730
 * 
 
1731
 *     @sync
 
1732
 */
 
1733
  __Pyx_XDECREF(__pyx_r);
 
1734
  __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 = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1735
  __pyx_t_2 = PyLong_FromLongLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1736
  __Pyx_GOTREF(__pyx_t_2);
 
1737
  __pyx_r = __pyx_t_2;
 
1738
  __pyx_t_2 = 0;
 
1739
  goto __pyx_L0;
 
1740
 
 
1741
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1742
  goto __pyx_L0;
 
1743
  __pyx_L1_error:;
 
1744
  __Pyx_XDECREF(__pyx_t_2);
 
1745
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_simple_extent_npoints");
 
1746
  __pyx_r = NULL;
 
1747
  __pyx_L0:;
 
1748
  __Pyx_XGIVEREF(__pyx_r);
 
1749
  __Pyx_FinishRefcountContext();
 
1750
  return __pyx_r;
 
1751
}
 
1752
 
 
1753
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":284
 
1754
 * 
 
1755
 *     @sync
 
1756
 *     def get_simple_extent_type(self):             # <<<<<<<<<<<<<<
 
1757
 *         """() => INT class_code
 
1758
 * 
 
1759
 */
 
1760
 
 
1761
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_simple_extent_type(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
1762
static char __pyx_doc_4h5py_3h5s_7SpaceID_get_simple_extent_type[] = "() => INT class_code\n\n        Class code is either SCALAR or SIMPLE.\n        ";
 
1763
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_simple_extent_type(PyObject *__pyx_v_self, PyObject *unused) {
 
1764
  PyObject *__pyx_r = NULL;
 
1765
  H5S_class_t __pyx_t_1;
 
1766
  PyObject *__pyx_t_2 = NULL;
 
1767
  __Pyx_SetupRefcountContext("get_simple_extent_type");
 
1768
 
 
1769
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":289
 
1770
 *         Class code is either SCALAR or SIMPLE.
 
1771
 *         """
 
1772
 *         return <int>H5Sget_simple_extent_type(self.id)             # <<<<<<<<<<<<<<
 
1773
 * 
 
1774
 *     # === Extents =============================================================
 
1775
 */
 
1776
  __Pyx_XDECREF(__pyx_r);
 
1777
  __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 = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1778
  __pyx_t_2 = PyInt_FromLong(((int)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1779
  __Pyx_GOTREF(__pyx_t_2);
 
1780
  __pyx_r = __pyx_t_2;
 
1781
  __pyx_t_2 = 0;
 
1782
  goto __pyx_L0;
 
1783
 
 
1784
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1785
  goto __pyx_L0;
 
1786
  __pyx_L1_error:;
 
1787
  __Pyx_XDECREF(__pyx_t_2);
 
1788
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_simple_extent_type");
 
1789
  __pyx_r = NULL;
 
1790
  __pyx_L0:;
 
1791
  __Pyx_XGIVEREF(__pyx_r);
 
1792
  __Pyx_FinishRefcountContext();
 
1793
  return __pyx_r;
 
1794
}
 
1795
 
 
1796
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":294
 
1797
 * 
 
1798
 *     @sync
 
1799
 *     def extent_copy(self, SpaceID source not None):             # <<<<<<<<<<<<<<
 
1800
 *         """(SpaceID source)
 
1801
 * 
 
1802
 */
 
1803
 
 
1804
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_extent_copy(PyObject *__pyx_v_self, PyObject *__pyx_v_source); /*proto*/
 
1805
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        ";
 
1806
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_extent_copy(PyObject *__pyx_v_self, PyObject *__pyx_v_source) {
 
1807
  PyObject *__pyx_r = NULL;
 
1808
  herr_t __pyx_t_1;
 
1809
  __Pyx_SetupRefcountContext("extent_copy");
 
1810
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_source), __pyx_ptype_4h5py_3h5s_SpaceID, 0, "source", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1811
 
 
1812
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":300
 
1813
 *         typecode if necessary.
 
1814
 *         """
 
1815
 *         H5Sextent_copy(self.id, source.id)             # <<<<<<<<<<<<<<
 
1816
 * 
 
1817
 *     @sync
 
1818
 */
 
1819
  __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 = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1820
 
 
1821
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1822
  goto __pyx_L0;
 
1823
  __pyx_L1_error:;
 
1824
  __Pyx_AddTraceback("h5py.h5s.SpaceID.extent_copy");
 
1825
  __pyx_r = NULL;
 
1826
  __pyx_L0:;
 
1827
  __Pyx_XGIVEREF(__pyx_r);
 
1828
  __Pyx_FinishRefcountContext();
 
1829
  return __pyx_r;
 
1830
}
 
1831
 
 
1832
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":303
 
1833
 * 
 
1834
 *     @sync
 
1835
 *     def set_extent_simple(self, object dims_tpl, object max_dims_tpl=None):             # <<<<<<<<<<<<<<
 
1836
 *         """(TUPLE dims_tpl, TUPLE max_dims_tpl=None)
 
1837
 * 
 
1838
 */
 
1839
 
 
1840
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_set_extent_simple(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
1841
static char __pyx_doc_4h5py_3h5s_7SpaceID_set_extent_simple[] = "(TUPLE dims_tpl, TUPLE max_dims_tpl=None)\n\n        Reset the dataspace extent via a tuple of dimensions.  \n        Every element of dims_tpl must be a positive integer.  \n\n        You can optionally specify the maximum dataspace size. The \n        special value UNLIMITED, as an element of max_dims, indicates \n        an unlimited dimension.\n        ";
 
1842
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_set_extent_simple(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
1843
  PyObject *__pyx_v_dims_tpl = 0;
 
1844
  PyObject *__pyx_v_max_dims_tpl = 0;
 
1845
  int __pyx_v_rank;
 
1846
  hsize_t *__pyx_v_dims;
 
1847
  hsize_t *__pyx_v_max_dims;
 
1848
  PyObject *__pyx_r = NULL;
 
1849
  int __pyx_t_1;
 
1850
  Py_ssize_t __pyx_t_2;
 
1851
  void *__pyx_t_3;
 
1852
  int __pyx_t_4;
 
1853
  herr_t __pyx_t_5;
 
1854
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_dims_tpl,&__pyx_kp_max_dims_tpl,0};
 
1855
  __Pyx_SetupRefcountContext("set_extent_simple");
 
1856
  if (unlikely(__pyx_kwds)) {
 
1857
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
1858
    PyObject* values[2] = {0,0};
 
1859
    values[1] = Py_None;
 
1860
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1861
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
1862
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
1863
      case  0: break;
 
1864
      default: goto __pyx_L5_argtuple_error;
 
1865
    }
 
1866
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1867
      case  0:
 
1868
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_dims_tpl);
 
1869
      if (likely(values[0])) kw_args--;
 
1870
      else goto __pyx_L5_argtuple_error;
 
1871
      case  1:
 
1872
      if (kw_args > 1) {
 
1873
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_max_dims_tpl);
 
1874
        if (unlikely(value)) { values[1] = value; kw_args--; }
 
1875
      }
 
1876
    }
 
1877
    if (unlikely(kw_args > 0)) {
 
1878
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "set_extent_simple") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1879
    }
 
1880
    __pyx_v_dims_tpl = values[0];
 
1881
    __pyx_v_max_dims_tpl = values[1];
 
1882
  } else {
 
1883
    __pyx_v_max_dims_tpl = Py_None;
 
1884
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1885
      case  2: __pyx_v_max_dims_tpl = PyTuple_GET_ITEM(__pyx_args, 1);
 
1886
      case  1: __pyx_v_dims_tpl = PyTuple_GET_ITEM(__pyx_args, 0);
 
1887
      break;
 
1888
      default: goto __pyx_L5_argtuple_error;
 
1889
    }
 
1890
  }
 
1891
  goto __pyx_L4_argument_unpacking_done;
 
1892
  __pyx_L5_argtuple_error:;
 
1893
  __Pyx_RaiseArgtupleInvalid("set_extent_simple", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1894
  __pyx_L3_error:;
 
1895
  __Pyx_AddTraceback("h5py.h5s.SpaceID.set_extent_simple");
 
1896
  return NULL;
 
1897
  __pyx_L4_argument_unpacking_done:;
 
1898
 
 
1899
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":314
 
1900
 *         """
 
1901
 *         cdef int rank
 
1902
 *         cdef hsize_t* dims = NULL             # <<<<<<<<<<<<<<
 
1903
 *         cdef hsize_t* max_dims = NULL
 
1904
 * 
 
1905
 */
 
1906
  __pyx_v_dims = NULL;
 
1907
 
 
1908
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":315
 
1909
 *         cdef int rank
 
1910
 *         cdef hsize_t* dims = NULL
 
1911
 *         cdef hsize_t* max_dims = NULL             # <<<<<<<<<<<<<<
 
1912
 * 
 
1913
 *         require_tuple(dims_tpl, 0, -1, "dims_tpl")
 
1914
 */
 
1915
  __pyx_v_max_dims = NULL;
 
1916
 
 
1917
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":317
 
1918
 *         cdef hsize_t* max_dims = NULL
 
1919
 * 
 
1920
 *         require_tuple(dims_tpl, 0, -1, "dims_tpl")             # <<<<<<<<<<<<<<
 
1921
 *         rank = len(dims_tpl)
 
1922
 *         require_tuple(max_dims_tpl, 1, rank, "max_dims_tpl")
 
1923
 */
 
1924
  __pyx_t_1 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_dims_tpl, 0, -1, __pyx_k_118); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1925
 
 
1926
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":318
 
1927
 * 
 
1928
 *         require_tuple(dims_tpl, 0, -1, "dims_tpl")
 
1929
 *         rank = len(dims_tpl)             # <<<<<<<<<<<<<<
 
1930
 *         require_tuple(max_dims_tpl, 1, rank, "max_dims_tpl")
 
1931
 * 
 
1932
 */
 
1933
  __pyx_t_2 = PyObject_Length(__pyx_v_dims_tpl); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1934
  __pyx_v_rank = __pyx_t_2;
 
1935
 
 
1936
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":319
 
1937
 *         require_tuple(dims_tpl, 0, -1, "dims_tpl")
 
1938
 *         rank = len(dims_tpl)
 
1939
 *         require_tuple(max_dims_tpl, 1, rank, "max_dims_tpl")             # <<<<<<<<<<<<<<
 
1940
 * 
 
1941
 *         try:
 
1942
 */
 
1943
  __pyx_t_1 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_max_dims_tpl, 1, __pyx_v_rank, __pyx_k_119); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1944
 
 
1945
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":321
 
1946
 *         require_tuple(max_dims_tpl, 1, rank, "max_dims_tpl")
 
1947
 * 
 
1948
 *         try:             # <<<<<<<<<<<<<<
 
1949
 *             dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
1950
 *             convert_tuple(dims_tpl, dims, rank)
 
1951
 */
 
1952
  /*try:*/ {
 
1953
 
 
1954
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":322
 
1955
 * 
 
1956
 *         try:
 
1957
 *             dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
 
1958
 *             convert_tuple(dims_tpl, dims, rank)
 
1959
 * 
 
1960
 */
 
1961
    __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 = 322; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1962
    __pyx_v_dims = ((hsize_t *)__pyx_t_3);
 
1963
 
 
1964
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":323
 
1965
 *         try:
 
1966
 *             dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
1967
 *             convert_tuple(dims_tpl, dims, rank)             # <<<<<<<<<<<<<<
 
1968
 * 
 
1969
 *             if max_dims_tpl is not None:
 
1970
 */
 
1971
    __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 = 323; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1972
 
 
1973
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":325
 
1974
 *             convert_tuple(dims_tpl, dims, rank)
 
1975
 * 
 
1976
 *             if max_dims_tpl is not None:             # <<<<<<<<<<<<<<
 
1977
 *                 max_dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
1978
 *                 convert_tuple(max_dims_tpl, max_dims, rank)
 
1979
 */
 
1980
    __pyx_t_4 = (__pyx_v_max_dims_tpl != Py_None);
 
1981
    if (__pyx_t_4) {
 
1982
 
 
1983
      /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":326
 
1984
 * 
 
1985
 *             if max_dims_tpl is not None:
 
1986
 *                 max_dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
 
1987
 *                 convert_tuple(max_dims_tpl, max_dims, rank)
 
1988
 * 
 
1989
 */
 
1990
      __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 = 326; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
1991
      __pyx_v_max_dims = ((hsize_t *)__pyx_t_3);
 
1992
 
 
1993
      /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":327
 
1994
 *             if max_dims_tpl is not None:
 
1995
 *                 max_dims = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
1996
 *                 convert_tuple(max_dims_tpl, max_dims, rank)             # <<<<<<<<<<<<<<
 
1997
 * 
 
1998
 *             H5Sset_extent_simple(self.id, rank, dims, max_dims)
 
1999
 */
 
2000
      __pyx_t_1 = __pyx_f_4h5py_5utils_convert_tuple(__pyx_v_max_dims_tpl, __pyx_v_max_dims, __pyx_v_rank); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
2001
      goto __pyx_L9;
 
2002
    }
 
2003
    __pyx_L9:;
 
2004
 
 
2005
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":329
 
2006
 *                 convert_tuple(max_dims_tpl, max_dims, rank)
 
2007
 * 
 
2008
 *             H5Sset_extent_simple(self.id, rank, dims, max_dims)             # <<<<<<<<<<<<<<
 
2009
 * 
 
2010
 *         finally:
 
2011
 */
 
2012
    __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 = 329; __pyx_clineno = __LINE__; goto __pyx_L7;}
 
2013
  }
 
2014
  /*finally:*/ {
 
2015
    int __pyx_why;
 
2016
    PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
 
2017
    int __pyx_exc_lineno;
 
2018
    __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
 
2019
    __pyx_why = 0; goto __pyx_L8;
 
2020
    __pyx_L7: {
 
2021
      __pyx_why = 4;
 
2022
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
 
2023
      __pyx_exc_lineno = __pyx_lineno;
 
2024
      goto __pyx_L8;
 
2025
    }
 
2026
    __pyx_L8:;
 
2027
 
 
2028
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":332
 
2029
 * 
 
2030
 *         finally:
 
2031
 *             efree(dims)             # <<<<<<<<<<<<<<
 
2032
 *             efree(max_dims)
 
2033
 * 
 
2034
 */
 
2035
    __pyx_f_4h5py_5utils_efree(__pyx_v_dims);
 
2036
 
 
2037
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":333
 
2038
 *         finally:
 
2039
 *             efree(dims)
 
2040
 *             efree(max_dims)             # <<<<<<<<<<<<<<
 
2041
 * 
 
2042
 *     @sync
 
2043
 */
 
2044
    __pyx_f_4h5py_5utils_efree(__pyx_v_max_dims);
 
2045
    switch (__pyx_why) {
 
2046
      case 4: {
 
2047
        __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
 
2048
        __pyx_lineno = __pyx_exc_lineno;
 
2049
        __pyx_exc_type = 0;
 
2050
        __pyx_exc_value = 0;
 
2051
        __pyx_exc_tb = 0;
 
2052
        goto __pyx_L1_error;
 
2053
      }
 
2054
    }
 
2055
  }
 
2056
 
 
2057
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2058
  goto __pyx_L0;
 
2059
  __pyx_L1_error:;
 
2060
  __Pyx_AddTraceback("h5py.h5s.SpaceID.set_extent_simple");
 
2061
  __pyx_r = NULL;
 
2062
  __pyx_L0:;
 
2063
  __Pyx_XGIVEREF(__pyx_r);
 
2064
  __Pyx_FinishRefcountContext();
 
2065
  return __pyx_r;
 
2066
}
 
2067
 
 
2068
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":336
 
2069
 * 
 
2070
 *     @sync
 
2071
 *     def set_extent_none(self):             # <<<<<<<<<<<<<<
 
2072
 *         """()
 
2073
 * 
 
2074
 */
 
2075
 
 
2076
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_set_extent_none(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
2077
static char __pyx_doc_4h5py_3h5s_7SpaceID_set_extent_none[] = "()\n\n        Remove the dataspace extent; typecode changes to NO_CLASS.\n        ";
 
2078
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_set_extent_none(PyObject *__pyx_v_self, PyObject *unused) {
 
2079
  PyObject *__pyx_r = NULL;
 
2080
  herr_t __pyx_t_1;
 
2081
  __Pyx_SetupRefcountContext("set_extent_none");
 
2082
 
 
2083
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":341
 
2084
 *         Remove the dataspace extent; typecode changes to NO_CLASS.
 
2085
 *         """
 
2086
 *         H5Sset_extent_none(self.id)             # <<<<<<<<<<<<<<
 
2087
 * 
 
2088
 *     # === General selection operations ========================================
 
2089
 */
 
2090
  __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 = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2091
 
 
2092
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2093
  goto __pyx_L0;
 
2094
  __pyx_L1_error:;
 
2095
  __Pyx_AddTraceback("h5py.h5s.SpaceID.set_extent_none");
 
2096
  __pyx_r = NULL;
 
2097
  __pyx_L0:;
 
2098
  __Pyx_XGIVEREF(__pyx_r);
 
2099
  __Pyx_FinishRefcountContext();
 
2100
  return __pyx_r;
 
2101
}
 
2102
 
 
2103
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":346
 
2104
 * 
 
2105
 *     @sync
 
2106
 *     def get_select_type(self):             # <<<<<<<<<<<<<<
 
2107
 *         """ () => INT select_code
 
2108
 * 
 
2109
 */
 
2110
 
 
2111
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_type(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
2112
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        ";
 
2113
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_type(PyObject *__pyx_v_self, PyObject *unused) {
 
2114
  PyObject *__pyx_r = NULL;
 
2115
  H5S_sel_type __pyx_t_1;
 
2116
  PyObject *__pyx_t_2 = NULL;
 
2117
  __Pyx_SetupRefcountContext("get_select_type");
 
2118
 
 
2119
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":356
 
2120
 *             - SEL_HYPERSLABS
 
2121
 *         """
 
2122
 *         return <int>H5Sget_select_type(self.id)             # <<<<<<<<<<<<<<
 
2123
 * 
 
2124
 *     @sync
 
2125
 */
 
2126
  __Pyx_XDECREF(__pyx_r);
 
2127
  __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 = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2128
  __pyx_t_2 = PyInt_FromLong(((int)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2129
  __Pyx_GOTREF(__pyx_t_2);
 
2130
  __pyx_r = __pyx_t_2;
 
2131
  __pyx_t_2 = 0;
 
2132
  goto __pyx_L0;
 
2133
 
 
2134
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2135
  goto __pyx_L0;
 
2136
  __pyx_L1_error:;
 
2137
  __Pyx_XDECREF(__pyx_t_2);
 
2138
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_select_type");
 
2139
  __pyx_r = NULL;
 
2140
  __pyx_L0:;
 
2141
  __Pyx_XGIVEREF(__pyx_r);
 
2142
  __Pyx_FinishRefcountContext();
 
2143
  return __pyx_r;
 
2144
}
 
2145
 
 
2146
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":359
 
2147
 * 
 
2148
 *     @sync
 
2149
 *     def get_select_npoints(self):             # <<<<<<<<<<<<<<
 
2150
 *         """() => LONG npoints
 
2151
 * 
 
2152
 */
 
2153
 
 
2154
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_npoints(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
2155
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        ";
 
2156
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_npoints(PyObject *__pyx_v_self, PyObject *unused) {
 
2157
  PyObject *__pyx_r = NULL;
 
2158
  hssize_t __pyx_t_1;
 
2159
  PyObject *__pyx_t_2 = NULL;
 
2160
  __Pyx_SetupRefcountContext("get_select_npoints");
 
2161
 
 
2162
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":365
 
2163
 *         Works for all selection techniques.
 
2164
 *         """
 
2165
 *         return H5Sget_select_npoints(self.id)             # <<<<<<<<<<<<<<
 
2166
 * 
 
2167
 *     @sync
 
2168
 */
 
2169
  __Pyx_XDECREF(__pyx_r);
 
2170
  __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 = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2171
  __pyx_t_2 = PyLong_FromLongLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2172
  __Pyx_GOTREF(__pyx_t_2);
 
2173
  __pyx_r = __pyx_t_2;
 
2174
  __pyx_t_2 = 0;
 
2175
  goto __pyx_L0;
 
2176
 
 
2177
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2178
  goto __pyx_L0;
 
2179
  __pyx_L1_error:;
 
2180
  __Pyx_XDECREF(__pyx_t_2);
 
2181
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_select_npoints");
 
2182
  __pyx_r = NULL;
 
2183
  __pyx_L0:;
 
2184
  __Pyx_XGIVEREF(__pyx_r);
 
2185
  __Pyx_FinishRefcountContext();
 
2186
  return __pyx_r;
 
2187
}
 
2188
 
 
2189
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":368
 
2190
 * 
 
2191
 *     @sync
 
2192
 *     def get_select_bounds(self):             # <<<<<<<<<<<<<<
 
2193
 *         """() => (TUPLE start, TUPLE end)
 
2194
 * 
 
2195
 */
 
2196
 
 
2197
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_bounds(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
2198
static char __pyx_doc_4h5py_3h5s_7SpaceID_get_select_bounds[] = "() => (TUPLE start, TUPLE end)\n\n        Determine the bounding box which exactly contains \n        the current selection.\n        ";
 
2199
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_bounds(PyObject *__pyx_v_self, PyObject *unused) {
 
2200
  int __pyx_v_rank;
 
2201
  hsize_t *__pyx_v_start;
 
2202
  hsize_t *__pyx_v_end;
 
2203
  PyObject *__pyx_v_start_tpl;
 
2204
  PyObject *__pyx_v_end_tpl;
 
2205
  PyObject *__pyx_r = NULL;
 
2206
  int __pyx_t_1;
 
2207
  void *__pyx_t_2;
 
2208
  herr_t __pyx_t_3;
 
2209
  PyObject *__pyx_t_4 = NULL;
 
2210
  __Pyx_SetupRefcountContext("get_select_bounds");
 
2211
  __pyx_v_start_tpl = Py_None; __Pyx_INCREF(Py_None);
 
2212
  __pyx_v_end_tpl = Py_None; __Pyx_INCREF(Py_None);
 
2213
 
 
2214
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":375
 
2215
 *         """
 
2216
 *         cdef int rank
 
2217
 *         cdef hsize_t *start = NULL             # <<<<<<<<<<<<<<
 
2218
 *         cdef hsize_t *end = NULL
 
2219
 * 
 
2220
 */
 
2221
  __pyx_v_start = NULL;
 
2222
 
 
2223
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":376
 
2224
 *         cdef int rank
 
2225
 *         cdef hsize_t *start = NULL
 
2226
 *         cdef hsize_t *end = NULL             # <<<<<<<<<<<<<<
 
2227
 * 
 
2228
 *         rank = H5Sget_simple_extent_ndims(self.id)
 
2229
 */
 
2230
  __pyx_v_end = NULL;
 
2231
 
 
2232
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":378
 
2233
 *         cdef hsize_t *end = NULL
 
2234
 * 
 
2235
 *         rank = H5Sget_simple_extent_ndims(self.id)             # <<<<<<<<<<<<<<
 
2236
 * 
 
2237
 *         start = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
2238
 */
 
2239
  __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 = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2240
  __pyx_v_rank = __pyx_t_1;
 
2241
 
 
2242
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":380
 
2243
 *         rank = H5Sget_simple_extent_ndims(self.id)
 
2244
 * 
 
2245
 *         start = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
 
2246
 *         end = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
2247
 * 
 
2248
 */
 
2249
  __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 = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2250
  __pyx_v_start = ((hsize_t *)__pyx_t_2);
 
2251
 
 
2252
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":381
 
2253
 * 
 
2254
 *         start = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
2255
 *         end = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
 
2256
 * 
 
2257
 *         try:
 
2258
 */
 
2259
  __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 = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2260
  __pyx_v_end = ((hsize_t *)__pyx_t_2);
 
2261
 
 
2262
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":383
 
2263
 *         end = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
2264
 * 
 
2265
 *         try:             # <<<<<<<<<<<<<<
 
2266
 *             H5Sget_select_bounds(self.id, start, end)
 
2267
 * 
 
2268
 */
 
2269
  /*try:*/ {
 
2270
 
 
2271
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":384
 
2272
 * 
 
2273
 *         try:
 
2274
 *             H5Sget_select_bounds(self.id, start, end)             # <<<<<<<<<<<<<<
 
2275
 * 
 
2276
 *             start_tpl = convert_dims(start, rank)
 
2277
 */
 
2278
    __pyx_t_3 = 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_L6;}
 
2279
 
 
2280
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":386
 
2281
 *             H5Sget_select_bounds(self.id, start, end)
 
2282
 * 
 
2283
 *             start_tpl = convert_dims(start, rank)             # <<<<<<<<<<<<<<
 
2284
 *             end_tpl = convert_dims(end, rank)
 
2285
 *             return (start_tpl, end_tpl)
 
2286
 */
 
2287
    __pyx_t_4 = __pyx_f_4h5py_5utils_convert_dims(__pyx_v_start, __pyx_v_rank); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L6;}
 
2288
    __Pyx_GOTREF(__pyx_t_4);
 
2289
    __Pyx_DECREF(__pyx_v_start_tpl);
 
2290
    __pyx_v_start_tpl = __pyx_t_4;
 
2291
    __pyx_t_4 = 0;
 
2292
 
 
2293
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":387
 
2294
 * 
 
2295
 *             start_tpl = convert_dims(start, rank)
 
2296
 *             end_tpl = convert_dims(end, rank)             # <<<<<<<<<<<<<<
 
2297
 *             return (start_tpl, end_tpl)
 
2298
 * 
 
2299
 */
 
2300
    __pyx_t_4 = __pyx_f_4h5py_5utils_convert_dims(__pyx_v_end, __pyx_v_rank); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L6;}
 
2301
    __Pyx_GOTREF(__pyx_t_4);
 
2302
    __Pyx_DECREF(__pyx_v_end_tpl);
 
2303
    __pyx_v_end_tpl = __pyx_t_4;
 
2304
    __pyx_t_4 = 0;
 
2305
 
 
2306
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":388
 
2307
 *             start_tpl = convert_dims(start, rank)
 
2308
 *             end_tpl = convert_dims(end, rank)
 
2309
 *             return (start_tpl, end_tpl)             # <<<<<<<<<<<<<<
 
2310
 * 
 
2311
 *         finally:
 
2312
 */
 
2313
    __Pyx_XDECREF(__pyx_r);
 
2314
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L6;}
 
2315
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
 
2316
    __Pyx_INCREF(__pyx_v_start_tpl);
 
2317
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_start_tpl);
 
2318
    __Pyx_GIVEREF(__pyx_v_start_tpl);
 
2319
    __Pyx_INCREF(__pyx_v_end_tpl);
 
2320
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_end_tpl);
 
2321
    __Pyx_GIVEREF(__pyx_v_end_tpl);
 
2322
    __pyx_r = ((PyObject *)__pyx_t_4);
 
2323
    __pyx_t_4 = 0;
 
2324
    goto __pyx_L5;
 
2325
  }
 
2326
  /*finally:*/ {
 
2327
    int __pyx_why;
 
2328
    PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
 
2329
    int __pyx_exc_lineno;
 
2330
    __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
 
2331
    __pyx_why = 0; goto __pyx_L7;
 
2332
    __pyx_L5: __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
 
2333
    __pyx_why = 3; goto __pyx_L7;
 
2334
    __pyx_L6: {
 
2335
      __pyx_why = 4;
 
2336
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
 
2337
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
 
2338
      __pyx_exc_lineno = __pyx_lineno;
 
2339
      goto __pyx_L7;
 
2340
    }
 
2341
    __pyx_L7:;
 
2342
 
 
2343
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":391
 
2344
 * 
 
2345
 *         finally:
 
2346
 *             efree(start)             # <<<<<<<<<<<<<<
 
2347
 *             efree(end)
 
2348
 * 
 
2349
 */
 
2350
    __pyx_f_4h5py_5utils_efree(__pyx_v_start);
 
2351
 
 
2352
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":392
 
2353
 *         finally:
 
2354
 *             efree(start)
 
2355
 *             efree(end)             # <<<<<<<<<<<<<<
 
2356
 * 
 
2357
 *     @sync
 
2358
 */
 
2359
    __pyx_f_4h5py_5utils_efree(__pyx_v_end);
 
2360
    switch (__pyx_why) {
 
2361
      case 3: goto __pyx_L0;
 
2362
      case 4: {
 
2363
        __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
 
2364
        __pyx_lineno = __pyx_exc_lineno;
 
2365
        __pyx_exc_type = 0;
 
2366
        __pyx_exc_value = 0;
 
2367
        __pyx_exc_tb = 0;
 
2368
        goto __pyx_L1_error;
 
2369
      }
 
2370
    }
 
2371
  }
 
2372
 
 
2373
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2374
  goto __pyx_L0;
 
2375
  __pyx_L1_error:;
 
2376
  __Pyx_XDECREF(__pyx_t_4);
 
2377
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_select_bounds");
 
2378
  __pyx_r = NULL;
 
2379
  __pyx_L0:;
 
2380
  __Pyx_DECREF(__pyx_v_start_tpl);
 
2381
  __Pyx_DECREF(__pyx_v_end_tpl);
 
2382
  __Pyx_XGIVEREF(__pyx_r);
 
2383
  __Pyx_FinishRefcountContext();
 
2384
  return __pyx_r;
 
2385
}
 
2386
 
 
2387
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":395
 
2388
 * 
 
2389
 *     @sync
 
2390
 *     def select_all(self):             # <<<<<<<<<<<<<<
 
2391
 *         """()
 
2392
 * 
 
2393
 */
 
2394
 
 
2395
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_select_all(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
2396
static char __pyx_doc_4h5py_3h5s_7SpaceID_select_all[] = "()\n\n        Select all points in the dataspace.\n        ";
 
2397
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_select_all(PyObject *__pyx_v_self, PyObject *unused) {
 
2398
  PyObject *__pyx_r = NULL;
 
2399
  herr_t __pyx_t_1;
 
2400
  __Pyx_SetupRefcountContext("select_all");
 
2401
 
 
2402
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":400
 
2403
 *         Select all points in the dataspace.
 
2404
 *         """
 
2405
 *         H5Sselect_all(self.id)             # <<<<<<<<<<<<<<
 
2406
 * 
 
2407
 *     @sync
 
2408
 */
 
2409
  __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;}
 
2410
 
 
2411
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2412
  goto __pyx_L0;
 
2413
  __pyx_L1_error:;
 
2414
  __Pyx_AddTraceback("h5py.h5s.SpaceID.select_all");
 
2415
  __pyx_r = NULL;
 
2416
  __pyx_L0:;
 
2417
  __Pyx_XGIVEREF(__pyx_r);
 
2418
  __Pyx_FinishRefcountContext();
 
2419
  return __pyx_r;
 
2420
}
 
2421
 
 
2422
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":403
 
2423
 * 
 
2424
 *     @sync
 
2425
 *     def select_none(self):             # <<<<<<<<<<<<<<
 
2426
 *         """()
 
2427
 * 
 
2428
 */
 
2429
 
 
2430
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_select_none(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
2431
static char __pyx_doc_4h5py_3h5s_7SpaceID_select_none[] = "()\n\n        Deselect entire dataspace.\n        ";
 
2432
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_select_none(PyObject *__pyx_v_self, PyObject *unused) {
 
2433
  PyObject *__pyx_r = NULL;
 
2434
  herr_t __pyx_t_1;
 
2435
  __Pyx_SetupRefcountContext("select_none");
 
2436
 
 
2437
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":408
 
2438
 *         Deselect entire dataspace.
 
2439
 *         """
 
2440
 *         H5Sselect_none(self.id)             # <<<<<<<<<<<<<<
 
2441
 * 
 
2442
 *     @sync
 
2443
 */
 
2444
  __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;}
 
2445
 
 
2446
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2447
  goto __pyx_L0;
 
2448
  __pyx_L1_error:;
 
2449
  __Pyx_AddTraceback("h5py.h5s.SpaceID.select_none");
 
2450
  __pyx_r = NULL;
 
2451
  __pyx_L0:;
 
2452
  __Pyx_XGIVEREF(__pyx_r);
 
2453
  __Pyx_FinishRefcountContext();
 
2454
  return __pyx_r;
 
2455
}
 
2456
 
 
2457
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":411
 
2458
 * 
 
2459
 *     @sync
 
2460
 *     def select_valid(self):             # <<<<<<<<<<<<<<
 
2461
 *         """() => BOOL
 
2462
 * 
 
2463
 */
 
2464
 
 
2465
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_select_valid(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
2466
static char __pyx_doc_4h5py_3h5s_7SpaceID_select_valid[] = "() => BOOL\n        \n        Determine if the current selection falls within\n        the dataspace extent.\n        ";
 
2467
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_select_valid(PyObject *__pyx_v_self, PyObject *unused) {
 
2468
  PyObject *__pyx_r = NULL;
 
2469
  htri_t __pyx_t_1;
 
2470
  PyObject *__pyx_t_2 = NULL;
 
2471
  __Pyx_SetupRefcountContext("select_valid");
 
2472
 
 
2473
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":417
 
2474
 *         the dataspace extent.
 
2475
 *         """
 
2476
 *         return <bint>(H5Sselect_valid(self.id))             # <<<<<<<<<<<<<<
 
2477
 * 
 
2478
 *     # === Point selection functions ===========================================
 
2479
 */
 
2480
  __Pyx_XDECREF(__pyx_r);
 
2481
  __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;}
 
2482
  __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;}
 
2483
  __Pyx_GOTREF(__pyx_t_2);
 
2484
  __pyx_r = __pyx_t_2;
 
2485
  __pyx_t_2 = 0;
 
2486
  goto __pyx_L0;
 
2487
 
 
2488
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2489
  goto __pyx_L0;
 
2490
  __pyx_L1_error:;
 
2491
  __Pyx_XDECREF(__pyx_t_2);
 
2492
  __Pyx_AddTraceback("h5py.h5s.SpaceID.select_valid");
 
2493
  __pyx_r = NULL;
 
2494
  __pyx_L0:;
 
2495
  __Pyx_XGIVEREF(__pyx_r);
 
2496
  __Pyx_FinishRefcountContext();
 
2497
  return __pyx_r;
 
2498
}
 
2499
 
 
2500
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":422
 
2501
 * 
 
2502
 *     @sync
 
2503
 *     def get_select_elem_npoints(self):             # <<<<<<<<<<<<<<
 
2504
 *         """() => LONG npoints
 
2505
 * 
 
2506
 */
 
2507
 
 
2508
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_elem_npoints(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
2509
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        ";
 
2510
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_elem_npoints(PyObject *__pyx_v_self, PyObject *unused) {
 
2511
  PyObject *__pyx_r = NULL;
 
2512
  hssize_t __pyx_t_1;
 
2513
  PyObject *__pyx_t_2 = NULL;
 
2514
  __Pyx_SetupRefcountContext("get_select_elem_npoints");
 
2515
 
 
2516
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":427
 
2517
 *         Determine the number of elements selected in point-selection mode.
 
2518
 *         """
 
2519
 *         return H5Sget_select_elem_npoints(self.id)             # <<<<<<<<<<<<<<
 
2520
 * 
 
2521
 *     @sync
 
2522
 */
 
2523
  __Pyx_XDECREF(__pyx_r);
 
2524
  __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;}
 
2525
  __pyx_t_2 = PyLong_FromLongLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2526
  __Pyx_GOTREF(__pyx_t_2);
 
2527
  __pyx_r = __pyx_t_2;
 
2528
  __pyx_t_2 = 0;
 
2529
  goto __pyx_L0;
 
2530
 
 
2531
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2532
  goto __pyx_L0;
 
2533
  __pyx_L1_error:;
 
2534
  __Pyx_XDECREF(__pyx_t_2);
 
2535
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_select_elem_npoints");
 
2536
  __pyx_r = NULL;
 
2537
  __pyx_L0:;
 
2538
  __Pyx_XGIVEREF(__pyx_r);
 
2539
  __Pyx_FinishRefcountContext();
 
2540
  return __pyx_r;
 
2541
}
 
2542
 
 
2543
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":430
 
2544
 * 
 
2545
 *     @sync
 
2546
 *     def get_select_elem_pointlist(self):             # <<<<<<<<<<<<<<
 
2547
 *         """() => NDARRAY
 
2548
 * 
 
2549
 */
 
2550
 
 
2551
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_elem_pointlist(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
2552
static char __pyx_doc_4h5py_3h5s_7SpaceID_get_select_elem_pointlist[] = "() => NDARRAY\n\n        Get a list of all selected elements.  Return is a Numpy array of\n        unsigned ints, with shape ``(<npoints>, <space rank)``.\n        ";
 
2553
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_elem_pointlist(PyObject *__pyx_v_self, PyObject *unused) {
 
2554
  hsize_t __pyx_v_dims[2];
 
2555
  PyArrayObject *__pyx_v_buf;
 
2556
  PyObject *__pyx_r = NULL;
 
2557
  hssize_t __pyx_t_1;
 
2558
  int __pyx_t_2;
 
2559
  PyObject *__pyx_t_3 = NULL;
 
2560
  herr_t __pyx_t_4;
 
2561
  __Pyx_SetupRefcountContext("get_select_elem_pointlist");
 
2562
  __pyx_v_buf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
 
2563
 
 
2564
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":439
 
2565
 *         cdef ndarray buf
 
2566
 * 
 
2567
 *         dims[0] = H5Sget_select_elem_npoints(self.id)             # <<<<<<<<<<<<<<
 
2568
 *         dims[1] = H5Sget_simple_extent_ndims(self.id)
 
2569
 * 
 
2570
 */
 
2571
  __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;}
 
2572
  (__pyx_v_dims[0]) = __pyx_t_1;
 
2573
 
 
2574
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":440
 
2575
 * 
 
2576
 *         dims[0] = H5Sget_select_elem_npoints(self.id)
 
2577
 *         dims[1] = H5Sget_simple_extent_ndims(self.id)             # <<<<<<<<<<<<<<
 
2578
 * 
 
2579
 *         buf = create_numpy_hsize(2, dims)
 
2580
 */
 
2581
  __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;}
 
2582
  (__pyx_v_dims[1]) = __pyx_t_2;
 
2583
 
 
2584
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":442
 
2585
 *         dims[1] = H5Sget_simple_extent_ndims(self.id)
 
2586
 * 
 
2587
 *         buf = create_numpy_hsize(2, dims)             # <<<<<<<<<<<<<<
 
2588
 * 
 
2589
 *         H5Sget_select_elem_pointlist(self.id, 0, dims[0], <hsize_t*>buf.data)
 
2590
 */
 
2591
  __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;}
 
2592
  __Pyx_GOTREF(__pyx_t_3);
 
2593
  if (!(__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;}
 
2594
  __Pyx_DECREF(((PyObject *)__pyx_v_buf));
 
2595
  __pyx_v_buf = ((PyArrayObject *)__pyx_t_3);
 
2596
  __pyx_t_3 = 0;
 
2597
 
 
2598
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":444
 
2599
 *         buf = create_numpy_hsize(2, dims)
 
2600
 * 
 
2601
 *         H5Sget_select_elem_pointlist(self.id, 0, dims[0], <hsize_t*>buf.data)             # <<<<<<<<<<<<<<
 
2602
 * 
 
2603
 *         return buf
 
2604
 */
 
2605
  __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;}
 
2606
 
 
2607
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":446
 
2608
 *         H5Sget_select_elem_pointlist(self.id, 0, dims[0], <hsize_t*>buf.data)
 
2609
 * 
 
2610
 *         return buf             # <<<<<<<<<<<<<<
 
2611
 * 
 
2612
 *     @sync
 
2613
 */
 
2614
  __Pyx_XDECREF(__pyx_r);
 
2615
  __Pyx_INCREF(((PyObject *)__pyx_v_buf));
 
2616
  __pyx_r = ((PyObject *)__pyx_v_buf);
 
2617
  goto __pyx_L0;
 
2618
 
 
2619
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2620
  goto __pyx_L0;
 
2621
  __pyx_L1_error:;
 
2622
  __Pyx_XDECREF(__pyx_t_3);
 
2623
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_select_elem_pointlist");
 
2624
  __pyx_r = NULL;
 
2625
  __pyx_L0:;
 
2626
  __Pyx_DECREF((PyObject *)__pyx_v_buf);
 
2627
  __Pyx_XGIVEREF(__pyx_r);
 
2628
  __Pyx_FinishRefcountContext();
 
2629
  return __pyx_r;
 
2630
}
 
2631
 
 
2632
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":449
 
2633
 * 
 
2634
 *     @sync
 
2635
 *     def select_elements(self, object coords, int op=H5S_SELECT_SET):             # <<<<<<<<<<<<<<
 
2636
 *         """(SEQUENCE coords, INT op=SELECT_SET)
 
2637
 * 
 
2638
 */
 
2639
 
 
2640
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_select_elements(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
2641
static char __pyx_doc_4h5py_3h5s_7SpaceID_select_elements[] = "(SEQUENCE coords, INT op=SELECT_SET)\n\n        Select elements by specifying coordinates points.  The argument\n        \"coords\" may be an ndarray or any nested sequence which can be\n        converted to an array of uints with the shape::\n\n            (<npoints>, <space rank>)\n        \n        Examples::\n\n            >>> obj.shape\n            (10, 10)\n            >>> obj.select_elements([(1,2), (3,4), (5,9)])\n\n        A zero-length selection (i.e. shape ``(0, <rank>)``) is not allowed\n        by the HDF5 library.  \n        ";
 
2642
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_select_elements(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
2643
  PyObject *__pyx_v_coords = 0;
 
2644
  int __pyx_v_op;
 
2645
  PyArrayObject *__pyx_v_hcoords;
 
2646
  size_t __pyx_v_nelements;
 
2647
  PyObject *__pyx_r = NULL;
 
2648
  PyObject *__pyx_t_1 = NULL;
 
2649
  int __pyx_t_2;
 
2650
  int __pyx_t_3;
 
2651
  PyObject *__pyx_t_4 = NULL;
 
2652
  herr_t __pyx_t_5;
 
2653
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_coords,&__pyx_kp_op,0};
 
2654
  __Pyx_SetupRefcountContext("select_elements");
 
2655
  if (unlikely(__pyx_kwds)) {
 
2656
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
2657
    PyObject* values[2] = {0,0};
 
2658
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
2659
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
2660
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
2661
      case  0: break;
 
2662
      default: goto __pyx_L5_argtuple_error;
 
2663
    }
 
2664
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
2665
      case  0:
 
2666
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_coords);
 
2667
      if (likely(values[0])) kw_args--;
 
2668
      else goto __pyx_L5_argtuple_error;
 
2669
      case  1:
 
2670
      if (kw_args > 1) {
 
2671
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_op);
 
2672
        if (unlikely(value)) { values[1] = value; kw_args--; }
 
2673
      }
 
2674
    }
 
2675
    if (unlikely(kw_args > 0)) {
 
2676
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "select_elements") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2677
    }
 
2678
    __pyx_v_coords = values[0];
 
2679
    if (values[1]) {
 
2680
      __pyx_v_op = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_op == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2681
    } else {
 
2682
      __pyx_v_op = __pyx_k_112;
 
2683
    }
 
2684
  } else {
 
2685
    __pyx_v_op = __pyx_k_112;
 
2686
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
2687
      case  2: __pyx_v_op = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_op == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2688
      case  1: __pyx_v_coords = PyTuple_GET_ITEM(__pyx_args, 0);
 
2689
      break;
 
2690
      default: goto __pyx_L5_argtuple_error;
 
2691
    }
 
2692
  }
 
2693
  goto __pyx_L4_argument_unpacking_done;
 
2694
  __pyx_L5_argtuple_error:;
 
2695
  __Pyx_RaiseArgtupleInvalid("select_elements", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2696
  __pyx_L3_error:;
 
2697
  __Pyx_AddTraceback("h5py.h5s.SpaceID.select_elements");
 
2698
  return NULL;
 
2699
  __pyx_L4_argument_unpacking_done:;
 
2700
  __pyx_v_hcoords = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
 
2701
 
 
2702
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":475
 
2703
 *         # a compatible type and initializing it to the input.
 
2704
 * 
 
2705
 *         hcoords = create_hsize_array(coords)             # <<<<<<<<<<<<<<
 
2706
 * 
 
2707
 *         if hcoords.nd != 2 or hcoords.dimensions[1] != H5Sget_simple_extent_ndims(self.id):
 
2708
 */
 
2709
  __pyx_t_1 = __pyx_f_4h5py_5utils_create_hsize_array(__pyx_v_coords); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2710
  __Pyx_GOTREF(__pyx_t_1);
 
2711
  if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4h5py_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2712
  __Pyx_DECREF(((PyObject *)__pyx_v_hcoords));
 
2713
  __pyx_v_hcoords = ((PyArrayObject *)__pyx_t_1);
 
2714
  __pyx_t_1 = 0;
 
2715
 
 
2716
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":477
 
2717
 *         hcoords = create_hsize_array(coords)
 
2718
 * 
 
2719
 *         if hcoords.nd != 2 or hcoords.dimensions[1] != H5Sget_simple_extent_ndims(self.id):             # <<<<<<<<<<<<<<
 
2720
 *             raise ValueError("Coordinate array must have shape (<npoints>, %d)" % self.get_simple_extent_ndims())
 
2721
 * 
 
2722
 */
 
2723
  if (!(__pyx_v_hcoords->nd != 2)) {
 
2724
    __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 = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2725
    __pyx_t_3 = ((__pyx_v_hcoords->dimensions[1]) != __pyx_t_2);
 
2726
  } else {
 
2727
    __pyx_t_3 = (__pyx_v_hcoords->nd != 2);
 
2728
  }
 
2729
  if (__pyx_t_3) {
 
2730
 
 
2731
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":478
 
2732
 * 
 
2733
 *         if hcoords.nd != 2 or hcoords.dimensions[1] != H5Sget_simple_extent_ndims(self.id):
 
2734
 *             raise ValueError("Coordinate array must have shape (<npoints>, %d)" % self.get_simple_extent_ndims())             # <<<<<<<<<<<<<<
 
2735
 * 
 
2736
 *         nelements = hcoords.dimensions[0]
 
2737
 */
 
2738
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_103); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2739
    __Pyx_GOTREF(__pyx_t_1);
 
2740
    __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2741
    __Pyx_GOTREF(__pyx_t_4);
 
2742
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2743
    __pyx_t_1 = PyNumber_Remainder(__pyx_kp_120, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2744
    __Pyx_GOTREF(__pyx_t_1);
 
2745
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
2746
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2747
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
 
2748
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
 
2749
    __Pyx_GIVEREF(__pyx_t_1);
 
2750
    __pyx_t_1 = 0;
 
2751
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2752
    __Pyx_GOTREF(__pyx_t_1);
 
2753
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
 
2754
    __Pyx_Raise(__pyx_t_1, 0, 0);
 
2755
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
2756
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2757
    goto __pyx_L6;
 
2758
  }
 
2759
  __pyx_L6:;
 
2760
 
 
2761
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":480
 
2762
 *             raise ValueError("Coordinate array must have shape (<npoints>, %d)" % self.get_simple_extent_ndims())
 
2763
 * 
 
2764
 *         nelements = hcoords.dimensions[0]             # <<<<<<<<<<<<<<
 
2765
 * 
 
2766
 *         H5Sselect_elements(self.id, <H5S_seloper_t>op, nelements, <hsize_t**>hcoords.data)
 
2767
 */
 
2768
  __pyx_v_nelements = (__pyx_v_hcoords->dimensions[0]);
 
2769
 
 
2770
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":482
 
2771
 *         nelements = hcoords.dimensions[0]
 
2772
 * 
 
2773
 *         H5Sselect_elements(self.id, <H5S_seloper_t>op, nelements, <hsize_t**>hcoords.data)             # <<<<<<<<<<<<<<
 
2774
 * 
 
2775
 *     # === Hyperslab selection functions =======================================
 
2776
 */
 
2777
  __pyx_t_5 = 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;}
 
2778
 
 
2779
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2780
  goto __pyx_L0;
 
2781
  __pyx_L1_error:;
 
2782
  __Pyx_XDECREF(__pyx_t_1);
 
2783
  __Pyx_XDECREF(__pyx_t_4);
 
2784
  __Pyx_AddTraceback("h5py.h5s.SpaceID.select_elements");
 
2785
  __pyx_r = NULL;
 
2786
  __pyx_L0:;
 
2787
  __Pyx_DECREF((PyObject *)__pyx_v_hcoords);
 
2788
  __Pyx_XGIVEREF(__pyx_r);
 
2789
  __Pyx_FinishRefcountContext();
 
2790
  return __pyx_r;
 
2791
}
 
2792
 
 
2793
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":487
 
2794
 * 
 
2795
 *     @sync
 
2796
 *     def get_select_hyper_nblocks(self):             # <<<<<<<<<<<<<<
 
2797
 *         """() => LONG nblocks
 
2798
 * 
 
2799
 */
 
2800
 
 
2801
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_hyper_nblocks(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
2802
static char __pyx_doc_4h5py_3h5s_7SpaceID_get_select_hyper_nblocks[] = "() => LONG nblocks\n\n        Get the number of hyperslab blocks currently selected.\n        ";
 
2803
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_hyper_nblocks(PyObject *__pyx_v_self, PyObject *unused) {
 
2804
  PyObject *__pyx_r = NULL;
 
2805
  hssize_t __pyx_t_1;
 
2806
  PyObject *__pyx_t_2 = NULL;
 
2807
  __Pyx_SetupRefcountContext("get_select_hyper_nblocks");
 
2808
 
 
2809
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":492
 
2810
 *         Get the number of hyperslab blocks currently selected.
 
2811
 *         """
 
2812
 *         return H5Sget_select_hyper_nblocks(self.id)             # <<<<<<<<<<<<<<
 
2813
 * 
 
2814
 *     @sync
 
2815
 */
 
2816
  __Pyx_XDECREF(__pyx_r);
 
2817
  __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;}
 
2818
  __pyx_t_2 = PyLong_FromLongLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2819
  __Pyx_GOTREF(__pyx_t_2);
 
2820
  __pyx_r = __pyx_t_2;
 
2821
  __pyx_t_2 = 0;
 
2822
  goto __pyx_L0;
 
2823
 
 
2824
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2825
  goto __pyx_L0;
 
2826
  __pyx_L1_error:;
 
2827
  __Pyx_XDECREF(__pyx_t_2);
 
2828
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_select_hyper_nblocks");
 
2829
  __pyx_r = NULL;
 
2830
  __pyx_L0:;
 
2831
  __Pyx_XGIVEREF(__pyx_r);
 
2832
  __Pyx_FinishRefcountContext();
 
2833
  return __pyx_r;
 
2834
}
 
2835
 
 
2836
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":495
 
2837
 * 
 
2838
 *     @sync
 
2839
 *     def get_select_hyper_blocklist(self):             # <<<<<<<<<<<<<<
 
2840
 *         """() => NDARRAY
 
2841
 * 
 
2842
 */
 
2843
 
 
2844
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_hyper_blocklist(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
 
2845
static char __pyx_doc_4h5py_3h5s_7SpaceID_get_select_hyper_blocklist[] = "() => NDARRAY\n\n        Get the current hyperslab selection.  The returned array has shape::\n\n            (<npoints>, 2, <rank>)\n\n        and can be interpreted as a nested sequence::\n\n            [ (corner_coordinate_1, opposite_coordinate_1), ... ]\n\n        with length equal to the total number of blocks.\n        ";
 
2846
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_get_select_hyper_blocklist(PyObject *__pyx_v_self, PyObject *unused) {
 
2847
  hsize_t __pyx_v_dims[3];
 
2848
  PyArrayObject *__pyx_v_buf;
 
2849
  PyObject *__pyx_r = NULL;
 
2850
  hssize_t __pyx_t_1;
 
2851
  int __pyx_t_2;
 
2852
  PyObject *__pyx_t_3 = NULL;
 
2853
  herr_t __pyx_t_4;
 
2854
  __Pyx_SetupRefcountContext("get_select_hyper_blocklist");
 
2855
  __pyx_v_buf = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
 
2856
 
 
2857
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":511
 
2858
 *         cdef ndarray buf
 
2859
 * 
 
2860
 *         dims[0] = H5Sget_select_hyper_nblocks(self.id)             # <<<<<<<<<<<<<<
 
2861
 *         dims[1] = 2
 
2862
 *         dims[2] = H5Sget_simple_extent_ndims(self.id)
 
2863
 */
 
2864
  __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;}
 
2865
  (__pyx_v_dims[0]) = __pyx_t_1;
 
2866
 
 
2867
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":512
 
2868
 * 
 
2869
 *         dims[0] = H5Sget_select_hyper_nblocks(self.id)
 
2870
 *         dims[1] = 2             # <<<<<<<<<<<<<<
 
2871
 *         dims[2] = H5Sget_simple_extent_ndims(self.id)
 
2872
 * 
 
2873
 */
 
2874
  (__pyx_v_dims[1]) = 2;
 
2875
 
 
2876
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":513
 
2877
 *         dims[0] = H5Sget_select_hyper_nblocks(self.id)
 
2878
 *         dims[1] = 2
 
2879
 *         dims[2] = H5Sget_simple_extent_ndims(self.id)             # <<<<<<<<<<<<<<
 
2880
 * 
 
2881
 *         buf = create_numpy_hsize(3, dims)
 
2882
 */
 
2883
  __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;}
 
2884
  (__pyx_v_dims[2]) = __pyx_t_2;
 
2885
 
 
2886
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":515
 
2887
 *         dims[2] = H5Sget_simple_extent_ndims(self.id)
 
2888
 * 
 
2889
 *         buf = create_numpy_hsize(3, dims)             # <<<<<<<<<<<<<<
 
2890
 * 
 
2891
 *         H5Sget_select_hyper_blocklist(self.id, 0, dims[0], <hsize_t*>buf.data)
 
2892
 */
 
2893
  __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;}
 
2894
  __Pyx_GOTREF(__pyx_t_3);
 
2895
  if (!(__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;}
 
2896
  __Pyx_DECREF(((PyObject *)__pyx_v_buf));
 
2897
  __pyx_v_buf = ((PyArrayObject *)__pyx_t_3);
 
2898
  __pyx_t_3 = 0;
 
2899
 
 
2900
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":517
 
2901
 *         buf = create_numpy_hsize(3, dims)
 
2902
 * 
 
2903
 *         H5Sget_select_hyper_blocklist(self.id, 0, dims[0], <hsize_t*>buf.data)             # <<<<<<<<<<<<<<
 
2904
 * 
 
2905
 *         return buf
 
2906
 */
 
2907
  __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;}
 
2908
 
 
2909
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":519
 
2910
 *         H5Sget_select_hyper_blocklist(self.id, 0, dims[0], <hsize_t*>buf.data)
 
2911
 * 
 
2912
 *         return buf             # <<<<<<<<<<<<<<
 
2913
 * 
 
2914
 *     @sync
 
2915
 */
 
2916
  __Pyx_XDECREF(__pyx_r);
 
2917
  __Pyx_INCREF(((PyObject *)__pyx_v_buf));
 
2918
  __pyx_r = ((PyObject *)__pyx_v_buf);
 
2919
  goto __pyx_L0;
 
2920
 
 
2921
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2922
  goto __pyx_L0;
 
2923
  __pyx_L1_error:;
 
2924
  __Pyx_XDECREF(__pyx_t_3);
 
2925
  __Pyx_AddTraceback("h5py.h5s.SpaceID.get_select_hyper_blocklist");
 
2926
  __pyx_r = NULL;
 
2927
  __pyx_L0:;
 
2928
  __Pyx_DECREF((PyObject *)__pyx_v_buf);
 
2929
  __Pyx_XGIVEREF(__pyx_r);
 
2930
  __Pyx_FinishRefcountContext();
 
2931
  return __pyx_r;
 
2932
}
 
2933
 
 
2934
/* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":522
 
2935
 * 
 
2936
 *     @sync
 
2937
 *     def select_hyperslab(self, object start, object count, object stride=None,             # <<<<<<<<<<<<<<
 
2938
 *                          object block=None, int op=H5S_SELECT_SET):
 
2939
 *         """(TUPLE start, TUPLE count, TUPLE stride=None, TUPLE block=None,
 
2940
 */
 
2941
 
 
2942
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_select_hyperslab(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
2943
static char __pyx_doc_4h5py_3h5s_7SpaceID_select_hyperslab[] = "(TUPLE start, TUPLE count, TUPLE stride=None, TUPLE block=None, \n             INT op=SELECT_SET)\n     \n        Select a block region from an existing dataspace.  See the HDF5\n        documentation for the meaning of the \"block\" and \"op\" keywords.\n        ";
 
2944
static PyObject *__pyx_pf_4h5py_3h5s_7SpaceID_select_hyperslab(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
2945
  PyObject *__pyx_v_start = 0;
 
2946
  PyObject *__pyx_v_count = 0;
 
2947
  PyObject *__pyx_v_stride = 0;
 
2948
  PyObject *__pyx_v_block = 0;
 
2949
  int __pyx_v_op;
 
2950
  int __pyx_v_rank;
 
2951
  hsize_t *__pyx_v_start_array;
 
2952
  hsize_t *__pyx_v_count_array;
 
2953
  hsize_t *__pyx_v_stride_array;
 
2954
  hsize_t *__pyx_v_block_array;
 
2955
  PyObject *__pyx_r = NULL;
 
2956
  int __pyx_t_1;
 
2957
  void *__pyx_t_2;
 
2958
  int __pyx_t_3;
 
2959
  herr_t __pyx_t_4;
 
2960
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_start,&__pyx_kp_count,&__pyx_kp_stride,&__pyx_kp_block,&__pyx_kp_op,0};
 
2961
  __Pyx_SetupRefcountContext("select_hyperslab");
 
2962
  if (unlikely(__pyx_kwds)) {
 
2963
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
2964
    PyObject* values[5] = {0,0,0,0,0};
 
2965
    values[2] = Py_None;
 
2966
    values[3] = Py_None;
 
2967
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
2968
      case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
 
2969
      case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
 
2970
      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
2971
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
2972
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
2973
      case  0: break;
 
2974
      default: goto __pyx_L5_argtuple_error;
 
2975
    }
 
2976
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
2977
      case  0:
 
2978
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_start);
 
2979
      if (likely(values[0])) kw_args--;
 
2980
      else goto __pyx_L5_argtuple_error;
 
2981
      case  1:
 
2982
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_count);
 
2983
      if (likely(values[1])) kw_args--;
 
2984
      else {
 
2985
        __Pyx_RaiseArgtupleInvalid("select_hyperslab", 0, 2, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2986
      }
 
2987
      case  2:
 
2988
      if (kw_args > 1) {
 
2989
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_stride);
 
2990
        if (unlikely(value)) { values[2] = value; kw_args--; }
 
2991
      }
 
2992
      case  3:
 
2993
      if (kw_args > 1) {
 
2994
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_block);
 
2995
        if (unlikely(value)) { values[3] = value; kw_args--; }
 
2996
      }
 
2997
      case  4:
 
2998
      if (kw_args > 1) {
 
2999
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_op);
 
3000
        if (unlikely(value)) { values[4] = value; kw_args--; }
 
3001
      }
 
3002
    }
 
3003
    if (unlikely(kw_args > 0)) {
 
3004
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "select_hyperslab") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
3005
    }
 
3006
    __pyx_v_start = values[0];
 
3007
    __pyx_v_count = values[1];
 
3008
    __pyx_v_stride = values[2];
 
3009
    __pyx_v_block = values[3];
 
3010
    if (values[4]) {
 
3011
      __pyx_v_op = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_op == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
3012
    } else {
 
3013
      __pyx_v_op = __pyx_k_113;
 
3014
    }
 
3015
  } else {
 
3016
    __pyx_v_stride = Py_None;
 
3017
    __pyx_v_block = Py_None;
 
3018
    __pyx_v_op = __pyx_k_113;
 
3019
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
3020
      case  5:
 
3021
      __pyx_v_op = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely((__pyx_v_op == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
3022
      case  4:
 
3023
      __pyx_v_block = PyTuple_GET_ITEM(__pyx_args, 3);
 
3024
      case  3:
 
3025
      __pyx_v_stride = PyTuple_GET_ITEM(__pyx_args, 2);
 
3026
      case  2:
 
3027
      __pyx_v_count = PyTuple_GET_ITEM(__pyx_args, 1);
 
3028
      __pyx_v_start = PyTuple_GET_ITEM(__pyx_args, 0);
 
3029
      break;
 
3030
      default: goto __pyx_L5_argtuple_error;
 
3031
    }
 
3032
  }
 
3033
  goto __pyx_L4_argument_unpacking_done;
 
3034
  __pyx_L5_argtuple_error:;
 
3035
  __Pyx_RaiseArgtupleInvalid("select_hyperslab", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
3036
  __pyx_L3_error:;
 
3037
  __Pyx_AddTraceback("h5py.h5s.SpaceID.select_hyperslab");
 
3038
  return NULL;
 
3039
  __pyx_L4_argument_unpacking_done:;
 
3040
 
 
3041
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":531
 
3042
 *         """
 
3043
 *         cdef int rank
 
3044
 *         cdef hsize_t* start_array = NULL             # <<<<<<<<<<<<<<
 
3045
 *         cdef hsize_t* count_array = NULL
 
3046
 *         cdef hsize_t* stride_array = NULL
 
3047
 */
 
3048
  __pyx_v_start_array = NULL;
 
3049
 
 
3050
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":532
 
3051
 *         cdef int rank
 
3052
 *         cdef hsize_t* start_array = NULL
 
3053
 *         cdef hsize_t* count_array = NULL             # <<<<<<<<<<<<<<
 
3054
 *         cdef hsize_t* stride_array = NULL
 
3055
 *         cdef hsize_t* block_array = NULL
 
3056
 */
 
3057
  __pyx_v_count_array = NULL;
 
3058
 
 
3059
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":533
 
3060
 *         cdef hsize_t* start_array = NULL
 
3061
 *         cdef hsize_t* count_array = NULL
 
3062
 *         cdef hsize_t* stride_array = NULL             # <<<<<<<<<<<<<<
 
3063
 *         cdef hsize_t* block_array = NULL
 
3064
 * 
 
3065
 */
 
3066
  __pyx_v_stride_array = NULL;
 
3067
 
 
3068
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":534
 
3069
 *         cdef hsize_t* count_array = NULL
 
3070
 *         cdef hsize_t* stride_array = NULL
 
3071
 *         cdef hsize_t* block_array = NULL             # <<<<<<<<<<<<<<
 
3072
 * 
 
3073
 *         # Dataspace rank.  All provided tuples must match this.
 
3074
 */
 
3075
  __pyx_v_block_array = NULL;
 
3076
 
 
3077
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":537
 
3078
 * 
 
3079
 *         # Dataspace rank.  All provided tuples must match this.
 
3080
 *         rank = H5Sget_simple_extent_ndims(self.id)             # <<<<<<<<<<<<<<
 
3081
 * 
 
3082
 *         require_tuple(start, 0, rank, "start")
 
3083
 */
 
3084
  __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;}
 
3085
  __pyx_v_rank = __pyx_t_1;
 
3086
 
 
3087
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":539
 
3088
 *         rank = H5Sget_simple_extent_ndims(self.id)
 
3089
 * 
 
3090
 *         require_tuple(start, 0, rank, "start")             # <<<<<<<<<<<<<<
 
3091
 *         require_tuple(count, 0, rank, "count")
 
3092
 *         require_tuple(stride, 1, rank, "stride")
 
3093
 */
 
3094
  __pyx_t_1 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_start, 0, __pyx_v_rank, __pyx_k_121); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3095
 
 
3096
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":540
 
3097
 * 
 
3098
 *         require_tuple(start, 0, rank, "start")
 
3099
 *         require_tuple(count, 0, rank, "count")             # <<<<<<<<<<<<<<
 
3100
 *         require_tuple(stride, 1, rank, "stride")
 
3101
 *         require_tuple(block, 1, rank, "block")
 
3102
 */
 
3103
  __pyx_t_1 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_count, 0, __pyx_v_rank, __pyx_k_122); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3104
 
 
3105
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":541
 
3106
 *         require_tuple(start, 0, rank, "start")
 
3107
 *         require_tuple(count, 0, rank, "count")
 
3108
 *         require_tuple(stride, 1, rank, "stride")             # <<<<<<<<<<<<<<
 
3109
 *         require_tuple(block, 1, rank, "block")
 
3110
 * 
 
3111
 */
 
3112
  __pyx_t_1 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_stride, 1, __pyx_v_rank, __pyx_k_123); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3113
 
 
3114
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":542
 
3115
 *         require_tuple(count, 0, rank, "count")
 
3116
 *         require_tuple(stride, 1, rank, "stride")
 
3117
 *         require_tuple(block, 1, rank, "block")             # <<<<<<<<<<<<<<
 
3118
 * 
 
3119
 *         try:
 
3120
 */
 
3121
  __pyx_t_1 = __pyx_f_4h5py_5utils_require_tuple(__pyx_v_block, 1, __pyx_v_rank, __pyx_k_124); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3122
 
 
3123
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":544
 
3124
 *         require_tuple(block, 1, rank, "block")
 
3125
 * 
 
3126
 *         try:             # <<<<<<<<<<<<<<
 
3127
 *             start_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
3128
 *             count_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
3129
 */
 
3130
  /*try:*/ {
 
3131
 
 
3132
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":545
 
3133
 * 
 
3134
 *         try:
 
3135
 *             start_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
 
3136
 *             count_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
3137
 *             convert_tuple(start, start_array, rank)
 
3138
 */
 
3139
    __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;}
 
3140
    __pyx_v_start_array = ((hsize_t *)__pyx_t_2);
 
3141
 
 
3142
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":546
 
3143
 *         try:
 
3144
 *             start_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
3145
 *             count_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
 
3146
 *             convert_tuple(start, start_array, rank)
 
3147
 *             convert_tuple(count, count_array, rank)
 
3148
 */
 
3149
    __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;}
 
3150
    __pyx_v_count_array = ((hsize_t *)__pyx_t_2);
 
3151
 
 
3152
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":547
 
3153
 *             start_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
3154
 *             count_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
3155
 *             convert_tuple(start, start_array, rank)             # <<<<<<<<<<<<<<
 
3156
 *             convert_tuple(count, count_array, rank)
 
3157
 * 
 
3158
 */
 
3159
    __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;}
 
3160
 
 
3161
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":548
 
3162
 *             count_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
3163
 *             convert_tuple(start, start_array, rank)
 
3164
 *             convert_tuple(count, count_array, rank)             # <<<<<<<<<<<<<<
 
3165
 * 
 
3166
 *             if stride is not None:
 
3167
 */
 
3168
    __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;}
 
3169
 
 
3170
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":550
 
3171
 *             convert_tuple(count, count_array, rank)
 
3172
 * 
 
3173
 *             if stride is not None:             # <<<<<<<<<<<<<<
 
3174
 *                 stride_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
3175
 *                 convert_tuple(stride, stride_array, rank)
 
3176
 */
 
3177
    __pyx_t_3 = (__pyx_v_stride != Py_None);
 
3178
    if (__pyx_t_3) {
 
3179
 
 
3180
      /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":551
 
3181
 * 
 
3182
 *             if stride is not None:
 
3183
 *                 stride_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
 
3184
 *                 convert_tuple(stride, stride_array, rank)
 
3185
 *             if block is not None:
 
3186
 */
 
3187
      __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;}
 
3188
      __pyx_v_stride_array = ((hsize_t *)__pyx_t_2);
 
3189
 
 
3190
      /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":552
 
3191
 *             if stride is not None:
 
3192
 *                 stride_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
3193
 *                 convert_tuple(stride, stride_array, rank)             # <<<<<<<<<<<<<<
 
3194
 *             if block is not None:
 
3195
 *                 block_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
3196
 */
 
3197
      __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;}
 
3198
      goto __pyx_L9;
 
3199
    }
 
3200
    __pyx_L9:;
 
3201
 
 
3202
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":553
 
3203
 *                 stride_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
3204
 *                 convert_tuple(stride, stride_array, rank)
 
3205
 *             if block is not None:             # <<<<<<<<<<<<<<
 
3206
 *                 block_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
3207
 *                 convert_tuple(block, block_array, rank)
 
3208
 */
 
3209
    __pyx_t_3 = (__pyx_v_block != Py_None);
 
3210
    if (__pyx_t_3) {
 
3211
 
 
3212
      /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":554
 
3213
 *                 convert_tuple(stride, stride_array, rank)
 
3214
 *             if block is not None:
 
3215
 *                 block_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)             # <<<<<<<<<<<<<<
 
3216
 *                 convert_tuple(block, block_array, rank)
 
3217
 * 
 
3218
 */
 
3219
      __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;}
 
3220
      __pyx_v_block_array = ((hsize_t *)__pyx_t_2);
 
3221
 
 
3222
      /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":555
 
3223
 *             if block is not None:
 
3224
 *                 block_array = <hsize_t*>emalloc(sizeof(hsize_t)*rank)
 
3225
 *                 convert_tuple(block, block_array, rank)             # <<<<<<<<<<<<<<
 
3226
 * 
 
3227
 *             H5Sselect_hyperslab(self.id, <H5S_seloper_t>op, start_array,
 
3228
 */
 
3229
      __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;}
 
3230
      goto __pyx_L10;
 
3231
    }
 
3232
    __pyx_L10:;
 
3233
 
 
3234
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":558
 
3235
 * 
 
3236
 *             H5Sselect_hyperslab(self.id, <H5S_seloper_t>op, start_array,
 
3237
 *                                          stride_array, count_array, block_array)             # <<<<<<<<<<<<<<
 
3238
 * 
 
3239
 *         finally:
 
3240
 */
 
3241
    __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;}
 
3242
  }
 
3243
  /*finally:*/ {
 
3244
    int __pyx_why;
 
3245
    PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
 
3246
    int __pyx_exc_lineno;
 
3247
    __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
 
3248
    __pyx_why = 0; goto __pyx_L8;
 
3249
    __pyx_L7: {
 
3250
      __pyx_why = 4;
 
3251
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
 
3252
      __pyx_exc_lineno = __pyx_lineno;
 
3253
      goto __pyx_L8;
 
3254
    }
 
3255
    __pyx_L8:;
 
3256
 
 
3257
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":561
 
3258
 * 
 
3259
 *         finally:
 
3260
 *             efree(start_array)             # <<<<<<<<<<<<<<
 
3261
 *             efree(count_array)
 
3262
 *             efree(stride_array)
 
3263
 */
 
3264
    __pyx_f_4h5py_5utils_efree(__pyx_v_start_array);
 
3265
 
 
3266
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":562
 
3267
 *         finally:
 
3268
 *             efree(start_array)
 
3269
 *             efree(count_array)             # <<<<<<<<<<<<<<
 
3270
 *             efree(stride_array)
 
3271
 *             efree(block_array)
 
3272
 */
 
3273
    __pyx_f_4h5py_5utils_efree(__pyx_v_count_array);
 
3274
 
 
3275
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":563
 
3276
 *             efree(start_array)
 
3277
 *             efree(count_array)
 
3278
 *             efree(stride_array)             # <<<<<<<<<<<<<<
 
3279
 *             efree(block_array)
 
3280
 * 
 
3281
 */
 
3282
    __pyx_f_4h5py_5utils_efree(__pyx_v_stride_array);
 
3283
 
 
3284
    /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":564
 
3285
 *             efree(count_array)
 
3286
 *             efree(stride_array)
 
3287
 *             efree(block_array)             # <<<<<<<<<<<<<<
 
3288
 * 
 
3289
 * 
 
3290
 */
 
3291
    __pyx_f_4h5py_5utils_efree(__pyx_v_block_array);
 
3292
    switch (__pyx_why) {
 
3293
      case 4: {
 
3294
        __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
 
3295
        __pyx_lineno = __pyx_exc_lineno;
 
3296
        __pyx_exc_type = 0;
 
3297
        __pyx_exc_value = 0;
 
3298
        __pyx_exc_tb = 0;
 
3299
        goto __pyx_L1_error;
 
3300
      }
 
3301
    }
 
3302
  }
 
3303
 
 
3304
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
3305
  goto __pyx_L0;
 
3306
  __pyx_L1_error:;
 
3307
  __Pyx_AddTraceback("h5py.h5s.SpaceID.select_hyperslab");
 
3308
  __pyx_r = NULL;
 
3309
  __pyx_L0:;
 
3310
  __Pyx_XGIVEREF(__pyx_r);
 
3311
  __Pyx_FinishRefcountContext();
 
3312
  return __pyx_r;
 
3313
}
 
3314
 
 
3315
/* "/home/tachyon/pydev/h5py/h5py/h5.pxd":42
 
3316
 * 
 
3317
 *     cdef object __weakref__
 
3318
 *     cdef readonly hid_t id             # <<<<<<<<<<<<<<
 
3319
 *     cdef readonly int _locked
 
3320
 *     cdef object _hash
 
3321
 */
 
3322
 
 
3323
static PyObject *__pyx_pf_4h5py_2h5_8ObjectID_2id___get__(PyObject *__pyx_v_self); /*proto*/
 
3324
static PyObject *__pyx_pf_4h5py_2h5_8ObjectID_2id___get__(PyObject *__pyx_v_self) {
 
3325
  PyObject *__pyx_r = NULL;
 
3326
  PyObject *__pyx_t_1 = NULL;
 
3327
  __Pyx_SetupRefcountContext("__get__");
 
3328
  __Pyx_XDECREF(__pyx_r);
 
3329
  __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_4h5py_2h5_ObjectID *)__pyx_v_self)->id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3330
  __Pyx_GOTREF(__pyx_t_1);
 
3331
  __pyx_r = __pyx_t_1;
 
3332
  __pyx_t_1 = 0;
 
3333
  goto __pyx_L0;
 
3334
 
 
3335
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
3336
  goto __pyx_L0;
 
3337
  __pyx_L1_error:;
 
3338
  __Pyx_XDECREF(__pyx_t_1);
 
3339
  __Pyx_AddTraceback("h5py.h5.ObjectID.id.__get__");
 
3340
  __pyx_r = NULL;
 
3341
  __pyx_L0:;
 
3342
  __Pyx_XGIVEREF(__pyx_r);
 
3343
  __Pyx_FinishRefcountContext();
 
3344
  return __pyx_r;
 
3345
}
 
3346
 
 
3347
static PyObject *__pyx_tp_new_4h5py_3h5s_SpaceID(PyTypeObject *t, PyObject *a, PyObject *k) {
 
3348
  PyObject *o = __pyx_ptype_4h5py_2h5_ObjectID->tp_new(t, a, k);
 
3349
  if (!o) return 0;
 
3350
  return o;
 
3351
}
 
3352
 
 
3353
static void __pyx_tp_dealloc_4h5py_3h5s_SpaceID(PyObject *o) {
 
3354
  __pyx_ptype_4h5py_2h5_ObjectID->tp_dealloc(o);
 
3355
}
 
3356
 
 
3357
static int __pyx_tp_traverse_4h5py_3h5s_SpaceID(PyObject *o, visitproc v, void *a) {
 
3358
  int e;
 
3359
  if (__pyx_ptype_4h5py_2h5_ObjectID->tp_traverse) {
 
3360
    e = __pyx_ptype_4h5py_2h5_ObjectID->tp_traverse(o, v, a); if (e) return e;
 
3361
  }
 
3362
  return 0;
 
3363
}
 
3364
 
 
3365
static int __pyx_tp_clear_4h5py_3h5s_SpaceID(PyObject *o) {
 
3366
  if (__pyx_ptype_4h5py_2h5_ObjectID->tp_clear) {
 
3367
    __pyx_ptype_4h5py_2h5_ObjectID->tp_clear(o);
 
3368
  }
 
3369
  return 0;
 
3370
}
 
3371
 
 
3372
static PyObject *__pyx_getprop_4h5py_3h5s_7SpaceID_shape(PyObject *o, void *x) {
 
3373
  return __pyx_pf_4h5py_3h5s_7SpaceID_5shape___get__(o);
 
3374
}
 
3375
 
 
3376
static struct PyMethodDef __pyx_methods_4h5py_3h5s_SpaceID[] = {
 
3377
  {__Pyx_NAMESTR("_close"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID__close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID__close)},
 
3378
  {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_copy)},
 
3379
  {__Pyx_NAMESTR("is_simple"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_is_simple, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_is_simple)},
 
3380
  {__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)},
 
3381
  {__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)},
 
3382
  {__Pyx_NAMESTR("get_simple_extent_dims"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_get_simple_extent_dims, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_get_simple_extent_dims)},
 
3383
  {__Pyx_NAMESTR("get_simple_extent_npoints"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_get_simple_extent_npoints, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_get_simple_extent_npoints)},
 
3384
  {__Pyx_NAMESTR("get_simple_extent_type"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_get_simple_extent_type, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_get_simple_extent_type)},
 
3385
  {__Pyx_NAMESTR("extent_copy"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_extent_copy, METH_O, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_extent_copy)},
 
3386
  {__Pyx_NAMESTR("set_extent_simple"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_set_extent_simple, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_set_extent_simple)},
 
3387
  {__Pyx_NAMESTR("set_extent_none"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_set_extent_none, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_set_extent_none)},
 
3388
  {__Pyx_NAMESTR("get_select_type"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_get_select_type, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_get_select_type)},
 
3389
  {__Pyx_NAMESTR("get_select_npoints"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_get_select_npoints, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_get_select_npoints)},
 
3390
  {__Pyx_NAMESTR("get_select_bounds"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_get_select_bounds, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_get_select_bounds)},
 
3391
  {__Pyx_NAMESTR("select_all"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_select_all, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_select_all)},
 
3392
  {__Pyx_NAMESTR("select_none"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_select_none, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_select_none)},
 
3393
  {__Pyx_NAMESTR("select_valid"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_select_valid, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_select_valid)},
 
3394
  {__Pyx_NAMESTR("get_select_elem_npoints"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_get_select_elem_npoints, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_get_select_elem_npoints)},
 
3395
  {__Pyx_NAMESTR("get_select_elem_pointlist"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_get_select_elem_pointlist, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_get_select_elem_pointlist)},
 
3396
  {__Pyx_NAMESTR("select_elements"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_select_elements, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_select_elements)},
 
3397
  {__Pyx_NAMESTR("get_select_hyper_nblocks"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_get_select_hyper_nblocks, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_get_select_hyper_nblocks)},
 
3398
  {__Pyx_NAMESTR("get_select_hyper_blocklist"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_get_select_hyper_blocklist, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_get_select_hyper_blocklist)},
 
3399
  {__Pyx_NAMESTR("select_hyperslab"), (PyCFunction)__pyx_pf_4h5py_3h5s_7SpaceID_select_hyperslab, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_7SpaceID_select_hyperslab)},
 
3400
  {0, 0, 0, 0}
 
3401
};
 
3402
 
 
3403
static struct PyGetSetDef __pyx_getsets_4h5py_3h5s_SpaceID[] = {
 
3404
  {(char *)"shape", __pyx_getprop_4h5py_3h5s_7SpaceID_shape, 0, __pyx_k_102, 0},
 
3405
  {0, 0, 0, 0, 0}
 
3406
};
 
3407
 
 
3408
static PyNumberMethods __pyx_tp_as_number_SpaceID = {
 
3409
  0, /*nb_add*/
 
3410
  0, /*nb_subtract*/
 
3411
  0, /*nb_multiply*/
 
3412
  #if PY_MAJOR_VERSION < 3
 
3413
  0, /*nb_divide*/
 
3414
  #endif
 
3415
  0, /*nb_remainder*/
 
3416
  0, /*nb_divmod*/
 
3417
  0, /*nb_power*/
 
3418
  0, /*nb_negative*/
 
3419
  0, /*nb_positive*/
 
3420
  0, /*nb_absolute*/
 
3421
  0, /*nb_nonzero*/
 
3422
  0, /*nb_invert*/
 
3423
  0, /*nb_lshift*/
 
3424
  0, /*nb_rshift*/
 
3425
  0, /*nb_and*/
 
3426
  0, /*nb_xor*/
 
3427
  0, /*nb_or*/
 
3428
  #if PY_MAJOR_VERSION < 3
 
3429
  0, /*nb_coerce*/
 
3430
  #endif
 
3431
  0, /*nb_int*/
 
3432
  #if PY_MAJOR_VERSION >= 3
 
3433
  0, /*reserved*/
 
3434
  #else
 
3435
  0, /*nb_long*/
 
3436
  #endif
 
3437
  0, /*nb_float*/
 
3438
  #if PY_MAJOR_VERSION < 3
 
3439
  0, /*nb_oct*/
 
3440
  #endif
 
3441
  #if PY_MAJOR_VERSION < 3
 
3442
  0, /*nb_hex*/
 
3443
  #endif
 
3444
  0, /*nb_inplace_add*/
 
3445
  0, /*nb_inplace_subtract*/
 
3446
  0, /*nb_inplace_multiply*/
 
3447
  #if PY_MAJOR_VERSION < 3
 
3448
  0, /*nb_inplace_divide*/
 
3449
  #endif
 
3450
  0, /*nb_inplace_remainder*/
 
3451
  0, /*nb_inplace_power*/
 
3452
  0, /*nb_inplace_lshift*/
 
3453
  0, /*nb_inplace_rshift*/
 
3454
  0, /*nb_inplace_and*/
 
3455
  0, /*nb_inplace_xor*/
 
3456
  0, /*nb_inplace_or*/
 
3457
  0, /*nb_floor_divide*/
 
3458
  0, /*nb_true_divide*/
 
3459
  0, /*nb_inplace_floor_divide*/
 
3460
  0, /*nb_inplace_true_divide*/
 
3461
  #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
 
3462
  0, /*nb_index*/
 
3463
  #endif
 
3464
};
 
3465
 
 
3466
static PySequenceMethods __pyx_tp_as_sequence_SpaceID = {
 
3467
  0, /*sq_length*/
 
3468
  0, /*sq_concat*/
 
3469
  0, /*sq_repeat*/
 
3470
  0, /*sq_item*/
 
3471
  0, /*sq_slice*/
 
3472
  0, /*sq_ass_item*/
 
3473
  0, /*sq_ass_slice*/
 
3474
  0, /*sq_contains*/
 
3475
  0, /*sq_inplace_concat*/
 
3476
  0, /*sq_inplace_repeat*/
 
3477
};
 
3478
 
 
3479
static PyMappingMethods __pyx_tp_as_mapping_SpaceID = {
 
3480
  0, /*mp_length*/
 
3481
  0, /*mp_subscript*/
 
3482
  0, /*mp_ass_subscript*/
 
3483
};
 
3484
 
 
3485
static PyBufferProcs __pyx_tp_as_buffer_SpaceID = {
 
3486
  #if PY_MAJOR_VERSION < 3
 
3487
  0, /*bf_getreadbuffer*/
 
3488
  #endif
 
3489
  #if PY_MAJOR_VERSION < 3
 
3490
  0, /*bf_getwritebuffer*/
 
3491
  #endif
 
3492
  #if PY_MAJOR_VERSION < 3
 
3493
  0, /*bf_getsegcount*/
 
3494
  #endif
 
3495
  #if PY_MAJOR_VERSION < 3
 
3496
  0, /*bf_getcharbuffer*/
 
3497
  #endif
 
3498
  #if PY_VERSION_HEX >= 0x02060000
 
3499
  0, /*bf_getbuffer*/
 
3500
  #endif
 
3501
  #if PY_VERSION_HEX >= 0x02060000
 
3502
  0, /*bf_releasebuffer*/
 
3503
  #endif
 
3504
};
 
3505
 
 
3506
PyTypeObject __pyx_type_4h5py_3h5s_SpaceID = {
 
3507
  PyVarObject_HEAD_INIT(0, 0)
 
3508
  __Pyx_NAMESTR("h5py.h5s.SpaceID"), /*tp_name*/
 
3509
  sizeof(struct __pyx_obj_4h5py_3h5s_SpaceID), /*tp_basicsize*/
 
3510
  0, /*tp_itemsize*/
 
3511
  __pyx_tp_dealloc_4h5py_3h5s_SpaceID, /*tp_dealloc*/
 
3512
  0, /*tp_print*/
 
3513
  0, /*tp_getattr*/
 
3514
  0, /*tp_setattr*/
 
3515
  0, /*tp_compare*/
 
3516
  0, /*tp_repr*/
 
3517
  &__pyx_tp_as_number_SpaceID, /*tp_as_number*/
 
3518
  &__pyx_tp_as_sequence_SpaceID, /*tp_as_sequence*/
 
3519
  &__pyx_tp_as_mapping_SpaceID, /*tp_as_mapping*/
 
3520
  0, /*tp_hash*/
 
3521
  0, /*tp_call*/
 
3522
  0, /*tp_str*/
 
3523
  0, /*tp_getattro*/
 
3524
  0, /*tp_setattro*/
 
3525
  &__pyx_tp_as_buffer_SpaceID, /*tp_as_buffer*/
 
3526
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
 
3527
  __Pyx_DOCSTR("\n        Represents a dataspace identifier.\n\n        Properties:\n\n        shape\n            Numpy-style shape tuple with dimensions.\n\n        * Hashable: No\n        * Equality: Unimplemented\n\n        Can be pickled if HDF5 1.8 is available.\n    "), /*tp_doc*/
 
3528
  __pyx_tp_traverse_4h5py_3h5s_SpaceID, /*tp_traverse*/
 
3529
  __pyx_tp_clear_4h5py_3h5s_SpaceID, /*tp_clear*/
 
3530
  0, /*tp_richcompare*/
 
3531
  0, /*tp_weaklistoffset*/
 
3532
  0, /*tp_iter*/
 
3533
  0, /*tp_iternext*/
 
3534
  __pyx_methods_4h5py_3h5s_SpaceID, /*tp_methods*/
 
3535
  0, /*tp_members*/
 
3536
  __pyx_getsets_4h5py_3h5s_SpaceID, /*tp_getset*/
 
3537
  0, /*tp_base*/
 
3538
  0, /*tp_dict*/
 
3539
  0, /*tp_descr_get*/
 
3540
  0, /*tp_descr_set*/
 
3541
  0, /*tp_dictoffset*/
 
3542
  0, /*tp_init*/
 
3543
  0, /*tp_alloc*/
 
3544
  __pyx_tp_new_4h5py_3h5s_SpaceID, /*tp_new*/
 
3545
  0, /*tp_free*/
 
3546
  0, /*tp_is_gc*/
 
3547
  0, /*tp_bases*/
 
3548
  0, /*tp_mro*/
 
3549
  0, /*tp_cache*/
 
3550
  0, /*tp_subclasses*/
 
3551
  0, /*tp_weaklist*/
 
3552
};
 
3553
 
 
3554
static struct PyMethodDef __pyx_methods[] = {
 
3555
  {__Pyx_NAMESTR("create"), (PyCFunction)__pyx_pf_4h5py_3h5s_create, METH_O, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_create)},
 
3556
  {__Pyx_NAMESTR("create_simple"), (PyCFunction)__pyx_pf_4h5py_3h5s_create_simple, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5s_create_simple)},
 
3557
  {0, 0, 0, 0}
 
3558
};
 
3559
 
 
3560
static void __pyx_init_filenames(void); /*proto*/
 
3561
 
 
3562
#if PY_MAJOR_VERSION >= 3
 
3563
static struct PyModuleDef __pyx_moduledef = {
 
3564
    PyModuleDef_HEAD_INIT,
 
3565
    __Pyx_NAMESTR("h5s"),
 
3566
    0, /* m_doc */
 
3567
    -1, /* m_size */
 
3568
    __pyx_methods /* m_methods */,
 
3569
    NULL, /* m_reload */
 
3570
    NULL, /* m_traverse */
 
3571
    NULL, /* m_clear */
 
3572
    NULL /* m_free */
 
3573
};
 
3574
#endif
 
3575
 
 
3576
static __Pyx_StringTabEntry __pyx_string_tab[] = {
 
3577
  {&__pyx_kp___main__, __pyx_k___main__, sizeof(__pyx_k___main__), 1, 1, 1},
 
3578
  {&__pyx_kp__close, __pyx_k__close, sizeof(__pyx_k__close), 1, 1, 1},
 
3579
  {&__pyx_kp_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 1, 1, 1},
 
3580
  {&__pyx_kp_is_simple, __pyx_k_is_simple, sizeof(__pyx_k_is_simple), 1, 1, 1},
 
3581
  {&__pyx_kp_offset_simple, __pyx_k_offset_simple, sizeof(__pyx_k_offset_simple), 1, 1, 1},
 
3582
  {&__pyx_kp_103, __pyx_k_103, sizeof(__pyx_k_103), 1, 1, 1},
 
3583
  {&__pyx_kp_104, __pyx_k_104, sizeof(__pyx_k_104), 1, 1, 1},
 
3584
  {&__pyx_kp_105, __pyx_k_105, sizeof(__pyx_k_105), 1, 1, 1},
 
3585
  {&__pyx_kp_106, __pyx_k_106, sizeof(__pyx_k_106), 1, 1, 1},
 
3586
  {&__pyx_kp_extent_copy, __pyx_k_extent_copy, sizeof(__pyx_k_extent_copy), 1, 1, 1},
 
3587
  {&__pyx_kp_set_extent_simple, __pyx_k_set_extent_simple, sizeof(__pyx_k_set_extent_simple), 1, 1, 1},
 
3588
  {&__pyx_kp_set_extent_none, __pyx_k_set_extent_none, sizeof(__pyx_k_set_extent_none), 1, 1, 1},
 
3589
  {&__pyx_kp_get_select_type, __pyx_k_get_select_type, sizeof(__pyx_k_get_select_type), 1, 1, 1},
 
3590
  {&__pyx_kp_get_select_npoints, __pyx_k_get_select_npoints, sizeof(__pyx_k_get_select_npoints), 1, 1, 1},
 
3591
  {&__pyx_kp_get_select_bounds, __pyx_k_get_select_bounds, sizeof(__pyx_k_get_select_bounds), 1, 1, 1},
 
3592
  {&__pyx_kp_select_all, __pyx_k_select_all, sizeof(__pyx_k_select_all), 1, 1, 1},
 
3593
  {&__pyx_kp_select_none, __pyx_k_select_none, sizeof(__pyx_k_select_none), 1, 1, 1},
 
3594
  {&__pyx_kp_select_valid, __pyx_k_select_valid, sizeof(__pyx_k_select_valid), 1, 1, 1},
 
3595
  {&__pyx_kp_107, __pyx_k_107, sizeof(__pyx_k_107), 1, 1, 1},
 
3596
  {&__pyx_kp_108, __pyx_k_108, sizeof(__pyx_k_108), 1, 1, 1},
 
3597
  {&__pyx_kp_select_elements, __pyx_k_select_elements, sizeof(__pyx_k_select_elements), 1, 1, 1},
 
3598
  {&__pyx_kp_109, __pyx_k_109, sizeof(__pyx_k_109), 1, 1, 1},
 
3599
  {&__pyx_kp_110, __pyx_k_110, sizeof(__pyx_k_110), 1, 1, 1},
 
3600
  {&__pyx_kp_select_hyperslab, __pyx_k_select_hyperslab, sizeof(__pyx_k_select_hyperslab), 1, 1, 1},
 
3601
  {&__pyx_kp_class_code, __pyx_k_class_code, sizeof(__pyx_k_class_code), 1, 1, 1},
 
3602
  {&__pyx_kp_dims_tpl, __pyx_k_dims_tpl, sizeof(__pyx_k_dims_tpl), 1, 1, 1},
 
3603
  {&__pyx_kp_max_dims_tpl, __pyx_k_max_dims_tpl, sizeof(__pyx_k_max_dims_tpl), 1, 1, 1},
 
3604
  {&__pyx_kp_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 1, 1, 1},
 
3605
  {&__pyx_kp_maxdims, __pyx_k_maxdims, sizeof(__pyx_k_maxdims), 1, 1, 1},
 
3606
  {&__pyx_kp_source, __pyx_k_source, sizeof(__pyx_k_source), 1, 1, 1},
 
3607
  {&__pyx_kp_coords, __pyx_k_coords, sizeof(__pyx_k_coords), 1, 1, 1},
 
3608
  {&__pyx_kp_op, __pyx_k_op, sizeof(__pyx_k_op), 1, 1, 1},
 
3609
  {&__pyx_kp_start, __pyx_k_start, sizeof(__pyx_k_start), 1, 1, 1},
 
3610
  {&__pyx_kp_count, __pyx_k_count, sizeof(__pyx_k_count), 1, 1, 1},
 
3611
  {&__pyx_kp_stride, __pyx_k_stride, sizeof(__pyx_k_stride), 1, 1, 1},
 
3612
  {&__pyx_kp_block, __pyx_k_block, sizeof(__pyx_k_block), 1, 1, 1},
 
3613
  {&__pyx_kp___doc__, __pyx_k___doc__, sizeof(__pyx_k___doc__), 1, 1, 1},
 
3614
  {&__pyx_kp__sync, __pyx_k__sync, sizeof(__pyx_k__sync), 1, 1, 1},
 
3615
  {&__pyx_kp_sync, __pyx_k_sync, sizeof(__pyx_k_sync), 1, 1, 1},
 
3616
  {&__pyx_kp_nosync, __pyx_k_nosync, sizeof(__pyx_k_nosync), 1, 1, 1},
 
3617
  {&__pyx_kp_SELECT_NOOP, __pyx_k_SELECT_NOOP, sizeof(__pyx_k_SELECT_NOOP), 1, 1, 1},
 
3618
  {&__pyx_kp_SELECT_SET, __pyx_k_SELECT_SET, sizeof(__pyx_k_SELECT_SET), 1, 1, 1},
 
3619
  {&__pyx_kp_SELECT_OR, __pyx_k_SELECT_OR, sizeof(__pyx_k_SELECT_OR), 1, 1, 1},
 
3620
  {&__pyx_kp_SELECT_AND, __pyx_k_SELECT_AND, sizeof(__pyx_k_SELECT_AND), 1, 1, 1},
 
3621
  {&__pyx_kp_SELECT_XOR, __pyx_k_SELECT_XOR, sizeof(__pyx_k_SELECT_XOR), 1, 1, 1},
 
3622
  {&__pyx_kp_SELECT_NOTB, __pyx_k_SELECT_NOTB, sizeof(__pyx_k_SELECT_NOTB), 1, 1, 1},
 
3623
  {&__pyx_kp_SELECT_NOTA, __pyx_k_SELECT_NOTA, sizeof(__pyx_k_SELECT_NOTA), 1, 1, 1},
 
3624
  {&__pyx_kp_SELECT_APPEND, __pyx_k_SELECT_APPEND, sizeof(__pyx_k_SELECT_APPEND), 1, 1, 1},
 
3625
  {&__pyx_kp_SELECT_PREPEND, __pyx_k_SELECT_PREPEND, sizeof(__pyx_k_SELECT_PREPEND), 1, 1, 1},
 
3626
  {&__pyx_kp_SELECT_INVALID, __pyx_k_SELECT_INVALID, sizeof(__pyx_k_SELECT_INVALID), 1, 1, 1},
 
3627
  {&__pyx_kp_ALL, __pyx_k_ALL, sizeof(__pyx_k_ALL), 1, 1, 1},
 
3628
  {&__pyx_kp_UNLIMITED, __pyx_k_UNLIMITED, sizeof(__pyx_k_UNLIMITED), 1, 1, 1},
 
3629
  {&__pyx_kp_NO_CLASS, __pyx_k_NO_CLASS, sizeof(__pyx_k_NO_CLASS), 1, 1, 1},
 
3630
  {&__pyx_kp_SCALAR, __pyx_k_SCALAR, sizeof(__pyx_k_SCALAR), 1, 1, 1},
 
3631
  {&__pyx_kp_SIMPLE, __pyx_k_SIMPLE, sizeof(__pyx_k_SIMPLE), 1, 1, 1},
 
3632
  {&__pyx_kp_SEL_ERROR, __pyx_k_SEL_ERROR, sizeof(__pyx_k_SEL_ERROR), 1, 1, 1},
 
3633
  {&__pyx_kp_SEL_NONE, __pyx_k_SEL_NONE, sizeof(__pyx_k_SEL_NONE), 1, 1, 1},
 
3634
  {&__pyx_kp_SEL_POINTS, __pyx_k_SEL_POINTS, sizeof(__pyx_k_SEL_POINTS), 1, 1, 1},
 
3635
  {&__pyx_kp_SEL_HYPERSLABS, __pyx_k_SEL_HYPERSLABS, sizeof(__pyx_k_SEL_HYPERSLABS), 1, 1, 1},
 
3636
  {&__pyx_kp_SEL_ALL, __pyx_k_SEL_ALL, sizeof(__pyx_k_SEL_ALL), 1, 1, 1},
 
3637
  {&__pyx_kp_create, __pyx_k_create, sizeof(__pyx_k_create), 1, 1, 1},
 
3638
  {&__pyx_kp_create_simple, __pyx_k_create_simple, sizeof(__pyx_k_create_simple), 1, 1, 1},
 
3639
  {&__pyx_kp_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 1, 1, 1},
 
3640
  {&__pyx_kp_111, __pyx_k_111, sizeof(__pyx_k_111), 0, 0, 0},
 
3641
  {&__pyx_kp_116, __pyx_k_116, sizeof(__pyx_k_116), 0, 0, 0},
 
3642
  {&__pyx_kp_120, __pyx_k_120, sizeof(__pyx_k_120), 0, 0, 0},
 
3643
  {0, 0, 0, 0, 0, 0}
 
3644
};
 
3645
static int __Pyx_InitCachedBuiltins(void) {
 
3646
  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_kp_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3647
  return 0;
 
3648
  __pyx_L1_error:;
 
3649
  return -1;
 
3650
}
 
3651
 
 
3652
static int __Pyx_InitGlobals(void) {
 
3653
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
3654
  return 0;
 
3655
  __pyx_L1_error:;
 
3656
  return -1;
 
3657
}
 
3658
 
 
3659
#if PY_MAJOR_VERSION < 3
 
3660
PyMODINIT_FUNC inith5s(void); /*proto*/
 
3661
PyMODINIT_FUNC inith5s(void)
 
3662
#else
 
3663
PyMODINIT_FUNC PyInit_h5s(void); /*proto*/
 
3664
PyMODINIT_FUNC PyInit_h5s(void)
 
3665
#endif
 
3666
{
 
3667
  PyObject *__pyx_1 = 0;
 
3668
  PyObject *__pyx_2 = 0;
 
3669
  int __pyx_t_1;
 
3670
  PyObject *__pyx_t_2 = NULL;
 
3671
  PyObject *__pyx_t_3 = NULL;
 
3672
  #ifdef CYTHON_REFNANNY
 
3673
  void* __pyx_refchk = NULL;
 
3674
  __Pyx_Refnanny = __Pyx_ImportRefcountAPI("refnanny");
 
3675
  if (!__Pyx_Refnanny) {
 
3676
      PyErr_Clear();
 
3677
      __Pyx_Refnanny = __Pyx_ImportRefcountAPI("Cython.Runtime.refnanny");
 
3678
      if (!__Pyx_Refnanny)
 
3679
          Py_FatalError("failed to import refnanny module");
 
3680
  }
 
3681
  __pyx_refchk = __Pyx_Refnanny->NewContext("PyMODINIT_FUNC PyInit_h5s(void)", __LINE__, __FILE__);
 
3682
  #endif
 
3683
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3684
  /*--- Library function declarations ---*/
 
3685
  __pyx_init_filenames();
 
3686
  /*--- Threads initialization code ---*/
 
3687
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
 
3688
  #ifdef WITH_THREAD /* Python build with threading support? */
 
3689
  PyEval_InitThreads();
 
3690
  #endif
 
3691
  #endif
 
3692
  /*--- Initialize various global constants etc. ---*/
 
3693
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3694
  /*--- Module creation code ---*/
 
3695
  #if PY_MAJOR_VERSION < 3
 
3696
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("h5s"), __pyx_methods, 0, 0, PYTHON_API_VERSION);
 
3697
  #else
 
3698
  __pyx_m = PyModule_Create(&__pyx_moduledef);
 
3699
  #endif
 
3700
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
3701
  #if PY_MAJOR_VERSION < 3
 
3702
  Py_INCREF(__pyx_m);
 
3703
  #endif
 
3704
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
 
3705
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
3706
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
3707
  if (__pyx_module_is_main_h5py__h5s) {
 
3708
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_kp___main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
3709
  }
 
3710
  /*--- Builtin init code ---*/
 
3711
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3712
  __pyx_skip_dispatch = 0;
 
3713
  /*--- Global init code ---*/
 
3714
  /*--- Function export code ---*/
 
3715
  /*--- Type init code ---*/
 
3716
  __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;}
 
3717
  __pyx_type_4h5py_3h5s_SpaceID.tp_base = __pyx_ptype_4h5py_2h5_ObjectID;
 
3718
  if (PyType_Ready(&__pyx_type_4h5py_3h5s_SpaceID) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3719
  if (__Pyx_SetAttrString(__pyx_m, "SpaceID", (PyObject *)&__pyx_type_4h5py_3h5s_SpaceID) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3720
  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__);
 
3721
  __pyx_ptype_4h5py_3h5s_SpaceID = &__pyx_type_4h5py_3h5s_SpaceID;
 
3722
  /*--- Type import code ---*/
 
3723
  __pyx_ptype_4h5py_2h5_PHIL = __Pyx_ImportType("h5py.h5", "PHIL", sizeof(struct __pyx_obj_4h5py_2h5_PHIL)); if (unlikely(!__pyx_ptype_4h5py_2h5_PHIL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3724
  if (__Pyx_GetVtable(__pyx_ptype_4h5py_2h5_PHIL->tp_dict, &__pyx_vtabptr_4h5py_2h5_PHIL) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3725
  __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 = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3726
  __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 = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3727
  __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;}
 
3728
  __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;}
 
3729
  /*--- Function import code ---*/
 
3730
  __pyx_2 = __Pyx_ImportModule("h5py.h5"); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3731
  if (__Pyx_ImportFunction(__pyx_2, "get_phil", (void (**)(void))&__pyx_f_4h5py_2h5_get_phil, "struct __pyx_obj_4h5py_2h5_PHIL *(int __pyx_skip_dispatch)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3732
  if (__Pyx_ImportFunction(__pyx_2, "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;}
 
3733
  if (__Pyx_ImportFunction(__pyx_2, "init_hdf5", (void (**)(void))&__pyx_f_4h5py_2h5_init_hdf5, "int (void)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3734
  if (__Pyx_ImportFunction(__pyx_2, "get_object_type", (void (**)(void))&__pyx_f_4h5py_2h5_get_object_type, "hid_t (void)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3735
  if (__Pyx_ImportFunction(__pyx_2, "attr_rw", (void (**)(void))&__pyx_f_4h5py_2h5_attr_rw, "herr_t (hid_t, hid_t, void *, h5py_rw_t)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3736
  if (__Pyx_ImportFunction(__pyx_2, "dset_rw", (void (**)(void))&__pyx_f_4h5py_2h5_dset_rw, "herr_t (hid_t, hid_t, hid_t, hid_t, hid_t, void *, h5py_rw_t)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3737
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
3738
  __pyx_2 = __Pyx_ImportModule("h5py.utils"); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3739
  if (__Pyx_ImportFunction(__pyx_2, "emalloc", (void (**)(void))&__pyx_f_4h5py_5utils_emalloc, "void *(size_t)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3740
  if (__Pyx_ImportFunction(__pyx_2, "efree", (void (**)(void))&__pyx_f_4h5py_5utils_efree, "void (void *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3741
  if (__Pyx_ImportFunction(__pyx_2, "check_numpy_read", (void (**)(void))&__pyx_f_4h5py_5utils_check_numpy_read, "int (PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_4h5py_5utils_check_numpy_read *__pyx_optional_args)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3742
  if (__Pyx_ImportFunction(__pyx_2, "check_numpy_write", (void (**)(void))&__pyx_f_4h5py_5utils_check_numpy_write, "int (PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_4h5py_5utils_check_numpy_write *__pyx_optional_args)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3743
  if (__Pyx_ImportFunction(__pyx_2, "convert_tuple", (void (**)(void))&__pyx_f_4h5py_5utils_convert_tuple, "int (PyObject *, hsize_t *, hsize_t)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3744
  if (__Pyx_ImportFunction(__pyx_2, "convert_dims", (void (**)(void))&__pyx_f_4h5py_5utils_convert_dims, "PyObject *(hsize_t *, hsize_t)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3745
  if (__Pyx_ImportFunction(__pyx_2, "require_tuple", (void (**)(void))&__pyx_f_4h5py_5utils_require_tuple, "int (PyObject *, int, int, char *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3746
  if (__Pyx_ImportFunction(__pyx_2, "create_numpy_hsize", (void (**)(void))&__pyx_f_4h5py_5utils_create_numpy_hsize, "PyObject *(int, hsize_t *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3747
  if (__Pyx_ImportFunction(__pyx_2, "create_hsize_array", (void (**)(void))&__pyx_f_4h5py_5utils_create_hsize_array, "PyObject *(PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3748
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
3749
  /*--- Execution code ---*/
 
3750
 
 
3751
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":13
 
3752
 * #-
 
3753
 * __doc__ = \
 
3754
 * """             # <<<<<<<<<<<<<<
 
3755
 *     Low-level interface to the "H5S" family of data-space functions.
 
3756
 * """
 
3757
 */
 
3758
  if (PyObject_SetAttr(__pyx_m, __pyx_kp___doc__, __pyx_kp_111) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3759
 
 
3760
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":27
 
3761
 * 
 
3762
 * # Initialization
 
3763
 * init_hdf5()             # <<<<<<<<<<<<<<
 
3764
 * 
 
3765
 * # Runtime imports
 
3766
 */
 
3767
  __pyx_t_1 = __pyx_f_4h5py_2h5_init_hdf5(); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3768
 
 
3769
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":30
 
3770
 * 
 
3771
 * # Runtime imports
 
3772
 * from _sync import sync, nosync             # <<<<<<<<<<<<<<
 
3773
 * 
 
3774
 * cdef object lockid(hid_t id_):
 
3775
 */
 
3776
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3777
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
3778
  __Pyx_INCREF(__pyx_kp_sync);
 
3779
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_sync);
 
3780
  __Pyx_GIVEREF(__pyx_kp_sync);
 
3781
  __Pyx_INCREF(__pyx_kp_nosync);
 
3782
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_kp_nosync);
 
3783
  __Pyx_GIVEREF(__pyx_kp_nosync);
 
3784
  __pyx_1 = __Pyx_Import(__pyx_kp__sync, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3785
  __Pyx_GOTREF(__pyx_1);
 
3786
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
3787
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_sync); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3788
  __Pyx_GOTREF(__pyx_2);
 
3789
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_sync, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3790
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
 
3791
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_nosync); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3792
  __Pyx_GOTREF(__pyx_2);
 
3793
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_nosync, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3794
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
 
3795
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
 
3796
 
 
3797
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":41
 
3798
 * 
 
3799
 * #enum H5S_seloper_t:
 
3800
 * SELECT_NOOP     = H5S_SELECT_NOOP             # <<<<<<<<<<<<<<
 
3801
 * SELECT_SET      = H5S_SELECT_SET
 
3802
 * SELECT_OR       = H5S_SELECT_OR
 
3803
 */
 
3804
  __pyx_t_2 = PyInt_FromLong(H5S_SELECT_NOOP); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3805
  __Pyx_GOTREF(__pyx_t_2);
 
3806
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SELECT_NOOP, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3807
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3808
 
 
3809
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":42
 
3810
 * #enum H5S_seloper_t:
 
3811
 * SELECT_NOOP     = H5S_SELECT_NOOP
 
3812
 * SELECT_SET      = H5S_SELECT_SET             # <<<<<<<<<<<<<<
 
3813
 * SELECT_OR       = H5S_SELECT_OR
 
3814
 * SELECT_AND      = H5S_SELECT_AND
 
3815
 */
 
3816
  __pyx_t_2 = PyInt_FromLong(H5S_SELECT_SET); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3817
  __Pyx_GOTREF(__pyx_t_2);
 
3818
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SELECT_SET, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3819
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3820
 
 
3821
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":43
 
3822
 * SELECT_NOOP     = H5S_SELECT_NOOP
 
3823
 * SELECT_SET      = H5S_SELECT_SET
 
3824
 * SELECT_OR       = H5S_SELECT_OR             # <<<<<<<<<<<<<<
 
3825
 * SELECT_AND      = H5S_SELECT_AND
 
3826
 * SELECT_XOR      = H5S_SELECT_XOR
 
3827
 */
 
3828
  __pyx_t_2 = PyInt_FromLong(H5S_SELECT_OR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3829
  __Pyx_GOTREF(__pyx_t_2);
 
3830
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SELECT_OR, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3831
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3832
 
 
3833
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":44
 
3834
 * SELECT_SET      = H5S_SELECT_SET
 
3835
 * SELECT_OR       = H5S_SELECT_OR
 
3836
 * SELECT_AND      = H5S_SELECT_AND             # <<<<<<<<<<<<<<
 
3837
 * SELECT_XOR      = H5S_SELECT_XOR
 
3838
 * SELECT_NOTB     = H5S_SELECT_NOTB
 
3839
 */
 
3840
  __pyx_t_2 = PyInt_FromLong(H5S_SELECT_AND); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3841
  __Pyx_GOTREF(__pyx_t_2);
 
3842
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SELECT_AND, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3843
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3844
 
 
3845
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":45
 
3846
 * SELECT_OR       = H5S_SELECT_OR
 
3847
 * SELECT_AND      = H5S_SELECT_AND
 
3848
 * SELECT_XOR      = H5S_SELECT_XOR             # <<<<<<<<<<<<<<
 
3849
 * SELECT_NOTB     = H5S_SELECT_NOTB
 
3850
 * SELECT_NOTA     = H5S_SELECT_NOTA
 
3851
 */
 
3852
  __pyx_t_2 = PyInt_FromLong(H5S_SELECT_XOR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3853
  __Pyx_GOTREF(__pyx_t_2);
 
3854
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SELECT_XOR, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3855
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3856
 
 
3857
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":46
 
3858
 * SELECT_AND      = H5S_SELECT_AND
 
3859
 * SELECT_XOR      = H5S_SELECT_XOR
 
3860
 * SELECT_NOTB     = H5S_SELECT_NOTB             # <<<<<<<<<<<<<<
 
3861
 * SELECT_NOTA     = H5S_SELECT_NOTA
 
3862
 * SELECT_APPEND   = H5S_SELECT_APPEND
 
3863
 */
 
3864
  __pyx_t_2 = PyInt_FromLong(H5S_SELECT_NOTB); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3865
  __Pyx_GOTREF(__pyx_t_2);
 
3866
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SELECT_NOTB, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3867
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3868
 
 
3869
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":47
 
3870
 * SELECT_XOR      = H5S_SELECT_XOR
 
3871
 * SELECT_NOTB     = H5S_SELECT_NOTB
 
3872
 * SELECT_NOTA     = H5S_SELECT_NOTA             # <<<<<<<<<<<<<<
 
3873
 * SELECT_APPEND   = H5S_SELECT_APPEND
 
3874
 * SELECT_PREPEND  = H5S_SELECT_PREPEND
 
3875
 */
 
3876
  __pyx_t_2 = PyInt_FromLong(H5S_SELECT_NOTA); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3877
  __Pyx_GOTREF(__pyx_t_2);
 
3878
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SELECT_NOTA, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3879
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3880
 
 
3881
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":48
 
3882
 * SELECT_NOTB     = H5S_SELECT_NOTB
 
3883
 * SELECT_NOTA     = H5S_SELECT_NOTA
 
3884
 * SELECT_APPEND   = H5S_SELECT_APPEND             # <<<<<<<<<<<<<<
 
3885
 * SELECT_PREPEND  = H5S_SELECT_PREPEND
 
3886
 * SELECT_INVALID  = H5S_SELECT_INVALID
 
3887
 */
 
3888
  __pyx_t_2 = PyInt_FromLong(H5S_SELECT_APPEND); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3889
  __Pyx_GOTREF(__pyx_t_2);
 
3890
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SELECT_APPEND, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3891
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3892
 
 
3893
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":49
 
3894
 * SELECT_NOTA     = H5S_SELECT_NOTA
 
3895
 * SELECT_APPEND   = H5S_SELECT_APPEND
 
3896
 * SELECT_PREPEND  = H5S_SELECT_PREPEND             # <<<<<<<<<<<<<<
 
3897
 * SELECT_INVALID  = H5S_SELECT_INVALID
 
3898
 * 
 
3899
 */
 
3900
  __pyx_t_2 = PyInt_FromLong(H5S_SELECT_PREPEND); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3901
  __Pyx_GOTREF(__pyx_t_2);
 
3902
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SELECT_PREPEND, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3903
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3904
 
 
3905
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":50
 
3906
 * SELECT_APPEND   = H5S_SELECT_APPEND
 
3907
 * SELECT_PREPEND  = H5S_SELECT_PREPEND
 
3908
 * SELECT_INVALID  = H5S_SELECT_INVALID             # <<<<<<<<<<<<<<
 
3909
 * 
 
3910
 * ALL = lockid(H5S_ALL)   # This is accepted in lieu of an actual identifier
 
3911
 */
 
3912
  __pyx_t_2 = PyInt_FromLong(H5S_SELECT_INVALID); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3913
  __Pyx_GOTREF(__pyx_t_2);
 
3914
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SELECT_INVALID, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3915
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3916
 
 
3917
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":52
 
3918
 * SELECT_INVALID  = H5S_SELECT_INVALID
 
3919
 * 
 
3920
 * ALL = lockid(H5S_ALL)   # This is accepted in lieu of an actual identifier             # <<<<<<<<<<<<<<
 
3921
 *                         # in functions like H5Dread, so wrap it.
 
3922
 * UNLIMITED = H5S_UNLIMITED
 
3923
 */
 
3924
  __pyx_t_2 = __pyx_f_4h5py_3h5s_lockid(H5S_ALL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3925
  __Pyx_GOTREF(__pyx_t_2);
 
3926
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_ALL, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3927
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3928
 
 
3929
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":54
 
3930
 * ALL = lockid(H5S_ALL)   # This is accepted in lieu of an actual identifier
 
3931
 *                         # in functions like H5Dread, so wrap it.
 
3932
 * UNLIMITED = H5S_UNLIMITED             # <<<<<<<<<<<<<<
 
3933
 * 
 
3934
 * #enum H5S_class_t
 
3935
 */
 
3936
  __pyx_t_2 = PyLong_FromLongLong(H5S_UNLIMITED); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3937
  __Pyx_GOTREF(__pyx_t_2);
 
3938
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_UNLIMITED, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3939
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3940
 
 
3941
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":57
 
3942
 * 
 
3943
 * #enum H5S_class_t
 
3944
 * NO_CLASS = H5S_NO_CLASS             # <<<<<<<<<<<<<<
 
3945
 * SCALAR   = H5S_SCALAR
 
3946
 * SIMPLE   = H5S_SIMPLE
 
3947
 */
 
3948
  __pyx_t_2 = PyInt_FromLong(H5S_NO_CLASS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3949
  __Pyx_GOTREF(__pyx_t_2);
 
3950
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_NO_CLASS, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3951
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3952
 
 
3953
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":58
 
3954
 * #enum H5S_class_t
 
3955
 * NO_CLASS = H5S_NO_CLASS
 
3956
 * SCALAR   = H5S_SCALAR             # <<<<<<<<<<<<<<
 
3957
 * SIMPLE   = H5S_SIMPLE
 
3958
 * 
 
3959
 */
 
3960
  __pyx_t_2 = PyInt_FromLong(H5S_SCALAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3961
  __Pyx_GOTREF(__pyx_t_2);
 
3962
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SCALAR, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3963
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3964
 
 
3965
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":59
 
3966
 * NO_CLASS = H5S_NO_CLASS
 
3967
 * SCALAR   = H5S_SCALAR
 
3968
 * SIMPLE   = H5S_SIMPLE             # <<<<<<<<<<<<<<
 
3969
 * 
 
3970
 * #enum H5S_sel_type
 
3971
 */
 
3972
  __pyx_t_2 = PyInt_FromLong(H5S_SIMPLE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3973
  __Pyx_GOTREF(__pyx_t_2);
 
3974
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SIMPLE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3975
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3976
 
 
3977
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":62
 
3978
 * 
 
3979
 * #enum H5S_sel_type
 
3980
 * SEL_ERROR       = H5S_SEL_ERROR             # <<<<<<<<<<<<<<
 
3981
 * SEL_NONE        = H5S_SEL_NONE
 
3982
 * SEL_POINTS      = H5S_SEL_POINTS
 
3983
 */
 
3984
  __pyx_t_2 = PyInt_FromLong(H5S_SEL_ERROR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3985
  __Pyx_GOTREF(__pyx_t_2);
 
3986
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SEL_ERROR, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3987
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3988
 
 
3989
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":63
 
3990
 * #enum H5S_sel_type
 
3991
 * SEL_ERROR       = H5S_SEL_ERROR
 
3992
 * SEL_NONE        = H5S_SEL_NONE             # <<<<<<<<<<<<<<
 
3993
 * SEL_POINTS      = H5S_SEL_POINTS
 
3994
 * SEL_HYPERSLABS  = H5S_SEL_HYPERSLABS
 
3995
 */
 
3996
  __pyx_t_2 = PyInt_FromLong(H5S_SEL_NONE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3997
  __Pyx_GOTREF(__pyx_t_2);
 
3998
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SEL_NONE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3999
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4000
 
 
4001
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":64
 
4002
 * SEL_ERROR       = H5S_SEL_ERROR
 
4003
 * SEL_NONE        = H5S_SEL_NONE
 
4004
 * SEL_POINTS      = H5S_SEL_POINTS             # <<<<<<<<<<<<<<
 
4005
 * SEL_HYPERSLABS  = H5S_SEL_HYPERSLABS
 
4006
 * SEL_ALL         = H5S_SEL_ALL
 
4007
 */
 
4008
  __pyx_t_2 = PyInt_FromLong(H5S_SEL_POINTS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4009
  __Pyx_GOTREF(__pyx_t_2);
 
4010
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SEL_POINTS, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4011
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4012
 
 
4013
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":65
 
4014
 * SEL_NONE        = H5S_SEL_NONE
 
4015
 * SEL_POINTS      = H5S_SEL_POINTS
 
4016
 * SEL_HYPERSLABS  = H5S_SEL_HYPERSLABS             # <<<<<<<<<<<<<<
 
4017
 * SEL_ALL         = H5S_SEL_ALL
 
4018
 * 
 
4019
 */
 
4020
  __pyx_t_2 = PyInt_FromLong(H5S_SEL_HYPERSLABS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4021
  __Pyx_GOTREF(__pyx_t_2);
 
4022
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SEL_HYPERSLABS, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4023
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4024
 
 
4025
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":66
 
4026
 * SEL_POINTS      = H5S_SEL_POINTS
 
4027
 * SEL_HYPERSLABS  = H5S_SEL_HYPERSLABS
 
4028
 * SEL_ALL         = H5S_SEL_ALL             # <<<<<<<<<<<<<<
 
4029
 * 
 
4030
 * # === Basic dataspace operations ==============================================
 
4031
 */
 
4032
  __pyx_t_2 = PyInt_FromLong(H5S_SEL_ALL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4033
  __Pyx_GOTREF(__pyx_t_2);
 
4034
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_SEL_ALL, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4035
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4036
 
 
4037
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":70
 
4038
 * # === Basic dataspace operations ==============================================
 
4039
 * 
 
4040
 * @sync             # <<<<<<<<<<<<<<
 
4041
 * def create(int class_code):
 
4042
 *     """(INT class_code) => SpaceID
 
4043
 */
 
4044
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4045
  __Pyx_GOTREF(__pyx_1);
 
4046
 
 
4047
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":71
 
4048
 * 
 
4049
 * @sync
 
4050
 * def create(int class_code):             # <<<<<<<<<<<<<<
 
4051
 *     """(INT class_code) => SpaceID
 
4052
 * 
 
4053
 */
 
4054
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_create); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4055
  __Pyx_GOTREF(__pyx_2);
 
4056
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4057
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
4058
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_2);
 
4059
  __Pyx_GIVEREF(__pyx_2);
 
4060
  __pyx_2 = 0;
 
4061
  __pyx_t_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4062
  __Pyx_GOTREF(__pyx_t_3);
 
4063
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
 
4064
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
4065
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_create, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4066
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
4067
 
 
4068
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":79
 
4069
 *     return SpaceID(H5Screate(<H5S_class_t>class_code))
 
4070
 * 
 
4071
 * @sync             # <<<<<<<<<<<<<<
 
4072
 * def create_simple(object dims_tpl, object max_dims_tpl=None):
 
4073
 *     """(TUPLE dims_tpl, TUPLE max_dims_tpl) => SpaceID
 
4074
 */
 
4075
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4076
  __Pyx_GOTREF(__pyx_2);
 
4077
 
 
4078
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":80
 
4079
 * 
 
4080
 * @sync
 
4081
 * def create_simple(object dims_tpl, object max_dims_tpl=None):             # <<<<<<<<<<<<<<
 
4082
 *     """(TUPLE dims_tpl, TUPLE max_dims_tpl) => SpaceID
 
4083
 * 
 
4084
 */
 
4085
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_create_simple); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4086
  __Pyx_GOTREF(__pyx_1);
 
4087
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4088
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
4089
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1);
 
4090
  __Pyx_GIVEREF(__pyx_1);
 
4091
  __pyx_1 = 0;
 
4092
  __pyx_t_2 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4093
  __Pyx_GOTREF(__pyx_t_2);
 
4094
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
 
4095
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
4096
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_create_simple, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4097
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4098
 
 
4099
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":147
 
4100
 *             return self.get_simple_extent_dims()
 
4101
 * 
 
4102
 *     @sync             # <<<<<<<<<<<<<<
 
4103
 *     def _close(self):
 
4104
 *         """()
 
4105
 */
 
4106
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4107
  __Pyx_GOTREF(__pyx_1);
 
4108
 
 
4109
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":148
 
4110
 * 
 
4111
 *     @sync
 
4112
 *     def _close(self):             # <<<<<<<<<<<<<<
 
4113
 *         """()
 
4114
 * 
 
4115
 */
 
4116
  __pyx_2 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp__close); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4117
  __Pyx_GOTREF(__pyx_2);
 
4118
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4119
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
4120
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_2);
 
4121
  __Pyx_GIVEREF(__pyx_2);
 
4122
  __pyx_2 = 0;
 
4123
  __pyx_t_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4124
  __Pyx_GOTREF(__pyx_t_3);
 
4125
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
 
4126
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
4127
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp__close, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4128
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
4129
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4130
 
 
4131
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":157
 
4132
 *         H5Sclose(self.id)
 
4133
 * 
 
4134
 *     @sync             # <<<<<<<<<<<<<<
 
4135
 *     def copy(self):
 
4136
 *         """() => SpaceID
 
4137
 */
 
4138
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4139
  __Pyx_GOTREF(__pyx_2);
 
4140
 
 
4141
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":158
 
4142
 * 
 
4143
 *     @sync
 
4144
 *     def copy(self):             # <<<<<<<<<<<<<<
 
4145
 *         """() => SpaceID
 
4146
 * 
 
4147
 */
 
4148
  __pyx_1 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_copy); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4149
  __Pyx_GOTREF(__pyx_1);
 
4150
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4151
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
4152
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1);
 
4153
  __Pyx_GIVEREF(__pyx_1);
 
4154
  __pyx_1 = 0;
 
4155
  __pyx_t_2 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4156
  __Pyx_GOTREF(__pyx_t_2);
 
4157
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
 
4158
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
4159
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_copy, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4160
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4161
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4162
 
 
4163
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":200
 
4164
 *     # === Simple dataspaces ===================================================
 
4165
 * 
 
4166
 *     @sync             # <<<<<<<<<<<<<<
 
4167
 *     def is_simple(self):
 
4168
 *         """() => BOOL is_simple
 
4169
 */
 
4170
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4171
  __Pyx_GOTREF(__pyx_1);
 
4172
 
 
4173
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":201
 
4174
 * 
 
4175
 *     @sync
 
4176
 *     def is_simple(self):             # <<<<<<<<<<<<<<
 
4177
 *         """() => BOOL is_simple
 
4178
 * 
 
4179
 */
 
4180
  __pyx_2 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_is_simple); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4181
  __Pyx_GOTREF(__pyx_2);
 
4182
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4183
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
4184
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_2);
 
4185
  __Pyx_GIVEREF(__pyx_2);
 
4186
  __pyx_2 = 0;
 
4187
  __pyx_t_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4188
  __Pyx_GOTREF(__pyx_t_3);
 
4189
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
 
4190
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
4191
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_is_simple, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4192
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
4193
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4194
 
 
4195
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":209
 
4196
 *         return <bint>(H5Sis_simple(self.id))
 
4197
 * 
 
4198
 *     @sync             # <<<<<<<<<<<<<<
 
4199
 *     def offset_simple(self, object offset=None):
 
4200
 *         """(TUPLE offset=None)
 
4201
 */
 
4202
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4203
  __Pyx_GOTREF(__pyx_2);
 
4204
 
 
4205
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":210
 
4206
 * 
 
4207
 *     @sync
 
4208
 *     def offset_simple(self, object offset=None):             # <<<<<<<<<<<<<<
 
4209
 *         """(TUPLE offset=None)
 
4210
 * 
 
4211
 */
 
4212
  __pyx_1 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_offset_simple); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4213
  __Pyx_GOTREF(__pyx_1);
 
4214
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4215
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
4216
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1);
 
4217
  __Pyx_GIVEREF(__pyx_1);
 
4218
  __pyx_1 = 0;
 
4219
  __pyx_t_2 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4220
  __Pyx_GOTREF(__pyx_t_2);
 
4221
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
 
4222
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
4223
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_offset_simple, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4224
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4225
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4226
 
 
4227
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":243
 
4228
 *             efree(dims)
 
4229
 * 
 
4230
 *     @sync             # <<<<<<<<<<<<<<
 
4231
 *     def get_simple_extent_ndims(self):
 
4232
 *         """() => INT rank
 
4233
 */
 
4234
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4235
  __Pyx_GOTREF(__pyx_1);
 
4236
 
 
4237
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":244
 
4238
 * 
 
4239
 *     @sync
 
4240
 *     def get_simple_extent_ndims(self):             # <<<<<<<<<<<<<<
 
4241
 *         """() => INT rank
 
4242
 * 
 
4243
 */
 
4244
  __pyx_2 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_103); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4245
  __Pyx_GOTREF(__pyx_2);
 
4246
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4247
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
4248
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_2);
 
4249
  __Pyx_GIVEREF(__pyx_2);
 
4250
  __pyx_2 = 0;
 
4251
  __pyx_t_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4252
  __Pyx_GOTREF(__pyx_t_3);
 
4253
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
 
4254
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
4255
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_103, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4256
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
4257
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4258
 
 
4259
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":251
 
4260
 *         return H5Sget_simple_extent_ndims(self.id)
 
4261
 * 
 
4262
 *     @sync             # <<<<<<<<<<<<<<
 
4263
 *     def get_simple_extent_dims(self, int maxdims=0):
 
4264
 *         """(BOOL maxdims=False) => TUPLE shape
 
4265
 */
 
4266
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4267
  __Pyx_GOTREF(__pyx_2);
 
4268
 
 
4269
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":252
 
4270
 * 
 
4271
 *     @sync
 
4272
 *     def get_simple_extent_dims(self, int maxdims=0):             # <<<<<<<<<<<<<<
 
4273
 *         """(BOOL maxdims=False) => TUPLE shape
 
4274
 * 
 
4275
 */
 
4276
  __pyx_1 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_104); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4277
  __Pyx_GOTREF(__pyx_1);
 
4278
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4279
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
4280
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1);
 
4281
  __Pyx_GIVEREF(__pyx_1);
 
4282
  __pyx_1 = 0;
 
4283
  __pyx_t_2 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4284
  __Pyx_GOTREF(__pyx_t_2);
 
4285
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
 
4286
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
4287
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_104, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4288
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4289
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4290
 
 
4291
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":275
 
4292
 *             efree(dims)
 
4293
 * 
 
4294
 *     @sync             # <<<<<<<<<<<<<<
 
4295
 *     def get_simple_extent_npoints(self):
 
4296
 *         """() => LONG npoints
 
4297
 */
 
4298
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4299
  __Pyx_GOTREF(__pyx_1);
 
4300
 
 
4301
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":276
 
4302
 * 
 
4303
 *     @sync
 
4304
 *     def get_simple_extent_npoints(self):             # <<<<<<<<<<<<<<
 
4305
 *         """() => LONG npoints
 
4306
 * 
 
4307
 */
 
4308
  __pyx_2 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_105); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4309
  __Pyx_GOTREF(__pyx_2);
 
4310
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4311
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
4312
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_2);
 
4313
  __Pyx_GIVEREF(__pyx_2);
 
4314
  __pyx_2 = 0;
 
4315
  __pyx_t_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4316
  __Pyx_GOTREF(__pyx_t_3);
 
4317
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
 
4318
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
4319
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_105, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4320
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
4321
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4322
 
 
4323
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":283
 
4324
 *         return H5Sget_simple_extent_npoints(self.id)
 
4325
 * 
 
4326
 *     @sync             # <<<<<<<<<<<<<<
 
4327
 *     def get_simple_extent_type(self):
 
4328
 *         """() => INT class_code
 
4329
 */
 
4330
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4331
  __Pyx_GOTREF(__pyx_2);
 
4332
 
 
4333
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":284
 
4334
 * 
 
4335
 *     @sync
 
4336
 *     def get_simple_extent_type(self):             # <<<<<<<<<<<<<<
 
4337
 *         """() => INT class_code
 
4338
 * 
 
4339
 */
 
4340
  __pyx_1 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_106); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4341
  __Pyx_GOTREF(__pyx_1);
 
4342
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4343
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
4344
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1);
 
4345
  __Pyx_GIVEREF(__pyx_1);
 
4346
  __pyx_1 = 0;
 
4347
  __pyx_t_2 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4348
  __Pyx_GOTREF(__pyx_t_2);
 
4349
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
 
4350
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
4351
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_106, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4352
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4353
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4354
 
 
4355
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":293
 
4356
 *     # === Extents =============================================================
 
4357
 * 
 
4358
 *     @sync             # <<<<<<<<<<<<<<
 
4359
 *     def extent_copy(self, SpaceID source not None):
 
4360
 *         """(SpaceID source)
 
4361
 */
 
4362
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4363
  __Pyx_GOTREF(__pyx_1);
 
4364
 
 
4365
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":294
 
4366
 * 
 
4367
 *     @sync
 
4368
 *     def extent_copy(self, SpaceID source not None):             # <<<<<<<<<<<<<<
 
4369
 *         """(SpaceID source)
 
4370
 * 
 
4371
 */
 
4372
  __pyx_2 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_extent_copy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4373
  __Pyx_GOTREF(__pyx_2);
 
4374
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4375
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
4376
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_2);
 
4377
  __Pyx_GIVEREF(__pyx_2);
 
4378
  __pyx_2 = 0;
 
4379
  __pyx_t_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4380
  __Pyx_GOTREF(__pyx_t_3);
 
4381
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
 
4382
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
4383
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_extent_copy, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4384
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
4385
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4386
 
 
4387
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":302
 
4388
 *         H5Sextent_copy(self.id, source.id)
 
4389
 * 
 
4390
 *     @sync             # <<<<<<<<<<<<<<
 
4391
 *     def set_extent_simple(self, object dims_tpl, object max_dims_tpl=None):
 
4392
 *         """(TUPLE dims_tpl, TUPLE max_dims_tpl=None)
 
4393
 */
 
4394
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4395
  __Pyx_GOTREF(__pyx_2);
 
4396
 
 
4397
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":303
 
4398
 * 
 
4399
 *     @sync
 
4400
 *     def set_extent_simple(self, object dims_tpl, object max_dims_tpl=None):             # <<<<<<<<<<<<<<
 
4401
 *         """(TUPLE dims_tpl, TUPLE max_dims_tpl=None)
 
4402
 * 
 
4403
 */
 
4404
  __pyx_1 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_set_extent_simple); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4405
  __Pyx_GOTREF(__pyx_1);
 
4406
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4407
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
4408
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1);
 
4409
  __Pyx_GIVEREF(__pyx_1);
 
4410
  __pyx_1 = 0;
 
4411
  __pyx_t_2 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4412
  __Pyx_GOTREF(__pyx_t_2);
 
4413
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
 
4414
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
4415
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_set_extent_simple, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4416
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4417
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4418
 
 
4419
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":335
 
4420
 *             efree(max_dims)
 
4421
 * 
 
4422
 *     @sync             # <<<<<<<<<<<<<<
 
4423
 *     def set_extent_none(self):
 
4424
 *         """()
 
4425
 */
 
4426
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4427
  __Pyx_GOTREF(__pyx_1);
 
4428
 
 
4429
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":336
 
4430
 * 
 
4431
 *     @sync
 
4432
 *     def set_extent_none(self):             # <<<<<<<<<<<<<<
 
4433
 *         """()
 
4434
 * 
 
4435
 */
 
4436
  __pyx_2 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_set_extent_none); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4437
  __Pyx_GOTREF(__pyx_2);
 
4438
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4439
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
4440
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_2);
 
4441
  __Pyx_GIVEREF(__pyx_2);
 
4442
  __pyx_2 = 0;
 
4443
  __pyx_t_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4444
  __Pyx_GOTREF(__pyx_t_3);
 
4445
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
 
4446
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
4447
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_set_extent_none, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4448
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
4449
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4450
 
 
4451
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":345
 
4452
 *     # === General selection operations ========================================
 
4453
 * 
 
4454
 *     @sync             # <<<<<<<<<<<<<<
 
4455
 *     def get_select_type(self):
 
4456
 *         """ () => INT select_code
 
4457
 */
 
4458
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4459
  __Pyx_GOTREF(__pyx_2);
 
4460
 
 
4461
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":346
 
4462
 * 
 
4463
 *     @sync
 
4464
 *     def get_select_type(self):             # <<<<<<<<<<<<<<
 
4465
 *         """ () => INT select_code
 
4466
 * 
 
4467
 */
 
4468
  __pyx_1 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_get_select_type); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4469
  __Pyx_GOTREF(__pyx_1);
 
4470
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4471
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
4472
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1);
 
4473
  __Pyx_GIVEREF(__pyx_1);
 
4474
  __pyx_1 = 0;
 
4475
  __pyx_t_2 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4476
  __Pyx_GOTREF(__pyx_t_2);
 
4477
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
 
4478
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
4479
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_get_select_type, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4480
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4481
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4482
 
 
4483
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":358
 
4484
 *         return <int>H5Sget_select_type(self.id)
 
4485
 * 
 
4486
 *     @sync             # <<<<<<<<<<<<<<
 
4487
 *     def get_select_npoints(self):
 
4488
 *         """() => LONG npoints
 
4489
 */
 
4490
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4491
  __Pyx_GOTREF(__pyx_1);
 
4492
 
 
4493
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":359
 
4494
 * 
 
4495
 *     @sync
 
4496
 *     def get_select_npoints(self):             # <<<<<<<<<<<<<<
 
4497
 *         """() => LONG npoints
 
4498
 * 
 
4499
 */
 
4500
  __pyx_2 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_get_select_npoints); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4501
  __Pyx_GOTREF(__pyx_2);
 
4502
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4503
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
4504
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_2);
 
4505
  __Pyx_GIVEREF(__pyx_2);
 
4506
  __pyx_2 = 0;
 
4507
  __pyx_t_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4508
  __Pyx_GOTREF(__pyx_t_3);
 
4509
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
 
4510
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
4511
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_get_select_npoints, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4512
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
4513
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4514
 
 
4515
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":367
 
4516
 *         return H5Sget_select_npoints(self.id)
 
4517
 * 
 
4518
 *     @sync             # <<<<<<<<<<<<<<
 
4519
 *     def get_select_bounds(self):
 
4520
 *         """() => (TUPLE start, TUPLE end)
 
4521
 */
 
4522
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4523
  __Pyx_GOTREF(__pyx_2);
 
4524
 
 
4525
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":368
 
4526
 * 
 
4527
 *     @sync
 
4528
 *     def get_select_bounds(self):             # <<<<<<<<<<<<<<
 
4529
 *         """() => (TUPLE start, TUPLE end)
 
4530
 * 
 
4531
 */
 
4532
  __pyx_1 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_get_select_bounds); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4533
  __Pyx_GOTREF(__pyx_1);
 
4534
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4535
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
4536
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1);
 
4537
  __Pyx_GIVEREF(__pyx_1);
 
4538
  __pyx_1 = 0;
 
4539
  __pyx_t_2 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4540
  __Pyx_GOTREF(__pyx_t_2);
 
4541
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
 
4542
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
4543
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_get_select_bounds, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4544
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4545
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4546
 
 
4547
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":394
 
4548
 *             efree(end)
 
4549
 * 
 
4550
 *     @sync             # <<<<<<<<<<<<<<
 
4551
 *     def select_all(self):
 
4552
 *         """()
 
4553
 */
 
4554
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4555
  __Pyx_GOTREF(__pyx_1);
 
4556
 
 
4557
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":395
 
4558
 * 
 
4559
 *     @sync
 
4560
 *     def select_all(self):             # <<<<<<<<<<<<<<
 
4561
 *         """()
 
4562
 * 
 
4563
 */
 
4564
  __pyx_2 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_select_all); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4565
  __Pyx_GOTREF(__pyx_2);
 
4566
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4567
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
4568
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_2);
 
4569
  __Pyx_GIVEREF(__pyx_2);
 
4570
  __pyx_2 = 0;
 
4571
  __pyx_t_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4572
  __Pyx_GOTREF(__pyx_t_3);
 
4573
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
 
4574
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
4575
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_select_all, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4576
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
4577
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4578
 
 
4579
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":402
 
4580
 *         H5Sselect_all(self.id)
 
4581
 * 
 
4582
 *     @sync             # <<<<<<<<<<<<<<
 
4583
 *     def select_none(self):
 
4584
 *         """()
 
4585
 */
 
4586
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4587
  __Pyx_GOTREF(__pyx_2);
 
4588
 
 
4589
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":403
 
4590
 * 
 
4591
 *     @sync
 
4592
 *     def select_none(self):             # <<<<<<<<<<<<<<
 
4593
 *         """()
 
4594
 * 
 
4595
 */
 
4596
  __pyx_1 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_select_none); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4597
  __Pyx_GOTREF(__pyx_1);
 
4598
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4599
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
4600
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1);
 
4601
  __Pyx_GIVEREF(__pyx_1);
 
4602
  __pyx_1 = 0;
 
4603
  __pyx_t_2 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4604
  __Pyx_GOTREF(__pyx_t_2);
 
4605
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
 
4606
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
4607
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_select_none, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4608
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4609
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4610
 
 
4611
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":410
 
4612
 *         H5Sselect_none(self.id)
 
4613
 * 
 
4614
 *     @sync             # <<<<<<<<<<<<<<
 
4615
 *     def select_valid(self):
 
4616
 *         """() => BOOL
 
4617
 */
 
4618
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4619
  __Pyx_GOTREF(__pyx_1);
 
4620
 
 
4621
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":411
 
4622
 * 
 
4623
 *     @sync
 
4624
 *     def select_valid(self):             # <<<<<<<<<<<<<<
 
4625
 *         """() => BOOL
 
4626
 * 
 
4627
 */
 
4628
  __pyx_2 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_select_valid); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4629
  __Pyx_GOTREF(__pyx_2);
 
4630
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4631
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
4632
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_2);
 
4633
  __Pyx_GIVEREF(__pyx_2);
 
4634
  __pyx_2 = 0;
 
4635
  __pyx_t_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4636
  __Pyx_GOTREF(__pyx_t_3);
 
4637
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
 
4638
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
4639
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_select_valid, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4640
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
4641
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4642
 
 
4643
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":421
 
4644
 *     # === Point selection functions ===========================================
 
4645
 * 
 
4646
 *     @sync             # <<<<<<<<<<<<<<
 
4647
 *     def get_select_elem_npoints(self):
 
4648
 *         """() => LONG npoints
 
4649
 */
 
4650
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4651
  __Pyx_GOTREF(__pyx_2);
 
4652
 
 
4653
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":422
 
4654
 * 
 
4655
 *     @sync
 
4656
 *     def get_select_elem_npoints(self):             # <<<<<<<<<<<<<<
 
4657
 *         """() => LONG npoints
 
4658
 * 
 
4659
 */
 
4660
  __pyx_1 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_107); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4661
  __Pyx_GOTREF(__pyx_1);
 
4662
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4663
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
4664
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1);
 
4665
  __Pyx_GIVEREF(__pyx_1);
 
4666
  __pyx_1 = 0;
 
4667
  __pyx_t_2 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4668
  __Pyx_GOTREF(__pyx_t_2);
 
4669
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
 
4670
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
4671
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_107, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4672
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4673
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4674
 
 
4675
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":429
 
4676
 *         return H5Sget_select_elem_npoints(self.id)
 
4677
 * 
 
4678
 *     @sync             # <<<<<<<<<<<<<<
 
4679
 *     def get_select_elem_pointlist(self):
 
4680
 *         """() => NDARRAY
 
4681
 */
 
4682
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4683
  __Pyx_GOTREF(__pyx_1);
 
4684
 
 
4685
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":430
 
4686
 * 
 
4687
 *     @sync
 
4688
 *     def get_select_elem_pointlist(self):             # <<<<<<<<<<<<<<
 
4689
 *         """() => NDARRAY
 
4690
 * 
 
4691
 */
 
4692
  __pyx_2 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_108); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4693
  __Pyx_GOTREF(__pyx_2);
 
4694
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4695
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
4696
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_2);
 
4697
  __Pyx_GIVEREF(__pyx_2);
 
4698
  __pyx_2 = 0;
 
4699
  __pyx_t_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4700
  __Pyx_GOTREF(__pyx_t_3);
 
4701
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
 
4702
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
4703
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_108, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4704
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
4705
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4706
 
 
4707
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":449
 
4708
 * 
 
4709
 *     @sync
 
4710
 *     def select_elements(self, object coords, int op=H5S_SELECT_SET):             # <<<<<<<<<<<<<<
 
4711
 *         """(SEQUENCE coords, INT op=SELECT_SET)
 
4712
 * 
 
4713
 */
 
4714
  __pyx_k_112 = H5S_SELECT_SET;
 
4715
 
 
4716
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":448
 
4717
 *         return buf
 
4718
 * 
 
4719
 *     @sync             # <<<<<<<<<<<<<<
 
4720
 *     def select_elements(self, object coords, int op=H5S_SELECT_SET):
 
4721
 *         """(SEQUENCE coords, INT op=SELECT_SET)
 
4722
 */
 
4723
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4724
  __Pyx_GOTREF(__pyx_2);
 
4725
 
 
4726
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":449
 
4727
 * 
 
4728
 *     @sync
 
4729
 *     def select_elements(self, object coords, int op=H5S_SELECT_SET):             # <<<<<<<<<<<<<<
 
4730
 *         """(SEQUENCE coords, INT op=SELECT_SET)
 
4731
 * 
 
4732
 */
 
4733
  __pyx_1 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_select_elements); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4734
  __Pyx_GOTREF(__pyx_1);
 
4735
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4736
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
4737
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1);
 
4738
  __Pyx_GIVEREF(__pyx_1);
 
4739
  __pyx_1 = 0;
 
4740
  __pyx_t_2 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4741
  __Pyx_GOTREF(__pyx_t_2);
 
4742
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
 
4743
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
4744
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_select_elements, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4745
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4746
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4747
 
 
4748
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":486
 
4749
 *     # === Hyperslab selection functions =======================================
 
4750
 * 
 
4751
 *     @sync             # <<<<<<<<<<<<<<
 
4752
 *     def get_select_hyper_nblocks(self):
 
4753
 *         """() => LONG nblocks
 
4754
 */
 
4755
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4756
  __Pyx_GOTREF(__pyx_1);
 
4757
 
 
4758
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":487
 
4759
 * 
 
4760
 *     @sync
 
4761
 *     def get_select_hyper_nblocks(self):             # <<<<<<<<<<<<<<
 
4762
 *         """() => LONG nblocks
 
4763
 * 
 
4764
 */
 
4765
  __pyx_2 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_109); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4766
  __Pyx_GOTREF(__pyx_2);
 
4767
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4768
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
4769
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_2);
 
4770
  __Pyx_GIVEREF(__pyx_2);
 
4771
  __pyx_2 = 0;
 
4772
  __pyx_t_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4773
  __Pyx_GOTREF(__pyx_t_3);
 
4774
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
 
4775
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
4776
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_109, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4777
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
4778
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4779
 
 
4780
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":494
 
4781
 *         return H5Sget_select_hyper_nblocks(self.id)
 
4782
 * 
 
4783
 *     @sync             # <<<<<<<<<<<<<<
 
4784
 *     def get_select_hyper_blocklist(self):
 
4785
 *         """() => NDARRAY
 
4786
 */
 
4787
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4788
  __Pyx_GOTREF(__pyx_2);
 
4789
 
 
4790
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":495
 
4791
 * 
 
4792
 *     @sync
 
4793
 *     def get_select_hyper_blocklist(self):             # <<<<<<<<<<<<<<
 
4794
 *         """() => NDARRAY
 
4795
 * 
 
4796
 */
 
4797
  __pyx_1 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_110); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4798
  __Pyx_GOTREF(__pyx_1);
 
4799
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4800
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
4801
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1);
 
4802
  __Pyx_GIVEREF(__pyx_1);
 
4803
  __pyx_1 = 0;
 
4804
  __pyx_t_2 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4805
  __Pyx_GOTREF(__pyx_t_2);
 
4806
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
 
4807
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
4808
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_110, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4809
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4810
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4811
 
 
4812
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":523
 
4813
 *     @sync
 
4814
 *     def select_hyperslab(self, object start, object count, object stride=None,
 
4815
 *                          object block=None, int op=H5S_SELECT_SET):             # <<<<<<<<<<<<<<
 
4816
 *         """(TUPLE start, TUPLE count, TUPLE stride=None, TUPLE block=None,
 
4817
 *              INT op=SELECT_SET)
 
4818
 */
 
4819
  __pyx_k_113 = H5S_SELECT_SET;
 
4820
 
 
4821
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":521
 
4822
 *         return buf
 
4823
 * 
 
4824
 *     @sync             # <<<<<<<<<<<<<<
 
4825
 *     def select_hyperslab(self, object start, object count, object stride=None,
 
4826
 *                          object block=None, int op=H5S_SELECT_SET):
 
4827
 */
 
4828
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sync); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4829
  __Pyx_GOTREF(__pyx_1);
 
4830
 
 
4831
  /* "/home/tachyon/pydev/h5py/h5py/h5s.pyx":522
 
4832
 * 
 
4833
 *     @sync
 
4834
 *     def select_hyperslab(self, object start, object count, object stride=None,             # <<<<<<<<<<<<<<
 
4835
 *                          object block=None, int op=H5S_SELECT_SET):
 
4836
 *         """(TUPLE start, TUPLE count, TUPLE stride=None, TUPLE block=None,
 
4837
 */
 
4838
  __pyx_2 = __Pyx_GetName((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID, __pyx_kp_select_hyperslab); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4839
  __Pyx_GOTREF(__pyx_2);
 
4840
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4841
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
4842
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_2);
 
4843
  __Pyx_GIVEREF(__pyx_2);
 
4844
  __pyx_2 = 0;
 
4845
  __pyx_t_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4846
  __Pyx_GOTREF(__pyx_t_3);
 
4847
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
 
4848
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
4849
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4h5py_3h5s_SpaceID->tp_dict, __pyx_kp_select_hyperslab, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4850
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
4851
  PyType_Modified(__pyx_ptype_4h5py_3h5s_SpaceID);
 
4852
 
 
4853
  /* "/home/tachyon/pydev/h5py/h5py/h5.pxd":42
 
4854
 * 
 
4855
 *     cdef object __weakref__
 
4856
 *     cdef readonly hid_t id             # <<<<<<<<<<<<<<
 
4857
 *     cdef readonly int _locked
 
4858
 *     cdef object _hash
 
4859
 */
 
4860
  goto __pyx_L0;
 
4861
  __pyx_L1_error:;
 
4862
  __Pyx_XDECREF(__pyx_1);
 
4863
  __Pyx_XDECREF(__pyx_2);
 
4864
  __Pyx_XDECREF(__pyx_t_2);
 
4865
  __Pyx_XDECREF(__pyx_t_3);
 
4866
  __Pyx_AddTraceback("h5py.h5s");
 
4867
  Py_DECREF(__pyx_m); __pyx_m = 0;
 
4868
  __pyx_L0:;
 
4869
  __Pyx_FinishRefcountContext();
 
4870
  #if PY_MAJOR_VERSION < 3
 
4871
  return;
 
4872
  #else
 
4873
  return __pyx_m;
 
4874
  #endif
 
4875
}
 
4876
 
 
4877
static const char *__pyx_filenames[] = {
 
4878
  "h5s.pyx",
 
4879
  "h5.pxd",
 
4880
  "numpy.pxd",
 
4881
};
 
4882
 
 
4883
/* Runtime support code */
 
4884
 
 
4885
static void __pyx_init_filenames(void) {
 
4886
  __pyx_f = __pyx_filenames;
 
4887
}
 
4888
 
 
4889
static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
 
4890
    if (!type) {
 
4891
        PyErr_Format(PyExc_SystemError, "Missing type object");
 
4892
        return 0;
 
4893
    }
 
4894
    if (obj == Py_None || PyObject_TypeCheck(obj, type))
 
4895
        return 1;
 
4896
    PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s",
 
4897
        Py_TYPE(obj)->tp_name, type->tp_name);
 
4898
    return 0;
 
4899
}
 
4900
 
 
4901
static void __Pyx_RaiseDoubleKeywordsError(
 
4902
    const char* func_name,
 
4903
    PyObject* kw_name)
 
4904
{
 
4905
    PyErr_Format(PyExc_TypeError,
 
4906
        #if PY_MAJOR_VERSION >= 3
 
4907
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
 
4908
        #else
 
4909
        "%s() got multiple values for keyword argument '%s'", func_name,
 
4910
        PyString_AS_STRING(kw_name));
 
4911
        #endif
 
4912
}
 
4913
 
 
4914
static void __Pyx_RaiseArgtupleInvalid(
 
4915
    const char* func_name,
 
4916
    int exact,
 
4917
    Py_ssize_t num_min,
 
4918
    Py_ssize_t num_max,
 
4919
    Py_ssize_t num_found)
 
4920
{
 
4921
    Py_ssize_t num_expected;
 
4922
    const char *number, *more_or_less;
 
4923
 
 
4924
    if (num_found < num_min) {
 
4925
        num_expected = num_min;
 
4926
        more_or_less = "at least";
 
4927
    } else {
 
4928
        num_expected = num_max;
 
4929
        more_or_less = "at most";
 
4930
    }
 
4931
    if (exact) {
 
4932
        more_or_less = "exactly";
 
4933
    }
 
4934
    number = (num_expected == 1) ? "" : "s";
 
4935
    PyErr_Format(PyExc_TypeError,
 
4936
        #if PY_VERSION_HEX < 0x02050000
 
4937
            "%s() takes %s %d positional argument%s (%d given)",
 
4938
        #else
 
4939
            "%s() takes %s %zd positional argument%s (%zd given)",
 
4940
        #endif
 
4941
        func_name, more_or_less, num_expected, number, num_found);
 
4942
}
 
4943
 
 
4944
static int __Pyx_ParseOptionalKeywords(
 
4945
    PyObject *kwds,
 
4946
    PyObject **argnames[],
 
4947
    PyObject *kwds2,
 
4948
    PyObject *values[],
 
4949
    Py_ssize_t num_pos_args,
 
4950
    const char* function_name)
 
4951
{
 
4952
    PyObject *key = 0, *value = 0;
 
4953
    Py_ssize_t pos = 0;
 
4954
    PyObject*** name;
 
4955
    PyObject*** first_kw_arg = argnames + num_pos_args;
 
4956
 
 
4957
    while (PyDict_Next(kwds, &pos, &key, &value)) {
 
4958
        name = first_kw_arg;
 
4959
        while (*name && (**name != key)) name++;
 
4960
        if (*name) {
 
4961
            values[name-argnames] = value;
 
4962
        } else {
 
4963
            #if PY_MAJOR_VERSION < 3
 
4964
            if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
 
4965
            #else
 
4966
            if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
 
4967
            #endif
 
4968
                goto invalid_keyword_type;
 
4969
            } else {
 
4970
                for (name = first_kw_arg; *name; name++) {
 
4971
                    #if PY_MAJOR_VERSION >= 3
 
4972
                    if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
 
4973
                        PyUnicode_Compare(**name, key) == 0) break;
 
4974
                    #else
 
4975
                    if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
 
4976
                        _PyString_Eq(**name, key)) break;
 
4977
                    #endif
 
4978
                }
 
4979
                if (*name) {
 
4980
                    values[name-argnames] = value;
 
4981
                } else {
 
4982
                    /* unexpected keyword found */
 
4983
                    for (name=argnames; name != first_kw_arg; name++) {
 
4984
                        if (**name == key) goto arg_passed_twice;
 
4985
                        #if PY_MAJOR_VERSION >= 3
 
4986
                        if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
 
4987
                            PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
 
4988
                        #else
 
4989
                        if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
 
4990
                            _PyString_Eq(**name, key)) goto arg_passed_twice;
 
4991
                        #endif
 
4992
                    }
 
4993
                    if (kwds2) {
 
4994
                        if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
 
4995
                    } else {
 
4996
                        goto invalid_keyword;
 
4997
                    }
 
4998
                }
 
4999
            }
 
5000
        }
 
5001
    }
 
5002
    return 0;
 
5003
arg_passed_twice:
 
5004
    __Pyx_RaiseDoubleKeywordsError(function_name, **name);
 
5005
    goto bad;
 
5006
invalid_keyword_type:
 
5007
    PyErr_Format(PyExc_TypeError,
 
5008
        "%s() keywords must be strings", function_name);
 
5009
    goto bad;
 
5010
invalid_keyword:
 
5011
    PyErr_Format(PyExc_TypeError,
 
5012
    #if PY_MAJOR_VERSION < 3
 
5013
        "%s() got an unexpected keyword argument '%s'",
 
5014
        function_name, PyString_AsString(key));
 
5015
    #else
 
5016
        "%s() got an unexpected keyword argument '%U'",
 
5017
        function_name, key);
 
5018
    #endif
 
5019
bad:
 
5020
    return -1;
 
5021
}
 
5022
 
 
5023
static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
 
5024
    PyObject *tmp_type, *tmp_value, *tmp_tb;
 
5025
    PyThreadState *tstate = PyThreadState_GET();
 
5026
 
 
5027
#if PY_MAJOR_VERSION >= 3
 
5028
    /* Note: this is a temporary work-around to prevent crashes in Python 3.0 */
 
5029
    if ((tstate->exc_type != NULL) & (tstate->exc_type != Py_None)) {
 
5030
        tmp_type = tstate->exc_type;
 
5031
        tmp_value = tstate->exc_value;
 
5032
        tmp_tb = tstate->exc_traceback;
 
5033
        PyErr_NormalizeException(&type, &value, &tb);
 
5034
        PyErr_NormalizeException(&tmp_type, &tmp_value, &tmp_tb);
 
5035
        tstate->exc_type = 0;
 
5036
        tstate->exc_value = 0;
 
5037
        tstate->exc_traceback = 0;
 
5038
        PyException_SetContext(value, tmp_value);
 
5039
        Py_DECREF(tmp_type);
 
5040
        Py_XDECREF(tmp_tb);
 
5041
    }
 
5042
#endif
 
5043
 
 
5044
    tmp_type = tstate->curexc_type;
 
5045
    tmp_value = tstate->curexc_value;
 
5046
    tmp_tb = tstate->curexc_traceback;
 
5047
    tstate->curexc_type = type;
 
5048
    tstate->curexc_value = value;
 
5049
    tstate->curexc_traceback = tb;
 
5050
    Py_XDECREF(tmp_type);
 
5051
    Py_XDECREF(tmp_value);
 
5052
    Py_XDECREF(tmp_tb);
 
5053
}
 
5054
 
 
5055
static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
 
5056
    PyThreadState *tstate = PyThreadState_GET();
 
5057
    *type = tstate->curexc_type;
 
5058
    *value = tstate->curexc_value;
 
5059
    *tb = tstate->curexc_traceback;
 
5060
 
 
5061
    tstate->curexc_type = 0;
 
5062
    tstate->curexc_value = 0;
 
5063
    tstate->curexc_traceback = 0;
 
5064
}
 
5065
 
 
5066
 
 
5067
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
 
5068
    const char *name, int exact)
 
5069
{
 
5070
    if (!type) {
 
5071
        PyErr_Format(PyExc_SystemError, "Missing type object");
 
5072
        return 0;
 
5073
    }
 
5074
    if (none_allowed && obj == Py_None) return 1;
 
5075
    else if (exact) {
 
5076
        if (Py_TYPE(obj) == type) return 1;
 
5077
    }
 
5078
    else {
 
5079
        if (PyObject_TypeCheck(obj, type)) return 1;
 
5080
    }
 
5081
    PyErr_Format(PyExc_TypeError,
 
5082
        "Argument '%s' has incorrect type (expected %s, got %s)",
 
5083
        name, type->tp_name, Py_TYPE(obj)->tp_name);
 
5084
    return 0;
 
5085
}
 
5086
 
 
5087
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
 
5088
    PyObject *__import__ = 0;
 
5089
    PyObject *empty_list = 0;
 
5090
    PyObject *module = 0;
 
5091
    PyObject *global_dict = 0;
 
5092
    PyObject *empty_dict = 0;
 
5093
    PyObject *list;
 
5094
    __import__ = __Pyx_GetAttrString(__pyx_b, "__import__");
 
5095
    if (!__import__)
 
5096
        goto bad;
 
5097
    if (from_list)
 
5098
        list = from_list;
 
5099
    else {
 
5100
        empty_list = PyList_New(0);
 
5101
        if (!empty_list)
 
5102
            goto bad;
 
5103
        list = empty_list;
 
5104
    }
 
5105
    global_dict = PyModule_GetDict(__pyx_m);
 
5106
    if (!global_dict)
 
5107
        goto bad;
 
5108
    empty_dict = PyDict_New();
 
5109
    if (!empty_dict)
 
5110
        goto bad;
 
5111
    module = PyObject_CallFunctionObjArgs(__import__,
 
5112
        name, global_dict, empty_dict, list, NULL);
 
5113
bad:
 
5114
    Py_XDECREF(empty_list);
 
5115
    Py_XDECREF(__import__);
 
5116
    Py_XDECREF(empty_dict);
 
5117
    return module;
 
5118
}
 
5119
 
 
5120
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
 
5121
    PyObject *result;
 
5122
    result = PyObject_GetAttr(dict, name);
 
5123
    if (!result)
 
5124
        PyErr_SetObject(PyExc_NameError, name);
 
5125
    return result;
 
5126
}
 
5127
 
 
5128
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
 
5129
    Py_XINCREF(type);
 
5130
    Py_XINCREF(value);
 
5131
    Py_XINCREF(tb);
 
5132
    /* First, check the traceback argument, replacing None with NULL. */
 
5133
    if (tb == Py_None) {
 
5134
        Py_DECREF(tb);
 
5135
        tb = 0;
 
5136
    }
 
5137
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
 
5138
        PyErr_SetString(PyExc_TypeError,
 
5139
            "raise: arg 3 must be a traceback or None");
 
5140
        goto raise_error;
 
5141
    }
 
5142
    /* Next, replace a missing value with None */
 
5143
    if (value == NULL) {
 
5144
        value = Py_None;
 
5145
        Py_INCREF(value);
 
5146
    }
 
5147
    #if PY_VERSION_HEX < 0x02050000
 
5148
    if (!PyClass_Check(type))
 
5149
    #else
 
5150
    if (!PyType_Check(type))
 
5151
    #endif
 
5152
    {
 
5153
        /* Raising an instance.  The value should be a dummy. */
 
5154
        if (value != Py_None) {
 
5155
            PyErr_SetString(PyExc_TypeError,
 
5156
                "instance exception may not have a separate value");
 
5157
            goto raise_error;
 
5158
        }
 
5159
        /* Normalize to raise <class>, <instance> */
 
5160
        Py_DECREF(value);
 
5161
        value = type;
 
5162
        #if PY_VERSION_HEX < 0x02050000
 
5163
            if (PyInstance_Check(type)) {
 
5164
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
 
5165
                Py_INCREF(type);
 
5166
            }
 
5167
            else {
 
5168
                type = 0;
 
5169
                PyErr_SetString(PyExc_TypeError,
 
5170
                    "raise: exception must be an old-style class or instance");
 
5171
                goto raise_error;
 
5172
            }
 
5173
        #else
 
5174
            type = (PyObject*) Py_TYPE(type);
 
5175
            Py_INCREF(type);
 
5176
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
 
5177
                PyErr_SetString(PyExc_TypeError,
 
5178
                    "raise: exception class must be a subclass of BaseException");
 
5179
                goto raise_error;
 
5180
            }
 
5181
        #endif
 
5182
    }
 
5183
    __Pyx_ErrRestore(type, value, tb);
 
5184
    return;
 
5185
raise_error:
 
5186
    Py_XDECREF(value);
 
5187
    Py_XDECREF(type);
 
5188
    Py_XDECREF(tb);
 
5189
    return;
 
5190
}
 
5191
 
 
5192
static INLINE int __Pyx_StrEq(const char *s1, const char *s2) {
 
5193
     while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
 
5194
     return *s1 == *s2;
 
5195
}
 
5196
 
 
5197
static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
 
5198
    if (sizeof(unsigned char) < sizeof(long)) {
 
5199
        long val = __Pyx_PyInt_AsLong(x);
 
5200
        if (unlikely(val != (long)(unsigned char)val)) {
 
5201
            if (unlikely(val == -1 && PyErr_Occurred()))
 
5202
                return (unsigned char)-1;
 
5203
            if (unlikely(val < 0)) {
 
5204
                PyErr_SetString(PyExc_OverflowError,
 
5205
                                "can't convert negative value to unsigned char");
 
5206
                return (unsigned char)-1;
 
5207
            }
 
5208
            PyErr_SetString(PyExc_OverflowError,
 
5209
                           "value too large to convert to unsigned char");
 
5210
            return (unsigned char)-1;
 
5211
        }
 
5212
        return (unsigned char)val;
 
5213
    }
 
5214
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
 
5215
}
 
5216
 
 
5217
static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
 
5218
    if (sizeof(unsigned short) < sizeof(long)) {
 
5219
        long val = __Pyx_PyInt_AsLong(x);
 
5220
        if (unlikely(val != (long)(unsigned short)val)) {
 
5221
            if (unlikely(val == -1 && PyErr_Occurred()))
 
5222
                return (unsigned short)-1;
 
5223
            if (unlikely(val < 0)) {
 
5224
                PyErr_SetString(PyExc_OverflowError,
 
5225
                                "can't convert negative value to unsigned short");
 
5226
                return (unsigned short)-1;
 
5227
            }
 
5228
            PyErr_SetString(PyExc_OverflowError,
 
5229
                           "value too large to convert to unsigned short");
 
5230
            return (unsigned short)-1;
 
5231
        }
 
5232
        return (unsigned short)val;
 
5233
    }
 
5234
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
 
5235
}
 
5236
 
 
5237
static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
 
5238
    if (sizeof(unsigned int) < sizeof(long)) {
 
5239
        long val = __Pyx_PyInt_AsLong(x);
 
5240
        if (unlikely(val != (long)(unsigned int)val)) {
 
5241
            if (unlikely(val == -1 && PyErr_Occurred()))
 
5242
                return (unsigned int)-1;
 
5243
            if (unlikely(val < 0)) {
 
5244
                PyErr_SetString(PyExc_OverflowError,
 
5245
                                "can't convert negative value to unsigned int");
 
5246
                return (unsigned int)-1;
 
5247
            }
 
5248
            PyErr_SetString(PyExc_OverflowError,
 
5249
                           "value too large to convert to unsigned int");
 
5250
            return (unsigned int)-1;
 
5251
        }
 
5252
        return (unsigned int)val;
 
5253
    }
 
5254
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
 
5255
}
 
5256
 
 
5257
static INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
 
5258
    if (sizeof(char) < sizeof(long)) {
 
5259
        long val = __Pyx_PyInt_AsLong(x);
 
5260
        if (unlikely(val != (long)(char)val)) {
 
5261
            if (unlikely(val == -1 && PyErr_Occurred()))
 
5262
                return (char)-1;
 
5263
            PyErr_SetString(PyExc_OverflowError,
 
5264
                           "value too large to convert to char");
 
5265
            return (char)-1;
 
5266
        }
 
5267
        return (char)val;
 
5268
    }
 
5269
    return (char)__Pyx_PyInt_AsLong(x);
 
5270
}
 
5271
 
 
5272
static INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
 
5273
    if (sizeof(short) < sizeof(long)) {
 
5274
        long val = __Pyx_PyInt_AsLong(x);
 
5275
        if (unlikely(val != (long)(short)val)) {
 
5276
            if (unlikely(val == -1 && PyErr_Occurred()))
 
5277
                return (short)-1;
 
5278
            PyErr_SetString(PyExc_OverflowError,
 
5279
                           "value too large to convert to short");
 
5280
            return (short)-1;
 
5281
        }
 
5282
        return (short)val;
 
5283
    }
 
5284
    return (short)__Pyx_PyInt_AsLong(x);
 
5285
}
 
5286
 
 
5287
static INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
 
5288
    if (sizeof(int) < sizeof(long)) {
 
5289
        long val = __Pyx_PyInt_AsLong(x);
 
5290
        if (unlikely(val != (long)(int)val)) {
 
5291
            if (unlikely(val == -1 && PyErr_Occurred()))
 
5292
                return (int)-1;
 
5293
            PyErr_SetString(PyExc_OverflowError,
 
5294
                           "value too large to convert to int");
 
5295
            return (int)-1;
 
5296
        }
 
5297
        return (int)val;
 
5298
    }
 
5299
    return (int)__Pyx_PyInt_AsLong(x);
 
5300
}
 
5301
 
 
5302
static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
 
5303
    if (sizeof(signed char) < sizeof(long)) {
 
5304
        long val = __Pyx_PyInt_AsLong(x);
 
5305
        if (unlikely(val != (long)(signed char)val)) {
 
5306
            if (unlikely(val == -1 && PyErr_Occurred()))
 
5307
                return (signed char)-1;
 
5308
            PyErr_SetString(PyExc_OverflowError,
 
5309
                           "value too large to convert to signed char");
 
5310
            return (signed char)-1;
 
5311
        }
 
5312
        return (signed char)val;
 
5313
    }
 
5314
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
 
5315
}
 
5316
 
 
5317
static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
 
5318
    if (sizeof(signed short) < sizeof(long)) {
 
5319
        long val = __Pyx_PyInt_AsLong(x);
 
5320
        if (unlikely(val != (long)(signed short)val)) {
 
5321
            if (unlikely(val == -1 && PyErr_Occurred()))
 
5322
                return (signed short)-1;
 
5323
            PyErr_SetString(PyExc_OverflowError,
 
5324
                           "value too large to convert to signed short");
 
5325
            return (signed short)-1;
 
5326
        }
 
5327
        return (signed short)val;
 
5328
    }
 
5329
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
 
5330
}
 
5331
 
 
5332
static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
 
5333
    if (sizeof(signed int) < sizeof(long)) {
 
5334
        long val = __Pyx_PyInt_AsLong(x);
 
5335
        if (unlikely(val != (long)(signed int)val)) {
 
5336
            if (unlikely(val == -1 && PyErr_Occurred()))
 
5337
                return (signed int)-1;
 
5338
            PyErr_SetString(PyExc_OverflowError,
 
5339
                           "value too large to convert to signed int");
 
5340
            return (signed int)-1;
 
5341
        }
 
5342
        return (signed int)val;
 
5343
    }
 
5344
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
 
5345
}
 
5346
 
 
5347
static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
 
5348
#if PY_VERSION_HEX < 0x03000000
 
5349
    if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
 
5350
        long val = PyInt_AS_LONG(x);
 
5351
        if (unlikely(val < 0)) {
 
5352
            PyErr_SetString(PyExc_OverflowError,
 
5353
                            "can't convert negative value to unsigned long");
 
5354
            return (unsigned long)-1;
 
5355
        }
 
5356
        return (unsigned long)val;
 
5357
    } else
 
5358
#endif
 
5359
    if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
 
5360
        if (unlikely(Py_SIZE(x) < 0)) {
 
5361
            PyErr_SetString(PyExc_OverflowError,
 
5362
                            "can't convert negative value to unsigned long");
 
5363
            return (unsigned long)-1;
 
5364
        }
 
5365
        return PyLong_AsUnsignedLong(x);
 
5366
    } else {
 
5367
        unsigned long val;
 
5368
        PyObject *tmp = __Pyx_PyNumber_Int(x);
 
5369
        if (!tmp) return (unsigned long)-1;
 
5370
        val = __Pyx_PyInt_AsUnsignedLong(tmp);
 
5371
        Py_DECREF(tmp);
 
5372
        return val;
 
5373
    }
 
5374
}
 
5375
 
 
5376
static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
 
5377
#if PY_VERSION_HEX < 0x03000000
 
5378
    if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
 
5379
        long val = PyInt_AS_LONG(x);
 
5380
        if (unlikely(val < 0)) {
 
5381
            PyErr_SetString(PyExc_OverflowError,
 
5382
                            "can't convert negative value to unsigned PY_LONG_LONG");
 
5383
            return (unsigned PY_LONG_LONG)-1;
 
5384
        }
 
5385
        return (unsigned PY_LONG_LONG)val;
 
5386
    } else
 
5387
#endif
 
5388
    if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
 
5389
        if (unlikely(Py_SIZE(x) < 0)) {
 
5390
            PyErr_SetString(PyExc_OverflowError,
 
5391
                            "can't convert negative value to unsigned PY_LONG_LONG");
 
5392
            return (unsigned PY_LONG_LONG)-1;
 
5393
        }
 
5394
        return PyLong_AsUnsignedLongLong(x);
 
5395
    } else {
 
5396
        unsigned PY_LONG_LONG val;
 
5397
        PyObject *tmp = __Pyx_PyNumber_Int(x);
 
5398
        if (!tmp) return (unsigned PY_LONG_LONG)-1;
 
5399
        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
 
5400
        Py_DECREF(tmp);
 
5401
        return val;
 
5402
    }
 
5403
}
 
5404
 
 
5405
static INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
 
5406
#if PY_VERSION_HEX < 0x03000000
 
5407
    if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
 
5408
        long val = PyInt_AS_LONG(x);
 
5409
        return (long)val;
 
5410
    } else
 
5411
#endif
 
5412
    if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
 
5413
        return PyLong_AsLong(x);
 
5414
    } else {
 
5415
        long val;
 
5416
        PyObject *tmp = __Pyx_PyNumber_Int(x);
 
5417
        if (!tmp) return (long)-1;
 
5418
        val = __Pyx_PyInt_AsLong(tmp);
 
5419
        Py_DECREF(tmp);
 
5420
        return val;
 
5421
    }
 
5422
}
 
5423
 
 
5424
static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
 
5425
#if PY_VERSION_HEX < 0x03000000
 
5426
    if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
 
5427
        long val = PyInt_AS_LONG(x);
 
5428
        return (PY_LONG_LONG)val;
 
5429
    } else
 
5430
#endif
 
5431
    if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
 
5432
        return PyLong_AsLongLong(x);
 
5433
    } else {
 
5434
        PY_LONG_LONG val;
 
5435
        PyObject *tmp = __Pyx_PyNumber_Int(x);
 
5436
        if (!tmp) return (PY_LONG_LONG)-1;
 
5437
        val = __Pyx_PyInt_AsLongLong(tmp);
 
5438
        Py_DECREF(tmp);
 
5439
        return val;
 
5440
    }
 
5441
}
 
5442
 
 
5443
static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
 
5444
#if PY_VERSION_HEX < 0x03000000
 
5445
    if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
 
5446
        long val = PyInt_AS_LONG(x);
 
5447
        return (signed long)val;
 
5448
    } else
 
5449
#endif
 
5450
    if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
 
5451
        return PyLong_AsLong(x);
 
5452
    } else {
 
5453
        signed long val;
 
5454
        PyObject *tmp = __Pyx_PyNumber_Int(x);
 
5455
        if (!tmp) return (signed long)-1;
 
5456
        val = __Pyx_PyInt_AsSignedLong(tmp);
 
5457
        Py_DECREF(tmp);
 
5458
        return val;
 
5459
    }
 
5460
}
 
5461
 
 
5462
static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
 
5463
#if PY_VERSION_HEX < 0x03000000
 
5464
    if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
 
5465
        long val = PyInt_AS_LONG(x);
 
5466
        return (signed PY_LONG_LONG)val;
 
5467
    } else
 
5468
#endif
 
5469
    if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
 
5470
        return PyLong_AsLongLong(x);
 
5471
    } else {
 
5472
        signed PY_LONG_LONG val;
 
5473
        PyObject *tmp = __Pyx_PyNumber_Int(x);
 
5474
        if (!tmp) return (signed PY_LONG_LONG)-1;
 
5475
        val = __Pyx_PyInt_AsSignedLongLong(tmp);
 
5476
        Py_DECREF(tmp);
 
5477
        return val;
 
5478
    }
 
5479
}
 
5480
 
 
5481
#ifndef __PYX_HAVE_RT_ImportType
 
5482
#define __PYX_HAVE_RT_ImportType
 
5483
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
 
5484
    long size)
 
5485
{
 
5486
    PyObject *py_module = 0;
 
5487
    PyObject *result = 0;
 
5488
    PyObject *py_name = 0;
 
5489
 
 
5490
    py_module = __Pyx_ImportModule(module_name);
 
5491
    if (!py_module)
 
5492
        goto bad;
 
5493
    #if PY_MAJOR_VERSION < 3
 
5494
    py_name = PyString_FromString(class_name);
 
5495
    #else
 
5496
    py_name = PyUnicode_FromString(class_name);
 
5497
    #endif
 
5498
    if (!py_name)
 
5499
        goto bad;
 
5500
    result = PyObject_GetAttr(py_module, py_name);
 
5501
    Py_DECREF(py_name);
 
5502
    py_name = 0;
 
5503
    Py_DECREF(py_module);
 
5504
    py_module = 0;
 
5505
    if (!result)
 
5506
        goto bad;
 
5507
    if (!PyType_Check(result)) {
 
5508
        PyErr_Format(PyExc_TypeError, 
 
5509
            "%s.%s is not a type object",
 
5510
            module_name, class_name);
 
5511
        goto bad;
 
5512
    }
 
5513
    if (((PyTypeObject *)result)->tp_basicsize != size) {
 
5514
        PyErr_Format(PyExc_ValueError, 
 
5515
            "%s.%s does not appear to be the correct type object",
 
5516
            module_name, class_name);
 
5517
        goto bad;
 
5518
    }
 
5519
    return (PyTypeObject *)result;
 
5520
bad:
 
5521
    Py_XDECREF(py_module);
 
5522
    Py_XDECREF(result);
 
5523
    return 0;
 
5524
}
 
5525
#endif
 
5526
 
 
5527
#ifndef __PYX_HAVE_RT_ImportModule
 
5528
#define __PYX_HAVE_RT_ImportModule
 
5529
static PyObject *__Pyx_ImportModule(const char *name) {
 
5530
    PyObject *py_name = 0;
 
5531
    PyObject *py_module = 0;
 
5532
 
 
5533
    #if PY_MAJOR_VERSION < 3
 
5534
    py_name = PyString_FromString(name);
 
5535
    #else
 
5536
    py_name = PyUnicode_FromString(name);
 
5537
    #endif
 
5538
    if (!py_name)
 
5539
        goto bad;
 
5540
    py_module = PyImport_Import(py_name);
 
5541
    Py_DECREF(py_name);
 
5542
    return py_module;
 
5543
bad:
 
5544
    Py_XDECREF(py_name);
 
5545
    return 0;
 
5546
}
 
5547
#endif
 
5548
 
 
5549
static int __Pyx_GetVtable(PyObject *dict, void *vtabptr) {
 
5550
    int result;
 
5551
    PyObject *pycobj;
 
5552
 
 
5553
    pycobj = PyMapping_GetItemString(dict, (char *)"__pyx_vtable__");
 
5554
    if (!pycobj)
 
5555
        goto bad;
 
5556
    *(void **)vtabptr = PyCObject_AsVoidPtr(pycobj);
 
5557
    if (!*(void **)vtabptr)
 
5558
        goto bad;
 
5559
    result = 0;
 
5560
    goto done;
 
5561
 
 
5562
bad:
 
5563
    result = -1;
 
5564
done:
 
5565
    Py_XDECREF(pycobj);
 
5566
    return result;
 
5567
}
 
5568
 
 
5569
#ifndef __PYX_HAVE_RT_ImportFunction
 
5570
#define __PYX_HAVE_RT_ImportFunction
 
5571
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
 
5572
#if PY_VERSION_HEX < 0x02050000
 
5573
    char *api = (char *)"__pyx_capi__";
 
5574
#else
 
5575
    const char *api = "__pyx_capi__";
 
5576
#endif
 
5577
    PyObject *d = 0;
 
5578
    PyObject *cobj = 0;
 
5579
    const char *desc;
 
5580
    const char *s1, *s2;
 
5581
    union {
 
5582
        void (*fp)(void);
 
5583
        void *p;
 
5584
    } tmp;
 
5585
 
 
5586
    d = PyObject_GetAttrString(module, api);
 
5587
    if (!d)
 
5588
        goto bad;
 
5589
    cobj = PyDict_GetItemString(d, funcname);
 
5590
    if (!cobj) {
 
5591
        PyErr_Format(PyExc_ImportError,
 
5592
            "%s does not export expected C function %s",
 
5593
                PyModule_GetName(module), funcname);
 
5594
        goto bad;
 
5595
    }
 
5596
    desc = (const char *)PyCObject_GetDesc(cobj);
 
5597
    if (!desc)
 
5598
        goto bad;
 
5599
    s1 = desc; s2 = sig;
 
5600
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
 
5601
    if (*s1 != *s2) {
 
5602
        PyErr_Format(PyExc_TypeError,
 
5603
            "C function %s.%s has wrong signature (expected %s, got %s)",
 
5604
             PyModule_GetName(module), funcname, sig, desc);
 
5605
        goto bad;
 
5606
    }
 
5607
    tmp.p = PyCObject_AsVoidPtr(cobj);
 
5608
    *f = tmp.fp;
 
5609
    Py_DECREF(d);
 
5610
    return 0;
 
5611
bad:
 
5612
    Py_XDECREF(d);
 
5613
    return -1;
 
5614
}
 
5615
#endif
 
5616
 
 
5617
#include "compile.h"
 
5618
#include "frameobject.h"
 
5619
#include "traceback.h"
 
5620
 
 
5621
static void __Pyx_AddTraceback(const char *funcname) {
 
5622
    PyObject *py_srcfile = 0;
 
5623
    PyObject *py_funcname = 0;
 
5624
    PyObject *py_globals = 0;
 
5625
    PyObject *empty_string = 0;
 
5626
    PyCodeObject *py_code = 0;
 
5627
    PyFrameObject *py_frame = 0;
 
5628
 
 
5629
    #if PY_MAJOR_VERSION < 3
 
5630
    py_srcfile = PyString_FromString(__pyx_filename);
 
5631
    #else
 
5632
    py_srcfile = PyUnicode_FromString(__pyx_filename);
 
5633
    #endif
 
5634
    if (!py_srcfile) goto bad;
 
5635
    if (__pyx_clineno) {
 
5636
        #if PY_MAJOR_VERSION < 3
 
5637
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
 
5638
        #else
 
5639
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
 
5640
        #endif
 
5641
    }
 
5642
    else {
 
5643
        #if PY_MAJOR_VERSION < 3
 
5644
        py_funcname = PyString_FromString(funcname);
 
5645
        #else
 
5646
        py_funcname = PyUnicode_FromString(funcname);
 
5647
        #endif
 
5648
    }
 
5649
    if (!py_funcname) goto bad;
 
5650
    py_globals = PyModule_GetDict(__pyx_m);
 
5651
    if (!py_globals) goto bad;
 
5652
    #if PY_MAJOR_VERSION < 3
 
5653
    empty_string = PyString_FromStringAndSize("", 0);
 
5654
    #else
 
5655
    empty_string = PyBytes_FromStringAndSize("", 0);
 
5656
    #endif
 
5657
    if (!empty_string) goto bad;
 
5658
    py_code = PyCode_New(
 
5659
        0,            /*int argcount,*/
 
5660
        #if PY_MAJOR_VERSION >= 3
 
5661
        0,            /*int kwonlyargcount,*/
 
5662
        #endif
 
5663
        0,            /*int nlocals,*/
 
5664
        0,            /*int stacksize,*/
 
5665
        0,            /*int flags,*/
 
5666
        empty_string, /*PyObject *code,*/
 
5667
        __pyx_empty_tuple,  /*PyObject *consts,*/
 
5668
        __pyx_empty_tuple,  /*PyObject *names,*/
 
5669
        __pyx_empty_tuple,  /*PyObject *varnames,*/
 
5670
        __pyx_empty_tuple,  /*PyObject *freevars,*/
 
5671
        __pyx_empty_tuple,  /*PyObject *cellvars,*/
 
5672
        py_srcfile,   /*PyObject *filename,*/
 
5673
        py_funcname,  /*PyObject *name,*/
 
5674
        __pyx_lineno,   /*int firstlineno,*/
 
5675
        empty_string  /*PyObject *lnotab*/
 
5676
    );
 
5677
    if (!py_code) goto bad;
 
5678
    py_frame = PyFrame_New(
 
5679
        PyThreadState_GET(), /*PyThreadState *tstate,*/
 
5680
        py_code,             /*PyCodeObject *code,*/
 
5681
        py_globals,          /*PyObject *globals,*/
 
5682
        0                    /*PyObject *locals*/
 
5683
    );
 
5684
    if (!py_frame) goto bad;
 
5685
    py_frame->f_lineno = __pyx_lineno;
 
5686
    PyTraceBack_Here(py_frame);
 
5687
bad:
 
5688
    Py_XDECREF(py_srcfile);
 
5689
    Py_XDECREF(py_funcname);
 
5690
    Py_XDECREF(empty_string);
 
5691
    Py_XDECREF(py_code);
 
5692
    Py_XDECREF(py_frame);
 
5693
}
 
5694
 
 
5695
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
 
5696
    while (t->p) {
 
5697
        #if PY_MAJOR_VERSION < 3
 
5698
        if (t->is_unicode && (!t->is_identifier)) {
 
5699
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
 
5700
        } else if (t->intern) {
 
5701
            *t->p = PyString_InternFromString(t->s);
 
5702
        } else {
 
5703
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
 
5704
        }
 
5705
        #else  /* Python 3+ has unicode identifiers */
 
5706
        if (t->is_identifier || (t->is_unicode && t->intern)) {
 
5707
            *t->p = PyUnicode_InternFromString(t->s);
 
5708
        } else if (t->is_unicode) {
 
5709
            *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
 
5710
        } else {
 
5711
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
 
5712
        }
 
5713
        #endif
 
5714
        if (!*t->p)
 
5715
            return -1;
 
5716
        ++t;
 
5717
    }
 
5718
    return 0;
 
5719
}
 
5720
 
 
5721
/* Type Conversion Functions */
 
5722
 
 
5723
static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
 
5724
   if (x == Py_True) return 1;
 
5725
   else if ((x == Py_False) | (x == Py_None)) return 0;
 
5726
   else return PyObject_IsTrue(x);
 
5727
}
 
5728
 
 
5729
static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
 
5730
  PyNumberMethods *m;
 
5731
  const char *name = NULL;
 
5732
  PyObject *res = NULL;
 
5733
#if PY_VERSION_HEX < 0x03000000
 
5734
  if (PyInt_Check(x) || PyLong_Check(x))
 
5735
#else
 
5736
  if (PyLong_Check(x))
 
5737
#endif
 
5738
    return Py_INCREF(x), x;
 
5739
  m = Py_TYPE(x)->tp_as_number;
 
5740
#if PY_VERSION_HEX < 0x03000000
 
5741
  if (m && m->nb_int) {
 
5742
    name = "int";
 
5743
    res = PyNumber_Int(x);
 
5744
  }
 
5745
  else if (m && m->nb_long) {
 
5746
    name = "long";
 
5747
    res = PyNumber_Long(x);
 
5748
  }
 
5749
#else
 
5750
  if (m && m->nb_int) {
 
5751
    name = "int";
 
5752
    res = PyNumber_Long(x);
 
5753
  }
 
5754
#endif
 
5755
  if (res) {
 
5756
#if PY_VERSION_HEX < 0x03000000
 
5757
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
 
5758
#else
 
5759
    if (!PyLong_Check(res)) {
 
5760
#endif
 
5761
      PyErr_Format(PyExc_TypeError,
 
5762
                   "__%s__ returned non-%s (type %.200s)",
 
5763
                   name, name, Py_TYPE(res)->tp_name);
 
5764
      Py_DECREF(res);
 
5765
      return NULL;
 
5766
    }
 
5767
  }
 
5768
  else if (!PyErr_Occurred()) {
 
5769
    PyErr_SetString(PyExc_TypeError,
 
5770
                    "an integer is required");
 
5771
  }
 
5772
  return res;
 
5773
}
 
5774
 
 
5775
static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
 
5776
  Py_ssize_t ival;
 
5777
  PyObject* x = PyNumber_Index(b);
 
5778
  if (!x) return -1;
 
5779
  ival = PyInt_AsSsize_t(x);
 
5780
  Py_DECREF(x);
 
5781
  return ival;
 
5782
}
 
5783
 
 
5784
static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
 
5785
#if PY_VERSION_HEX < 0x02050000
 
5786
   if (ival <= LONG_MAX)
 
5787
       return PyInt_FromLong((long)ival);
 
5788
   else {
 
5789
       unsigned char *bytes = (unsigned char *) &ival;
 
5790
       int one = 1; int little = (int)*(unsigned char*)&one;
 
5791
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
 
5792
   }
 
5793
#else
 
5794
   return PyInt_FromSize_t(ival);
 
5795
#endif
 
5796
}
 
5797
 
 
5798
static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
 
5799
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
 
5800
   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
 
5801
       return (size_t)-1;
 
5802
   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
 
5803
       PyErr_SetString(PyExc_OverflowError,
 
5804
                       "value too large to convert to size_t");
 
5805
       return (size_t)-1;
 
5806
   }
 
5807
   return (size_t)val;
 
5808
}
 
5809
 
 
5810