320
626
#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
321
627
#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)
323
static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
325
static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
327
static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
329
static INLINE char __Pyx_PyInt_AsChar(PyObject *);
331
static INLINE short __Pyx_PyInt_AsShort(PyObject *);
333
static INLINE int __Pyx_PyInt_AsInt(PyObject *);
335
static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
337
static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
339
static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
341
static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
343
static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
345
static INLINE long __Pyx_PyInt_AsLong(PyObject *);
347
static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
349
static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
351
static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
629
static void __Pyx_RaiseDoubleKeywordsError(
630
const char* func_name, PyObject* kw_name); /*proto*/
632
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
633
Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
635
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /*proto*/
637
static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
638
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
640
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
641
const char *name, int exact); /*proto*/
643
static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_int64_t(int64_t);
645
static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_haddr_t(haddr_t);
647
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
649
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
651
static CYTHON_INLINE hid_t __Pyx_PyInt_from_py_hid_t(PyObject *);
653
static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
655
static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
657
static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
659
static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
661
static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
663
static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
665
static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
667
static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
669
static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
671
static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
673
static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
675
static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
677
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
679
static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
681
static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
683
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict); /*proto*/
685
static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
687
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/
353
689
static void __Pyx_AddTraceback(const char *funcname); /*proto*/
355
691
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
692
/* Module declarations from h5py.h5 */
694
static PyTypeObject *__pyx_ptype_4h5py_2h5_H5PYConfig = 0;
695
static PyTypeObject *__pyx_ptype_4h5py_2h5_IDProxy = 0;
696
static PyTypeObject *__pyx_ptype_4h5py_2h5_ObjectID = 0;
697
static PyTypeObject *__pyx_ptype_4h5py_2h5_SmartStruct = 0;
698
static struct __pyx_obj_4h5py_2h5_H5PYConfig *(*__pyx_f_4h5py_2h5_get_config)(int __pyx_skip_dispatch); /*proto*/
699
static int (*__pyx_f_4h5py_2h5_init_hdf5)(void); /*proto*/
700
/* Module declarations from h5py.h5p */
702
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropID = 0;
703
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropClassID = 0;
704
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropInstanceID = 0;
705
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropCreateID = 0;
706
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropCopyID = 0;
707
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropDCID = 0;
708
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropFCID = 0;
709
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropFAID = 0;
710
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropDXID = 0;
711
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropLCID = 0;
712
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropLAID = 0;
713
static PyTypeObject *__pyx_ptype_4h5py_3h5p_PropGCID = 0;
714
static hid_t (*__pyx_f_4h5py_3h5p_pdefault)(struct __pyx_obj_4h5py_3h5p_PropID *); /*proto*/
715
static PyObject *(*__pyx_f_4h5py_3h5p_propwrap)(hid_t); /*proto*/
716
/* Module declarations from h5py.h5g */
718
static PyTypeObject *__pyx_ptype_4h5py_3h5g_GroupID = 0;
719
/* Module declarations from numpy */
721
/* Module declarations from h5py.numpy */
723
static PyTypeObject *__pyx_ptype_4h5py_5numpy_dtype = 0;
724
static PyTypeObject *__pyx_ptype_4h5py_5numpy_ndarray = 0;
725
/* Module declarations from h5py.utils */
727
static void *(*__pyx_f_4h5py_5utils_emalloc)(size_t); /*proto*/
728
static void (*__pyx_f_4h5py_5utils_efree)(void *); /*proto*/
729
static int (*__pyx_f_4h5py_5utils_check_numpy_read)(PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_4h5py_5utils_check_numpy_read *__pyx_optional_args); /*proto*/
730
static int (*__pyx_f_4h5py_5utils_check_numpy_write)(PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_4h5py_5utils_check_numpy_write *__pyx_optional_args); /*proto*/
731
static int (*__pyx_f_4h5py_5utils_convert_tuple)(PyObject *, hsize_t *, hsize_t); /*proto*/
732
static PyObject *(*__pyx_f_4h5py_5utils_convert_dims)(hsize_t *, hsize_t); /*proto*/
733
static int (*__pyx_f_4h5py_5utils_require_tuple)(PyObject *, int, int, char *); /*proto*/
734
static PyObject *(*__pyx_f_4h5py_5utils_create_numpy_hsize)(int, hsize_t *); /*proto*/
735
static PyObject *(*__pyx_f_4h5py_5utils_create_hsize_array)(PyObject *); /*proto*/
356
736
/* Module declarations from h5py.h5l */
738
static PyTypeObject *__pyx_ptype_4h5py_3h5l_LinkProxy = 0;
739
static PyTypeObject *__pyx_ptype_4h5py_3h5l_LinkInfo = 0;
740
static PyTypeObject *__pyx_ptype_4h5py_3h5l__LinkVisitor = 0;
741
static herr_t __pyx_f_4h5py_3h5l_cb_link_iterate(hid_t, char *, H5L_info_t *, void *); /*proto*/
742
static herr_t __pyx_f_4h5py_3h5l_cb_link_simple(hid_t, char *, H5L_info_t *, void *); /*proto*/
358
743
#define __Pyx_MODULE_NAME "h5py.h5l"
359
744
int __pyx_module_is_main_h5py__h5l = 0;
361
746
/* Implementation of h5py.h5l */
747
static PyObject *__pyx_builtin_NotImplemented;
748
static PyObject *__pyx_builtin_TypeError;
749
static char __pyx_k_1[] = "Link proxies are unhashable; use the parent group instead.";
750
static char __pyx_k_2[] = "Link must be either a soft or external link";
751
static char __pyx_k_5[] = ".";
752
static char __pyx_k_6[] = " Integer type code for link (h5l.TYPE_*) ";
753
static char __pyx_k_7[] = " Indicates if the creation order is valid ";
754
static char __pyx_k_8[] = " Creation order ";
755
static char __pyx_k_9[] = " Integer type code for character set (h5t.CSET_*) ";
756
static char __pyx_k_10[] = " Either the address of a hard link or the size of a soft/UD link ";
757
static char __pyx_k__u[] = "u";
758
static char __pyx_k__id[] = "id";
759
static char __pyx_k__id_[] = "id_";
760
static char __pyx_k__cset[] = "cset";
761
static char __pyx_k__func[] = "func";
762
static char __pyx_k__info[] = "info";
763
static char __pyx_k__lapl[] = "lapl";
764
static char __pyx_k__lcpl[] = "lcpl";
765
static char __pyx_k__name[] = "name";
766
static char __pyx_k__type[] = "type";
767
static char __pyx_k__index[] = "index";
768
static char __pyx_k__order[] = "order";
769
static char __pyx_k__corder[] = "corder";
770
static char __pyx_k__retval[] = "retval";
771
static char __pyx_k__target[] = "target";
772
static char __pyx_k__address[] = "address";
773
static char __pyx_k__cur_loc[] = "cur_loc";
362
774
static char __pyx_k____main__[] = "__main__";
775
static char __pyx_k__cur_name[] = "cur_name";
776
static char __pyx_k__idx_type[] = "idx_type";
777
static char __pyx_k__new_name[] = "new_name";
778
static char __pyx_k__obj_name[] = "obj_name";
779
static char __pyx_k__val_size[] = "val_size";
780
static char __pyx_k__TYPE_HARD[] = "TYPE_HARD";
781
static char __pyx_k__TYPE_SOFT[] = "TYPE_SOFT";
782
static char __pyx_k__TypeError[] = "TypeError";
783
static char __pyx_k__file_name[] = "file_name";
784
static char __pyx_k__link_name[] = "link_name";
785
static char __pyx_k__infostruct[] = "infostruct";
786
static char __pyx_k__corder_valid[] = "corder_valid";
787
static char __pyx_k__TYPE_EXTERNAL[] = "TYPE_EXTERNAL";
788
static char __pyx_k__NotImplemented[] = "NotImplemented";
789
static PyObject *__pyx_kp_s_1;
790
static PyObject *__pyx_kp_s_2;
791
static PyObject *__pyx_n_s__NotImplemented;
792
static PyObject *__pyx_n_s__TYPE_EXTERNAL;
793
static PyObject *__pyx_n_s__TYPE_HARD;
794
static PyObject *__pyx_n_s__TYPE_SOFT;
795
static PyObject *__pyx_n_s__TypeError;
363
796
static PyObject *__pyx_n_s____main__;
797
static PyObject *__pyx_n_s__address;
798
static PyObject *__pyx_n_s__corder;
799
static PyObject *__pyx_n_s__corder_valid;
800
static PyObject *__pyx_n_s__cset;
801
static PyObject *__pyx_n_s__cur_loc;
802
static PyObject *__pyx_n_s__cur_name;
803
static PyObject *__pyx_n_s__file_name;
804
static PyObject *__pyx_n_s__func;
805
static PyObject *__pyx_n_s__id;
806
static PyObject *__pyx_n_s__id_;
807
static PyObject *__pyx_n_s__idx_type;
808
static PyObject *__pyx_n_s__index;
809
static PyObject *__pyx_n_s__info;
810
static PyObject *__pyx_n_s__infostruct;
811
static PyObject *__pyx_n_s__lapl;
812
static PyObject *__pyx_n_s__lcpl;
813
static PyObject *__pyx_n_s__link_name;
814
static PyObject *__pyx_n_s__name;
815
static PyObject *__pyx_n_s__new_name;
816
static PyObject *__pyx_n_s__obj_name;
817
static PyObject *__pyx_n_s__order;
818
static PyObject *__pyx_n_s__retval;
819
static PyObject *__pyx_n_s__target;
820
static PyObject *__pyx_n_s__type;
821
static PyObject *__pyx_n_s__u;
822
static PyObject *__pyx_n_s__val_size;
823
static int __pyx_k_3;
824
static int __pyx_k_4;
826
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":39
828
* """ Integer type code for link (h5l.TYPE_*) """
829
* def __get__(self): # <<<<<<<<<<<<<<
830
* return <int>self.infostruct.type
831
* property corder_valid:
834
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_4type___get__(PyObject *__pyx_v_self); /*proto*/
835
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_4type___get__(PyObject *__pyx_v_self) {
836
PyObject *__pyx_r = NULL;
837
PyObject *__pyx_t_1 = NULL;
838
__Pyx_RefNannySetupContext("__get__");
840
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":40
841
* """ Integer type code for link (h5l.TYPE_*) """
843
* return <int>self.infostruct.type # <<<<<<<<<<<<<<
844
* property corder_valid:
845
* """ Indicates if the creation order is valid """
847
__Pyx_XDECREF(__pyx_r);
848
__pyx_t_1 = PyInt_FromLong(((int)((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_v_self)->infostruct.type)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
849
__Pyx_GOTREF(__pyx_t_1);
854
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
857
__Pyx_XDECREF(__pyx_t_1);
858
__Pyx_AddTraceback("h5py.h5l.LinkInfo.type.__get__");
861
__Pyx_XGIVEREF(__pyx_r);
862
__Pyx_RefNannyFinishContext();
866
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":43
867
* property corder_valid:
868
* """ Indicates if the creation order is valid """
869
* def __get__(self): # <<<<<<<<<<<<<<
870
* return <bint>self.infostruct.corder_valid
874
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_12corder_valid___get__(PyObject *__pyx_v_self); /*proto*/
875
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_12corder_valid___get__(PyObject *__pyx_v_self) {
876
PyObject *__pyx_r = NULL;
877
PyObject *__pyx_t_1 = NULL;
878
__Pyx_RefNannySetupContext("__get__");
880
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":44
881
* """ Indicates if the creation order is valid """
883
* return <bint>self.infostruct.corder_valid # <<<<<<<<<<<<<<
885
* """ Creation order """
887
__Pyx_XDECREF(__pyx_r);
888
__pyx_t_1 = __Pyx_PyBool_FromLong(((int)((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_v_self)->infostruct.corder_valid)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
889
__Pyx_GOTREF(__pyx_t_1);
894
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
897
__Pyx_XDECREF(__pyx_t_1);
898
__Pyx_AddTraceback("h5py.h5l.LinkInfo.corder_valid.__get__");
901
__Pyx_XGIVEREF(__pyx_r);
902
__Pyx_RefNannyFinishContext();
906
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":47
908
* """ Creation order """
909
* def __get__(self): # <<<<<<<<<<<<<<
910
* return self.infostruct.corder
914
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_6corder___get__(PyObject *__pyx_v_self); /*proto*/
915
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_6corder___get__(PyObject *__pyx_v_self) {
916
PyObject *__pyx_r = NULL;
917
PyObject *__pyx_t_1 = NULL;
918
__Pyx_RefNannySetupContext("__get__");
920
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":48
921
* """ Creation order """
923
* return self.infostruct.corder # <<<<<<<<<<<<<<
925
* """ Integer type code for character set (h5t.CSET_*) """
927
__Pyx_XDECREF(__pyx_r);
928
__pyx_t_1 = __Pyx_PyInt_to_py_int64_t(((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_v_self)->infostruct.corder); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
929
__Pyx_GOTREF(__pyx_t_1);
934
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
937
__Pyx_XDECREF(__pyx_t_1);
938
__Pyx_AddTraceback("h5py.h5l.LinkInfo.corder.__get__");
941
__Pyx_XGIVEREF(__pyx_r);
942
__Pyx_RefNannyFinishContext();
946
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":51
948
* """ Integer type code for character set (h5t.CSET_*) """
949
* def __get__(self): # <<<<<<<<<<<<<<
950
* return self.infostruct.cset
954
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_4cset___get__(PyObject *__pyx_v_self); /*proto*/
955
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_4cset___get__(PyObject *__pyx_v_self) {
956
PyObject *__pyx_r = NULL;
957
PyObject *__pyx_t_1 = NULL;
958
__Pyx_RefNannySetupContext("__get__");
960
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":52
961
* """ Integer type code for character set (h5t.CSET_*) """
963
* return self.infostruct.cset # <<<<<<<<<<<<<<
965
* """ Either the address of a hard link or the size of a soft/UD link """
967
__Pyx_XDECREF(__pyx_r);
968
__pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_v_self)->infostruct.cset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
969
__Pyx_GOTREF(__pyx_t_1);
974
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
977
__Pyx_XDECREF(__pyx_t_1);
978
__Pyx_AddTraceback("h5py.h5l.LinkInfo.cset.__get__");
981
__Pyx_XGIVEREF(__pyx_r);
982
__Pyx_RefNannyFinishContext();
986
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":55
988
* """ Either the address of a hard link or the size of a soft/UD link """
989
* def __get__(self): # <<<<<<<<<<<<<<
990
* if self.infostruct.type == H5L_TYPE_HARD:
991
* return self.infostruct.u.address
994
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_1u___get__(PyObject *__pyx_v_self); /*proto*/
995
static PyObject *__pyx_pf_4h5py_3h5l_8LinkInfo_1u___get__(PyObject *__pyx_v_self) {
996
PyObject *__pyx_r = NULL;
998
PyObject *__pyx_t_2 = NULL;
999
__Pyx_RefNannySetupContext("__get__");
1000
__Pyx_INCREF((PyObject *)__pyx_v_self);
1002
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":56
1003
* """ Either the address of a hard link or the size of a soft/UD link """
1004
* def __get__(self):
1005
* if self.infostruct.type == H5L_TYPE_HARD: # <<<<<<<<<<<<<<
1006
* return self.infostruct.u.address
1009
__pyx_t_1 = (((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_v_self)->infostruct.type == H5L_TYPE_HARD);
1012
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":57
1013
* def __get__(self):
1014
* if self.infostruct.type == H5L_TYPE_HARD:
1015
* return self.infostruct.u.address # <<<<<<<<<<<<<<
1017
* return self.infostruct.u.val_size
1019
__Pyx_XDECREF(__pyx_r);
1020
__pyx_t_2 = __Pyx_PyInt_to_py_haddr_t(((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_v_self)->infostruct.u.address); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1021
__Pyx_GOTREF(__pyx_t_2);
1022
__pyx_r = __pyx_t_2;
1029
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":59
1030
* return self.infostruct.u.address
1032
* return self.infostruct.u.val_size # <<<<<<<<<<<<<<
1034
* cdef class _LinkVisitor:
1036
__Pyx_XDECREF(__pyx_r);
1037
__pyx_t_2 = __Pyx_PyInt_FromSize_t(((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_v_self)->infostruct.u.val_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1038
__Pyx_GOTREF(__pyx_t_2);
1039
__pyx_r = __pyx_t_2;
1045
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
1048
__Pyx_XDECREF(__pyx_t_2);
1049
__Pyx_AddTraceback("h5py.h5l.LinkInfo.u.__get__");
1052
__Pyx_DECREF((PyObject *)__pyx_v_self);
1053
__Pyx_XGIVEREF(__pyx_r);
1054
__Pyx_RefNannyFinishContext();
1058
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":69
1059
* cdef LinkInfo info
1061
* def __init__(self, func): # <<<<<<<<<<<<<<
1063
* self.retval = None
1066
static int __pyx_pf_4h5py_3h5l_12_LinkVisitor___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1067
static int __pyx_pf_4h5py_3h5l_12_LinkVisitor___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1068
PyObject *__pyx_v_func = 0;
1070
PyObject *__pyx_t_1 = NULL;
1071
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__func,0};
1072
__Pyx_RefNannySetupContext("__init__");
1073
if (unlikely(__pyx_kwds)) {
1074
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
1075
PyObject* values[1] = {0};
1076
switch (PyTuple_GET_SIZE(__pyx_args)) {
1077
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1079
default: goto __pyx_L5_argtuple_error;
1081
switch (PyTuple_GET_SIZE(__pyx_args)) {
1083
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func);
1084
if (likely(values[0])) kw_args--;
1085
else goto __pyx_L5_argtuple_error;
1087
if (unlikely(kw_args > 0)) {
1088
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1090
__pyx_v_func = values[0];
1091
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
1092
goto __pyx_L5_argtuple_error;
1094
__pyx_v_func = PyTuple_GET_ITEM(__pyx_args, 0);
1096
goto __pyx_L4_argument_unpacking_done;
1097
__pyx_L5_argtuple_error:;
1098
__Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1100
__Pyx_AddTraceback("h5py.h5l._LinkVisitor.__init__");
1102
__pyx_L4_argument_unpacking_done:;
1104
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":70
1106
* def __init__(self, func):
1107
* self.func = func # <<<<<<<<<<<<<<
1108
* self.retval = None
1109
* self.info = LinkInfo()
1111
__Pyx_INCREF(__pyx_v_func);
1112
__Pyx_GIVEREF(__pyx_v_func);
1113
__Pyx_GOTREF(((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->func);
1114
__Pyx_DECREF(((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->func);
1115
((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->func = __pyx_v_func;
1117
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":71
1118
* def __init__(self, func):
1120
* self.retval = None # <<<<<<<<<<<<<<
1121
* self.info = LinkInfo()
1124
__Pyx_INCREF(Py_None);
1125
__Pyx_GIVEREF(Py_None);
1126
__Pyx_GOTREF(((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->retval);
1127
__Pyx_DECREF(((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->retval);
1128
((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->retval = Py_None;
1130
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":72
1132
* self.retval = None
1133
* self.info = LinkInfo() # <<<<<<<<<<<<<<
1135
* cdef herr_t cb_link_iterate(hid_t grp, char* name, H5L_info_t *istruct, void* data) except 2:
1137
__pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4h5py_3h5l_LinkInfo)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1138
__Pyx_GOTREF(__pyx_t_1);
1139
__Pyx_GIVEREF(__pyx_t_1);
1140
__Pyx_GOTREF(((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->info);
1141
__Pyx_DECREF(((PyObject *)((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->info));
1142
((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_self)->info = ((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_t_1);
1148
__Pyx_XDECREF(__pyx_t_1);
1149
__Pyx_AddTraceback("h5py.h5l._LinkVisitor.__init__");
1152
__Pyx_RefNannyFinishContext();
1156
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":74
1157
* self.info = LinkInfo()
1159
* cdef herr_t cb_link_iterate(hid_t grp, char* name, H5L_info_t *istruct, void* data) except 2: # <<<<<<<<<<<<<<
1160
* # Standard iteration callback for iterate/visit routines
1164
static herr_t __pyx_f_4h5py_3h5l_cb_link_iterate(hid_t __pyx_v_grp, char *__pyx_v_name, H5L_info_t *__pyx_v_istruct, void *__pyx_v_data) {
1165
struct __pyx_obj_4h5py_3h5l__LinkVisitor *__pyx_v_it = 0;
1167
PyObject *__pyx_t_1 = NULL;
1168
PyObject *__pyx_t_2 = NULL;
1172
__Pyx_RefNannySetupContext("cb_link_iterate");
1174
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":77
1175
* # Standard iteration callback for iterate/visit routines
1177
* cdef _LinkVisitor it = <_LinkVisitor?>data # <<<<<<<<<<<<<<
1178
* it.info.infostruct = istruct[0]
1179
* it.retval = it.func(name, it.info)
1181
__Pyx_INCREF(((PyObject *)((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_data)));
1182
__pyx_v_it = ((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_data);
1184
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":78
1186
* cdef _LinkVisitor it = <_LinkVisitor?>data
1187
* it.info.infostruct = istruct[0] # <<<<<<<<<<<<<<
1188
* it.retval = it.func(name, it.info)
1189
* if (it.retval is None) or (not it.retval):
1191
__pyx_v_it->info->infostruct = (__pyx_v_istruct[0]);
1193
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":79
1194
* cdef _LinkVisitor it = <_LinkVisitor?>data
1195
* it.info.infostruct = istruct[0]
1196
* it.retval = it.func(name, it.info) # <<<<<<<<<<<<<<
1197
* if (it.retval is None) or (not it.retval):
1200
__pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1201
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
1202
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1203
__Pyx_GOTREF(__pyx_t_2);
1204
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
1205
__Pyx_GIVEREF(((PyObject *)__pyx_t_1));
1206
__Pyx_INCREF(((PyObject *)__pyx_v_it->info));
1207
PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_it->info));
1208
__Pyx_GIVEREF(((PyObject *)__pyx_v_it->info));
1210
__pyx_t_1 = PyObject_Call(__pyx_v_it->func, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1211
__Pyx_GOTREF(__pyx_t_1);
1212
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1213
__Pyx_GIVEREF(__pyx_t_1);
1214
__Pyx_GOTREF(__pyx_v_it->retval);
1215
__Pyx_DECREF(__pyx_v_it->retval);
1216
__pyx_v_it->retval = __pyx_t_1;
1219
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":80
1220
* it.info.infostruct = istruct[0]
1221
* it.retval = it.func(name, it.info)
1222
* if (it.retval is None) or (not it.retval): # <<<<<<<<<<<<<<
1226
__pyx_t_3 = (__pyx_v_it->retval == Py_None);
1228
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_it->retval); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1229
__pyx_t_5 = (!__pyx_t_4);
1230
__pyx_t_4 = __pyx_t_5;
1232
__pyx_t_4 = __pyx_t_3;
1236
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":81
1237
* it.retval = it.func(name, it.info)
1238
* if (it.retval is None) or (not it.retval):
1239
* return 0 # <<<<<<<<<<<<<<
1249
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":82
1250
* if (it.retval is None) or (not it.retval):
1252
* return 1 # <<<<<<<<<<<<<<
1254
* cdef herr_t cb_link_simple(hid_t grp, char* name, H5L_info_t *istruct, void* data) except 2:
1262
__Pyx_XDECREF(__pyx_t_1);
1263
__Pyx_XDECREF(__pyx_t_2);
1264
__Pyx_AddTraceback("h5py.h5l.cb_link_iterate");
1267
__Pyx_XDECREF((PyObject *)__pyx_v_it);
1268
__Pyx_RefNannyFinishContext();
1272
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":84
1275
* cdef herr_t cb_link_simple(hid_t grp, char* name, H5L_info_t *istruct, void* data) except 2: # <<<<<<<<<<<<<<
1276
* # Simplified iteration callback which only provides the name
1280
static herr_t __pyx_f_4h5py_3h5l_cb_link_simple(hid_t __pyx_v_grp, char *__pyx_v_name, H5L_info_t *__pyx_v_istruct, void *__pyx_v_data) {
1281
struct __pyx_obj_4h5py_3h5l__LinkVisitor *__pyx_v_it = 0;
1283
PyObject *__pyx_t_1 = NULL;
1284
PyObject *__pyx_t_2 = NULL;
1288
__Pyx_RefNannySetupContext("cb_link_simple");
1290
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":87
1291
* # Simplified iteration callback which only provides the name
1293
* cdef _LinkVisitor it = <_LinkVisitor?>data # <<<<<<<<<<<<<<
1294
* it.retval = it.func(name)
1295
* if (it.retval is None) or (not it.retval):
1297
__Pyx_INCREF(((PyObject *)((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_data)));
1298
__pyx_v_it = ((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_v_data);
1300
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":88
1302
* cdef _LinkVisitor it = <_LinkVisitor?>data
1303
* it.retval = it.func(name) # <<<<<<<<<<<<<<
1304
* if (it.retval is None) or (not it.retval):
1307
__pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1308
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
1309
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1310
__Pyx_GOTREF(__pyx_t_2);
1311
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
1312
__Pyx_GIVEREF(((PyObject *)__pyx_t_1));
1314
__pyx_t_1 = PyObject_Call(__pyx_v_it->func, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1315
__Pyx_GOTREF(__pyx_t_1);
1316
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1317
__Pyx_GIVEREF(__pyx_t_1);
1318
__Pyx_GOTREF(__pyx_v_it->retval);
1319
__Pyx_DECREF(__pyx_v_it->retval);
1320
__pyx_v_it->retval = __pyx_t_1;
1323
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":89
1324
* cdef _LinkVisitor it = <_LinkVisitor?>data
1325
* it.retval = it.func(name)
1326
* if (it.retval is None) or (not it.retval): # <<<<<<<<<<<<<<
1330
__pyx_t_3 = (__pyx_v_it->retval == Py_None);
1332
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_it->retval); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1333
__pyx_t_5 = (!__pyx_t_4);
1334
__pyx_t_4 = __pyx_t_5;
1336
__pyx_t_4 = __pyx_t_3;
1340
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":90
1341
* it.retval = it.func(name)
1342
* if (it.retval is None) or (not it.retval):
1343
* return 0 # <<<<<<<<<<<<<<
1353
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":91
1354
* if (it.retval is None) or (not it.retval):
1356
* return 1 # <<<<<<<<<<<<<<
1366
__Pyx_XDECREF(__pyx_t_1);
1367
__Pyx_XDECREF(__pyx_t_2);
1368
__Pyx_AddTraceback("h5py.h5l.cb_link_simple");
1371
__Pyx_XDECREF((PyObject *)__pyx_v_it);
1372
__Pyx_RefNannyFinishContext();
1376
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":113
1379
* def __init__(self, hid_t id_): # <<<<<<<<<<<<<<
1381
* # The identifier in question is the hid_t for the parent GroupID.
1384
static int __pyx_pf_4h5py_3h5l_9LinkProxy___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1385
static int __pyx_pf_4h5py_3h5l_9LinkProxy___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1388
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__id_,0};
1389
__Pyx_RefNannySetupContext("__init__");
1390
if (unlikely(__pyx_kwds)) {
1391
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
1392
PyObject* values[1] = {0};
1393
switch (PyTuple_GET_SIZE(__pyx_args)) {
1394
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1396
default: goto __pyx_L5_argtuple_error;
1398
switch (PyTuple_GET_SIZE(__pyx_args)) {
1400
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__id_);
1401
if (likely(values[0])) kw_args--;
1402
else goto __pyx_L5_argtuple_error;
1404
if (unlikely(kw_args > 0)) {
1405
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1407
__pyx_v_id_ = __Pyx_PyInt_from_py_hid_t(values[0]); if (unlikely((__pyx_v_id_ == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1408
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
1409
goto __pyx_L5_argtuple_error;
1411
__pyx_v_id_ = __Pyx_PyInt_from_py_hid_t(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_id_ == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1413
goto __pyx_L4_argument_unpacking_done;
1414
__pyx_L5_argtuple_error:;
1415
__Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1417
__Pyx_AddTraceback("h5py.h5l.LinkProxy.__init__");
1419
__pyx_L4_argument_unpacking_done:;
1421
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":117
1422
* # The identifier in question is the hid_t for the parent GroupID.
1423
* # We "borrow" this reference.
1424
* self.id = id_ # <<<<<<<<<<<<<<
1426
* def __richcmp__(self, object other, int how):
1428
((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id = __pyx_v_id_;
1431
__Pyx_RefNannyFinishContext();
1435
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":119
1438
* def __richcmp__(self, object other, int how): # <<<<<<<<<<<<<<
1439
* return NotImplemented
1443
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_how); /*proto*/
1444
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_how) {
1445
PyObject *__pyx_r = NULL;
1446
__Pyx_RefNannySetupContext("__richcmp__");
1448
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":120
1450
* def __richcmp__(self, object other, int how):
1451
* return NotImplemented # <<<<<<<<<<<<<<
1453
* def __hash__(self):
1455
__Pyx_XDECREF(__pyx_r);
1456
__Pyx_INCREF(__pyx_builtin_NotImplemented);
1457
__pyx_r = __pyx_builtin_NotImplemented;
1460
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
1462
__Pyx_XGIVEREF(__pyx_r);
1463
__Pyx_RefNannyFinishContext();
1467
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":122
1468
* return NotImplemented
1470
* def __hash__(self): # <<<<<<<<<<<<<<
1471
* raise TypeError("Link proxies are unhashable; use the parent group instead.")
1475
static long __pyx_pf_4h5py_3h5l_9LinkProxy___hash__(PyObject *__pyx_v_self); /*proto*/
1476
static long __pyx_pf_4h5py_3h5l_9LinkProxy___hash__(PyObject *__pyx_v_self) {
1478
PyObject *__pyx_t_1 = NULL;
1479
PyObject *__pyx_t_2 = NULL;
1480
__Pyx_RefNannySetupContext("__hash__");
1482
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":123
1484
* def __hash__(self):
1485
* raise TypeError("Link proxies are unhashable; use the parent group instead.") # <<<<<<<<<<<<<<
1489
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1490
__Pyx_GOTREF(__pyx_t_1);
1491
__Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
1492
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_1));
1493
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
1494
__pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1495
__Pyx_GOTREF(__pyx_t_2);
1496
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1497
__Pyx_Raise(__pyx_t_2, 0, 0);
1498
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1499
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1504
__Pyx_XDECREF(__pyx_t_1);
1505
__Pyx_XDECREF(__pyx_t_2);
1506
__Pyx_AddTraceback("h5py.h5l.LinkProxy.__hash__");
1509
if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
1510
__Pyx_RefNannyFinishContext();
1514
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":126
1517
* def create_hard(self, char* new_name, GroupID cur_loc not None, # <<<<<<<<<<<<<<
1518
* char* cur_name, PropID lcpl=None, PropID lapl=None):
1519
* """ (STRING new_name, GroupID cur_loc, STRING cur_name,
1522
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_create_hard(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1523
static char __pyx_doc_4h5py_3h5l_9LinkProxy_create_hard[] = " (STRING new_name, GroupID cur_loc, STRING cur_name,\n PropID lcpl=None, PropID lapl=None)\n\n Create a new hard link in this group pointing to an existing link\n in another group.\n ";
1524
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_create_hard(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1525
char *__pyx_v_new_name;
1526
struct __pyx_obj_4h5py_3h5g_GroupID *__pyx_v_cur_loc = 0;
1527
char *__pyx_v_cur_name;
1528
struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lcpl = 0;
1529
struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lapl = 0;
1530
PyObject *__pyx_r = NULL;
1531
PyObject *__pyx_t_1 = NULL;
1534
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__new_name,&__pyx_n_s__cur_loc,&__pyx_n_s__cur_name,&__pyx_n_s__lcpl,&__pyx_n_s__lapl,0};
1535
__Pyx_RefNannySetupContext("create_hard");
1536
if (unlikely(__pyx_kwds)) {
1538
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":127
1540
* def create_hard(self, char* new_name, GroupID cur_loc not None,
1541
* char* cur_name, PropID lcpl=None, PropID lapl=None): # <<<<<<<<<<<<<<
1542
* """ (STRING new_name, GroupID cur_loc, STRING cur_name,
1543
* PropID lcpl=None, PropID lapl=None)
1545
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
1546
PyObject* values[5] = {0,0,0,0,0};
1547
values[3] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
1548
values[4] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
1549
switch (PyTuple_GET_SIZE(__pyx_args)) {
1550
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
1551
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
1552
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1553
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1554
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1556
default: goto __pyx_L5_argtuple_error;
1558
switch (PyTuple_GET_SIZE(__pyx_args)) {
1560
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new_name);
1561
if (likely(values[0])) kw_args--;
1562
else goto __pyx_L5_argtuple_error;
1564
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cur_loc);
1565
if (likely(values[1])) kw_args--;
1567
__Pyx_RaiseArgtupleInvalid("create_hard", 0, 3, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1570
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cur_name);
1571
if (likely(values[2])) kw_args--;
1573
__Pyx_RaiseArgtupleInvalid("create_hard", 0, 3, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1577
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lcpl);
1578
if (unlikely(value)) { values[3] = value; kw_args--; }
1582
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lapl);
1583
if (unlikely(value)) { values[4] = value; kw_args--; }
1586
if (unlikely(kw_args > 0)) {
1587
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "create_hard") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1589
__pyx_v_new_name = __Pyx_PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_new_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1590
__pyx_v_cur_loc = ((struct __pyx_obj_4h5py_3h5g_GroupID *)values[1]);
1591
__pyx_v_cur_name = __Pyx_PyBytes_AsString(values[2]); if (unlikely((!__pyx_v_cur_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1592
__pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[3]);
1593
__pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[4]);
1595
__pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
1596
__pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
1597
switch (PyTuple_GET_SIZE(__pyx_args)) {
1599
__pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)PyTuple_GET_ITEM(__pyx_args, 4));
1601
__pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)PyTuple_GET_ITEM(__pyx_args, 3));
1603
__pyx_v_cur_name = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((!__pyx_v_cur_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1604
__pyx_v_cur_loc = ((struct __pyx_obj_4h5py_3h5g_GroupID *)PyTuple_GET_ITEM(__pyx_args, 1));
1605
__pyx_v_new_name = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((!__pyx_v_new_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1607
default: goto __pyx_L5_argtuple_error;
1610
goto __pyx_L4_argument_unpacking_done;
1611
__pyx_L5_argtuple_error:;
1612
__Pyx_RaiseArgtupleInvalid("create_hard", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1614
__Pyx_AddTraceback("h5py.h5l.LinkProxy.create_hard");
1616
__pyx_L4_argument_unpacking_done:;
1617
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cur_loc), __pyx_ptype_4h5py_3h5g_GroupID, 0, "cur_loc", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1618
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lcpl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lcpl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1619
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lapl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lapl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1621
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":134
1624
* H5Lcreate_hard(cur_loc.id, cur_name, self.id, new_name, # <<<<<<<<<<<<<<
1625
* pdefault(lcpl), pdefault(lapl))
1628
__pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_cur_loc), __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1629
__Pyx_GOTREF(__pyx_t_1);
1630
__pyx_t_2 = __Pyx_PyInt_from_py_hid_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1631
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1633
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":135
1635
* H5Lcreate_hard(cur_loc.id, cur_name, self.id, new_name,
1636
* pdefault(lcpl), pdefault(lapl)) # <<<<<<<<<<<<<<
1640
__pyx_t_3 = H5Lcreate_hard(__pyx_t_2, __pyx_v_cur_name, ((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id, __pyx_v_new_name, __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lcpl), __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lapl)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1642
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
1645
__Pyx_XDECREF(__pyx_t_1);
1646
__Pyx_AddTraceback("h5py.h5l.LinkProxy.create_hard");
1649
__Pyx_XGIVEREF(__pyx_r);
1650
__Pyx_RefNannyFinishContext();
1654
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":138
1657
* def create_soft(self, char* new_name, char* target, # <<<<<<<<<<<<<<
1658
* PropID lcpl=None, PropID lapl=None):
1659
* """(STRING new_name, STRING target, PropID lcpl=None, PropID lapl=None)
1662
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_create_soft(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1663
static char __pyx_doc_4h5py_3h5l_9LinkProxy_create_soft[] = "(STRING new_name, STRING target, PropID lcpl=None, PropID lapl=None)\n\n Create a new soft link in this group, with the given string value.\n The link target does not need to exist.\n ";
1664
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_create_soft(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1665
char *__pyx_v_new_name;
1666
char *__pyx_v_target;
1667
struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lcpl = 0;
1668
struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lapl = 0;
1669
PyObject *__pyx_r = NULL;
1671
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__new_name,&__pyx_n_s__target,&__pyx_n_s__lcpl,&__pyx_n_s__lapl,0};
1672
__Pyx_RefNannySetupContext("create_soft");
1673
if (unlikely(__pyx_kwds)) {
1675
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":139
1677
* def create_soft(self, char* new_name, char* target,
1678
* PropID lcpl=None, PropID lapl=None): # <<<<<<<<<<<<<<
1679
* """(STRING new_name, STRING target, PropID lcpl=None, PropID lapl=None)
1682
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
1683
PyObject* values[4] = {0,0,0,0};
1684
values[2] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
1685
values[3] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
1686
switch (PyTuple_GET_SIZE(__pyx_args)) {
1687
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
1688
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1689
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1690
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1692
default: goto __pyx_L5_argtuple_error;
1694
switch (PyTuple_GET_SIZE(__pyx_args)) {
1696
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new_name);
1697
if (likely(values[0])) kw_args--;
1698
else goto __pyx_L5_argtuple_error;
1700
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__target);
1701
if (likely(values[1])) kw_args--;
1703
__Pyx_RaiseArgtupleInvalid("create_soft", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1707
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lcpl);
1708
if (unlikely(value)) { values[2] = value; kw_args--; }
1712
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lapl);
1713
if (unlikely(value)) { values[3] = value; kw_args--; }
1716
if (unlikely(kw_args > 0)) {
1717
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "create_soft") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1719
__pyx_v_new_name = __Pyx_PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_new_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1720
__pyx_v_target = __Pyx_PyBytes_AsString(values[1]); if (unlikely((!__pyx_v_target) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1721
__pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[2]);
1722
__pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[3]);
1724
__pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
1725
__pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
1726
switch (PyTuple_GET_SIZE(__pyx_args)) {
1728
__pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)PyTuple_GET_ITEM(__pyx_args, 3));
1730
__pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)PyTuple_GET_ITEM(__pyx_args, 2));
1732
__pyx_v_target = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((!__pyx_v_target) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1733
__pyx_v_new_name = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((!__pyx_v_new_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1735
default: goto __pyx_L5_argtuple_error;
1738
goto __pyx_L4_argument_unpacking_done;
1739
__pyx_L5_argtuple_error:;
1740
__Pyx_RaiseArgtupleInvalid("create_soft", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1742
__Pyx_AddTraceback("h5py.h5l.LinkProxy.create_soft");
1744
__pyx_L4_argument_unpacking_done:;
1745
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lcpl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lcpl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1746
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lapl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lapl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1748
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":146
1750
* H5Lcreate_soft(target, self.id, new_name,
1751
* pdefault(lcpl), pdefault(lapl)) # <<<<<<<<<<<<<<
1755
__pyx_t_1 = H5Lcreate_soft(__pyx_v_target, ((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id, __pyx_v_new_name, __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lcpl), __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lapl)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1757
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
1760
__Pyx_AddTraceback("h5py.h5l.LinkProxy.create_soft");
1763
__Pyx_XGIVEREF(__pyx_r);
1764
__Pyx_RefNannyFinishContext();
1768
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":149
1771
* def create_external(self, char* link_name, char* file_name, char* obj_name, # <<<<<<<<<<<<<<
1772
* PropID lcpl=None, PropID lapl=None):
1773
* """(STRING link_name, STRING file_name, STRING obj_name,
1776
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_create_external(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1777
static char __pyx_doc_4h5py_3h5l_9LinkProxy_create_external[] = "(STRING link_name, STRING file_name, STRING obj_name,\n PropLCID lcpl=None, PropLAID lapl=None)\n\n Create a new external link, pointing to an object in another file.\n ";
1778
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_create_external(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1779
char *__pyx_v_link_name;
1780
char *__pyx_v_file_name;
1781
char *__pyx_v_obj_name;
1782
struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lcpl = 0;
1783
struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lapl = 0;
1784
PyObject *__pyx_r = NULL;
1786
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__link_name,&__pyx_n_s__file_name,&__pyx_n_s__obj_name,&__pyx_n_s__lcpl,&__pyx_n_s__lapl,0};
1787
__Pyx_RefNannySetupContext("create_external");
1788
if (unlikely(__pyx_kwds)) {
1790
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":150
1792
* def create_external(self, char* link_name, char* file_name, char* obj_name,
1793
* PropID lcpl=None, PropID lapl=None): # <<<<<<<<<<<<<<
1794
* """(STRING link_name, STRING file_name, STRING obj_name,
1795
* PropLCID lcpl=None, PropLAID lapl=None)
1797
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
1798
PyObject* values[5] = {0,0,0,0,0};
1799
values[3] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
1800
values[4] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
1801
switch (PyTuple_GET_SIZE(__pyx_args)) {
1802
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
1803
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
1804
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1805
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1806
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1808
default: goto __pyx_L5_argtuple_error;
1810
switch (PyTuple_GET_SIZE(__pyx_args)) {
1812
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__link_name);
1813
if (likely(values[0])) kw_args--;
1814
else goto __pyx_L5_argtuple_error;
1816
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__file_name);
1817
if (likely(values[1])) kw_args--;
1819
__Pyx_RaiseArgtupleInvalid("create_external", 0, 3, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1822
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj_name);
1823
if (likely(values[2])) kw_args--;
1825
__Pyx_RaiseArgtupleInvalid("create_external", 0, 3, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1829
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lcpl);
1830
if (unlikely(value)) { values[3] = value; kw_args--; }
1834
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lapl);
1835
if (unlikely(value)) { values[4] = value; kw_args--; }
1838
if (unlikely(kw_args > 0)) {
1839
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "create_external") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1841
__pyx_v_link_name = __Pyx_PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_link_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1842
__pyx_v_file_name = __Pyx_PyBytes_AsString(values[1]); if (unlikely((!__pyx_v_file_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1843
__pyx_v_obj_name = __Pyx_PyBytes_AsString(values[2]); if (unlikely((!__pyx_v_obj_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1844
__pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[3]);
1845
__pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[4]);
1847
__pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
1848
__pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
1849
switch (PyTuple_GET_SIZE(__pyx_args)) {
1851
__pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)PyTuple_GET_ITEM(__pyx_args, 4));
1853
__pyx_v_lcpl = ((struct __pyx_obj_4h5py_3h5p_PropID *)PyTuple_GET_ITEM(__pyx_args, 3));
1855
__pyx_v_obj_name = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((!__pyx_v_obj_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1856
__pyx_v_file_name = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((!__pyx_v_file_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1857
__pyx_v_link_name = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((!__pyx_v_link_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1859
default: goto __pyx_L5_argtuple_error;
1862
goto __pyx_L4_argument_unpacking_done;
1863
__pyx_L5_argtuple_error:;
1864
__Pyx_RaiseArgtupleInvalid("create_external", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1866
__Pyx_AddTraceback("h5py.h5l.LinkProxy.create_external");
1868
__pyx_L4_argument_unpacking_done:;
1869
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lcpl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lcpl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1870
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lapl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lapl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1872
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":157
1874
* H5Lcreate_external(file_name, obj_name, self.id, link_name,
1875
* pdefault(lcpl), pdefault(lapl)) # <<<<<<<<<<<<<<
1879
__pyx_t_1 = H5Lcreate_external(__pyx_v_file_name, __pyx_v_obj_name, ((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id, __pyx_v_link_name, __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lcpl), __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lapl)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1881
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
1884
__Pyx_AddTraceback("h5py.h5l.LinkProxy.create_external");
1887
__Pyx_XGIVEREF(__pyx_r);
1888
__Pyx_RefNannyFinishContext();
1892
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":160
1895
* def get_val(self, char* name, PropID lapl=None): # <<<<<<<<<<<<<<
1896
* """(STRING name, PropLAID lapl=None) => STRING or TUPLE(file, obj)
1900
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_get_val(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1901
static char __pyx_doc_4h5py_3h5l_9LinkProxy_get_val[] = "(STRING name, PropLAID lapl=None) => STRING or TUPLE(file, obj)\n\n Get the string value of a soft link, or a 2-tuple representing\n the contents of an external link.\n ";
1902
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_get_val(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1904
struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lapl = 0;
1905
hid_t __pyx_v_plist;
1906
H5L_info_t __pyx_v_info;
1907
size_t __pyx_v_buf_size;
1909
char *__pyx_v_ext_file_name;
1910
char *__pyx_v_ext_obj_name;
1911
unsigned int __pyx_v_wtf;
1912
PyObject *__pyx_v_py_retval;
1913
PyObject *__pyx_r = NULL;
1918
PyObject *__pyx_t_5 = NULL;
1919
PyObject *__pyx_t_6 = NULL;
1921
PyObject *__pyx_t_8 = NULL;
1922
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__lapl,0};
1923
__Pyx_RefNannySetupContext("get_val");
1924
if (unlikely(__pyx_kwds)) {
1925
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
1926
PyObject* values[2] = {0,0};
1927
values[1] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
1928
switch (PyTuple_GET_SIZE(__pyx_args)) {
1929
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1930
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1932
default: goto __pyx_L5_argtuple_error;
1934
switch (PyTuple_GET_SIZE(__pyx_args)) {
1936
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name);
1937
if (likely(values[0])) kw_args--;
1938
else goto __pyx_L5_argtuple_error;
1941
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lapl);
1942
if (unlikely(value)) { values[1] = value; kw_args--; }
1945
if (unlikely(kw_args > 0)) {
1946
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get_val") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1948
__pyx_v_name = __Pyx_PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1949
__pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[1]);
1951
__pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
1952
switch (PyTuple_GET_SIZE(__pyx_args)) {
1953
case 2: __pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)PyTuple_GET_ITEM(__pyx_args, 1));
1954
case 1: __pyx_v_name = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1956
default: goto __pyx_L5_argtuple_error;
1959
goto __pyx_L4_argument_unpacking_done;
1960
__pyx_L5_argtuple_error:;
1961
__Pyx_RaiseArgtupleInvalid("get_val", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1963
__Pyx_AddTraceback("h5py.h5l.LinkProxy.get_val");
1965
__pyx_L4_argument_unpacking_done:;
1966
__Pyx_INCREF((PyObject *)__pyx_v_self);
1967
__Pyx_INCREF((PyObject *)__pyx_v_lapl);
1968
__pyx_v_py_retval = Py_None; __Pyx_INCREF(Py_None);
1969
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lapl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lapl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1971
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":166
1972
* the contents of an external link.
1974
* cdef hid_t plist = pdefault(lapl) # <<<<<<<<<<<<<<
1975
* cdef H5L_info_t info
1976
* cdef size_t buf_size
1978
__pyx_v_plist = __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lapl);
1980
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":169
1981
* cdef H5L_info_t info
1982
* cdef size_t buf_size
1983
* cdef char* buf = NULL # <<<<<<<<<<<<<<
1984
* cdef char* ext_file_name = NULL
1985
* cdef char* ext_obj_name = NULL
1989
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":170
1990
* cdef size_t buf_size
1991
* cdef char* buf = NULL
1992
* cdef char* ext_file_name = NULL # <<<<<<<<<<<<<<
1993
* cdef char* ext_obj_name = NULL
1994
* cdef unsigned int wtf = 0
1996
__pyx_v_ext_file_name = NULL;
1998
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":171
1999
* cdef char* buf = NULL
2000
* cdef char* ext_file_name = NULL
2001
* cdef char* ext_obj_name = NULL # <<<<<<<<<<<<<<
2002
* cdef unsigned int wtf = 0
2005
__pyx_v_ext_obj_name = NULL;
2007
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":172
2008
* cdef char* ext_file_name = NULL
2009
* cdef char* ext_obj_name = NULL
2010
* cdef unsigned int wtf = 0 # <<<<<<<<<<<<<<
2012
* H5Lget_info(self.id, name, &info, plist)
2016
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":174
2017
* cdef unsigned int wtf = 0
2019
* H5Lget_info(self.id, name, &info, plist) # <<<<<<<<<<<<<<
2020
* if info.type != H5L_TYPE_SOFT and info.type != H5L_TYPE_EXTERNAL:
2021
* raise TypeError("Link must be either a soft or external link")
2023
__pyx_t_1 = H5Lget_info(((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id, __pyx_v_name, (&__pyx_v_info), __pyx_v_plist); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2025
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":175
2027
* H5Lget_info(self.id, name, &info, plist)
2028
* if info.type != H5L_TYPE_SOFT and info.type != H5L_TYPE_EXTERNAL: # <<<<<<<<<<<<<<
2029
* raise TypeError("Link must be either a soft or external link")
2032
__pyx_t_2 = (__pyx_v_info.type != H5L_TYPE_SOFT);
2034
__pyx_t_3 = (__pyx_v_info.type != H5L_TYPE_EXTERNAL);
2035
__pyx_t_4 = __pyx_t_3;
2037
__pyx_t_4 = __pyx_t_2;
2041
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":176
2042
* H5Lget_info(self.id, name, &info, plist)
2043
* if info.type != H5L_TYPE_SOFT and info.type != H5L_TYPE_EXTERNAL:
2044
* raise TypeError("Link must be either a soft or external link") # <<<<<<<<<<<<<<
2046
* buf_size = info.u.val_size
2048
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2049
__Pyx_GOTREF(__pyx_t_5);
2050
__Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
2051
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_2));
2052
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
2053
__pyx_t_6 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2054
__Pyx_GOTREF(__pyx_t_6);
2055
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2056
__Pyx_Raise(__pyx_t_6, 0, 0);
2057
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2058
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2063
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":178
2064
* raise TypeError("Link must be either a soft or external link")
2066
* buf_size = info.u.val_size # <<<<<<<<<<<<<<
2067
* buf = <char*>emalloc(buf_size)
2070
__pyx_v_buf_size = __pyx_v_info.u.val_size;
2072
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":179
2074
* buf_size = info.u.val_size
2075
* buf = <char*>emalloc(buf_size) # <<<<<<<<<<<<<<
2077
* H5Lget_val(self.id, name, buf, buf_size, plist)
2079
__pyx_t_7 = __pyx_f_4h5py_5utils_emalloc(__pyx_v_buf_size); if (unlikely(__pyx_t_7 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2080
__pyx_v_buf = ((char *)__pyx_t_7);
2082
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":180
2083
* buf_size = info.u.val_size
2084
* buf = <char*>emalloc(buf_size)
2085
* try: # <<<<<<<<<<<<<<
2086
* H5Lget_val(self.id, name, buf, buf_size, plist)
2087
* if info.type == H5L_TYPE_SOFT:
2091
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":181
2092
* buf = <char*>emalloc(buf_size)
2094
* H5Lget_val(self.id, name, buf, buf_size, plist) # <<<<<<<<<<<<<<
2095
* if info.type == H5L_TYPE_SOFT:
2098
__pyx_t_1 = H5Lget_val(((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id, __pyx_v_name, __pyx_v_buf, __pyx_v_buf_size, __pyx_v_plist); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L8;}
2100
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":182
2102
* H5Lget_val(self.id, name, buf, buf_size, plist)
2103
* if info.type == H5L_TYPE_SOFT: # <<<<<<<<<<<<<<
2107
__pyx_t_4 = (__pyx_v_info.type == H5L_TYPE_SOFT);
2110
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":183
2111
* H5Lget_val(self.id, name, buf, buf_size, plist)
2112
* if info.type == H5L_TYPE_SOFT:
2113
* py_retval = buf # <<<<<<<<<<<<<<
2115
* H5Lunpack_elink_val(buf, buf_size, &wtf, &ext_file_name, &ext_obj_name)
2117
__pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_buf); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L8;}
2118
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
2119
__Pyx_DECREF(__pyx_v_py_retval);
2120
__pyx_v_py_retval = ((PyObject *)__pyx_t_6);
2126
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":185
2129
* H5Lunpack_elink_val(buf, buf_size, &wtf, &ext_file_name, &ext_obj_name) # <<<<<<<<<<<<<<
2130
* py_retval = (str(ext_file_name), str(ext_obj_name))
2133
__pyx_t_1 = H5Lunpack_elink_val(__pyx_v_buf, __pyx_v_buf_size, (&__pyx_v_wtf), (&__pyx_v_ext_file_name), (&__pyx_v_ext_obj_name)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L8;}
2135
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":186
2137
* H5Lunpack_elink_val(buf, buf_size, &wtf, &ext_file_name, &ext_obj_name)
2138
* py_retval = (str(ext_file_name), str(ext_obj_name)) # <<<<<<<<<<<<<<
2142
__pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_ext_file_name); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L8;}
2143
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
2144
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L8;}
2145
__Pyx_GOTREF(__pyx_t_5);
2146
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6));
2147
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
2149
__pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L8;}
2150
__Pyx_GOTREF(__pyx_t_6);
2151
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2152
__pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_ext_obj_name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L8;}
2153
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
2154
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L8;}
2155
__Pyx_GOTREF(__pyx_t_8);
2156
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_5));
2157
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
2159
__pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L8;}
2160
__Pyx_GOTREF(__pyx_t_5);
2161
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
2162
__pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L8;}
2163
__Pyx_GOTREF(__pyx_t_8);
2164
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
2165
__Pyx_GIVEREF(__pyx_t_6);
2166
PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5);
2167
__Pyx_GIVEREF(__pyx_t_5);
2170
__Pyx_DECREF(__pyx_v_py_retval);
2171
__pyx_v_py_retval = __pyx_t_8;
2178
PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
2179
int __pyx_exc_lineno;
2180
__pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
2181
__pyx_why = 0; goto __pyx_L9;
2184
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
2185
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2186
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
2187
__Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
2188
__pyx_exc_lineno = __pyx_lineno;
2193
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":188
2194
* py_retval = (str(ext_file_name), str(ext_obj_name))
2196
* efree(buf) # <<<<<<<<<<<<<<
2200
__pyx_f_4h5py_5utils_efree(__pyx_v_buf);
2201
switch (__pyx_why) {
2203
__Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
2204
__pyx_lineno = __pyx_exc_lineno;
2206
__pyx_exc_value = 0;
2208
goto __pyx_L1_error;
2213
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":190
2216
* return py_retval # <<<<<<<<<<<<<<
2220
__Pyx_XDECREF(__pyx_r);
2221
__Pyx_INCREF(__pyx_v_py_retval);
2222
__pyx_r = __pyx_v_py_retval;
2225
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
2228
__Pyx_XDECREF(__pyx_t_5);
2229
__Pyx_XDECREF(__pyx_t_6);
2230
__Pyx_XDECREF(__pyx_t_8);
2231
__Pyx_AddTraceback("h5py.h5l.LinkProxy.get_val");
2234
__Pyx_DECREF(__pyx_v_py_retval);
2235
__Pyx_DECREF((PyObject *)__pyx_v_self);
2236
__Pyx_DECREF((PyObject *)__pyx_v_lapl);
2237
__Pyx_XGIVEREF(__pyx_r);
2238
__Pyx_RefNannyFinishContext();
2242
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":193
2245
* def exists(self, char* name): # <<<<<<<<<<<<<<
2246
* """ (STRING name) => BOOL
2250
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_exists(PyObject *__pyx_v_self, PyObject *__pyx_arg_name); /*proto*/
2251
static char __pyx_doc_4h5py_3h5l_9LinkProxy_exists[] = " (STRING name) => BOOL\n\n Check if a link of the specified name exists in this group.\n ";
2252
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_exists(PyObject *__pyx_v_self, PyObject *__pyx_arg_name) {
2254
PyObject *__pyx_r = NULL;
2256
PyObject *__pyx_t_2 = NULL;
2257
__Pyx_RefNannySetupContext("exists");
2258
assert(__pyx_arg_name); {
2259
__pyx_v_name = __Pyx_PyBytes_AsString(__pyx_arg_name); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2261
goto __pyx_L4_argument_unpacking_done;
2263
__Pyx_AddTraceback("h5py.h5l.LinkProxy.exists");
2265
__pyx_L4_argument_unpacking_done:;
2267
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":198
2268
* Check if a link of the specified name exists in this group.
2270
* return <bint>(H5Lexists(self.id, name, H5P_DEFAULT)) # <<<<<<<<<<<<<<
2274
__Pyx_XDECREF(__pyx_r);
2275
__pyx_t_1 = H5Lexists(((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id, __pyx_v_name, H5P_DEFAULT); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2276
__pyx_t_2 = __Pyx_PyBool_FromLong(((int)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2277
__Pyx_GOTREF(__pyx_t_2);
2278
__pyx_r = __pyx_t_2;
2282
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
2285
__Pyx_XDECREF(__pyx_t_2);
2286
__Pyx_AddTraceback("h5py.h5l.LinkProxy.exists");
2289
__Pyx_XGIVEREF(__pyx_r);
2290
__Pyx_RefNannyFinishContext();
2294
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":201
2297
* def get_info(self, char* name, int index=-1, *, PropID lapl=None): # <<<<<<<<<<<<<<
2298
* """(STRING name=, INT index=, **kwds) => LinkInfo instance
2302
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_get_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2303
static char __pyx_doc_4h5py_3h5l_9LinkProxy_get_info[] = "(STRING name=, INT index=, **kwds) => LinkInfo instance\n\n Get information about a link, either by name or its index.\n\n Keywords:\n ";
2304
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_get_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2307
struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lapl = 0;
2308
struct __pyx_obj_4h5py_3h5l_LinkInfo *__pyx_v_info = 0;
2309
PyObject *__pyx_r = NULL;
2310
PyObject *__pyx_t_1 = NULL;
2312
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__index,&__pyx_n_s__lapl,0};
2313
__Pyx_RefNannySetupContext("get_info");
2314
if (unlikely(__pyx_kwds)) {
2315
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
2316
PyObject* values[3] = {0,0,0};
2317
values[2] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
2318
switch (PyTuple_GET_SIZE(__pyx_args)) {
2319
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2320
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2322
default: goto __pyx_L5_argtuple_error;
2324
switch (PyTuple_GET_SIZE(__pyx_args)) {
2326
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name);
2327
if (likely(values[0])) kw_args--;
2328
else goto __pyx_L5_argtuple_error;
2331
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
2332
if (unlikely(value)) { values[1] = value; kw_args--; }
2335
while (kw_args > 0) {
2337
value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lapl);
2338
if (value) { values[2] = value; if (!(--kw_args)) break; }
2341
if (unlikely(kw_args > 0)) {
2342
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get_info") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2344
__pyx_v_name = __Pyx_PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2346
__pyx_v_index = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2348
__pyx_v_index = ((int)-1);
2350
__pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[2]);
2352
__pyx_v_index = ((int)-1);
2353
__pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
2354
switch (PyTuple_GET_SIZE(__pyx_args)) {
2355
case 2: __pyx_v_index = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2356
case 1: __pyx_v_name = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2358
default: goto __pyx_L5_argtuple_error;
2361
goto __pyx_L4_argument_unpacking_done;
2362
__pyx_L5_argtuple_error:;
2363
__Pyx_RaiseArgtupleInvalid("get_info", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2365
__Pyx_AddTraceback("h5py.h5l.LinkProxy.get_info");
2367
__pyx_L4_argument_unpacking_done:;
2368
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lapl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lapl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2370
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":208
2373
* cdef LinkInfo info = LinkInfo() # <<<<<<<<<<<<<<
2374
* H5Lget_info(self.id, name, &info.infostruct, pdefault(lapl))
2377
__pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4h5py_3h5l_LinkInfo)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2378
__Pyx_GOTREF(__pyx_t_1);
2379
__pyx_v_info = ((struct __pyx_obj_4h5py_3h5l_LinkInfo *)__pyx_t_1);
2382
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":209
2384
* cdef LinkInfo info = LinkInfo()
2385
* H5Lget_info(self.id, name, &info.infostruct, pdefault(lapl)) # <<<<<<<<<<<<<<
2389
__pyx_t_2 = H5Lget_info(((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id, __pyx_v_name, (&__pyx_v_info->infostruct), __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lapl)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2391
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":210
2392
* cdef LinkInfo info = LinkInfo()
2393
* H5Lget_info(self.id, name, &info.infostruct, pdefault(lapl))
2394
* return info # <<<<<<<<<<<<<<
2398
__Pyx_XDECREF(__pyx_r);
2399
__Pyx_INCREF(((PyObject *)__pyx_v_info));
2400
__pyx_r = ((PyObject *)__pyx_v_info);
2403
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
2406
__Pyx_XDECREF(__pyx_t_1);
2407
__Pyx_AddTraceback("h5py.h5l.LinkProxy.get_info");
2410
__Pyx_XDECREF((PyObject *)__pyx_v_info);
2411
__Pyx_XGIVEREF(__pyx_r);
2412
__Pyx_RefNannyFinishContext();
2416
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":213
2419
* def visit(self, object func, *, # <<<<<<<<<<<<<<
2420
* int idx_type=H5_INDEX_NAME, int order=H5_ITER_NATIVE,
2421
* char* obj_name='.', PropID lapl=None, bint info=0):
2424
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_visit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2425
static char __pyx_doc_4h5py_3h5l_9LinkProxy_visit[] = "(CALLABLE func, **kwds) => <Return value from func>\n\n Iterate a function or callable object over all groups below this\n one. Your callable should conform to the signature::\n\n func(STRING name) => Result\n\n or if the keyword argument \"info\" is True::\n\n func(STRING name, LinkInfo info) => Result\n\n Returning None or a logical False continues iteration; returning\n anything else aborts iteration and returns that value.\n\n BOOL info (False)\n Provide a LinkInfo instance to callback\n\n STRING obj_name (\".\")\n Visit this subgroup instead\n\n PropLAID lapl (None)\n Link access property list for \"obj_name\"\n\n INT idx_type (h5.INDEX_NAME)\n\n INT order (h5.ITER_NATIVE)\n ";
2426
static PyObject *__pyx_pf_4h5py_3h5l_9LinkProxy_visit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2427
PyObject *__pyx_v_func = 0;
2428
int __pyx_v_idx_type;
2430
char *__pyx_v_obj_name;
2431
struct __pyx_obj_4h5py_3h5p_PropID *__pyx_v_lapl = 0;
2433
struct __pyx_obj_4h5py_3h5l__LinkVisitor *__pyx_v_it = 0;
2434
H5L_iterate_t __pyx_v_cfunc;
2435
PyObject *__pyx_r = NULL;
2436
PyObject *__pyx_t_1 = NULL;
2437
PyObject *__pyx_t_2 = NULL;
2440
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__func,&__pyx_n_s__idx_type,&__pyx_n_s__order,&__pyx_n_s__obj_name,&__pyx_n_s__lapl,&__pyx_n_s__info,0};
2441
__Pyx_RefNannySetupContext("visit");
2442
if (unlikely(__pyx_kwds)) {
2444
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":215
2445
* def visit(self, object func, *,
2446
* int idx_type=H5_INDEX_NAME, int order=H5_ITER_NATIVE,
2447
* char* obj_name='.', PropID lapl=None, bint info=0): # <<<<<<<<<<<<<<
2448
* """(CALLABLE func, **kwds) => <Return value from func>
2451
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
2452
PyObject* values[6] = {0,0,0,0,0,0};
2453
values[4] = (PyObject*)((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
2454
switch (PyTuple_GET_SIZE(__pyx_args)) {
2455
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2457
default: goto __pyx_L5_argtuple_error;
2459
switch (PyTuple_GET_SIZE(__pyx_args)) {
2461
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func);
2462
if (likely(values[0])) kw_args--;
2463
else goto __pyx_L5_argtuple_error;
2465
while (kw_args > 0) {
2467
value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__idx_type);
2468
if (value) { values[1] = value; if (!(--kw_args)) break; }
2469
value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__order);
2470
if (value) { values[2] = value; if (!(--kw_args)) break; }
2471
value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj_name);
2472
if (value) { values[3] = value; if (!(--kw_args)) break; }
2473
value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lapl);
2474
if (value) { values[4] = value; if (!(--kw_args)) break; }
2475
value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__info);
2476
if (value) { values[5] = value; if (!(--kw_args)) break; }
2479
if (unlikely(kw_args > 0)) {
2480
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "visit") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2482
__pyx_v_func = values[0];
2484
__pyx_v_idx_type = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_idx_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2486
__pyx_v_idx_type = __pyx_k_3;
2489
__pyx_v_order = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_order == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2491
__pyx_v_order = __pyx_k_4;
2494
__pyx_v_obj_name = __Pyx_PyBytes_AsString(values[3]); if (unlikely((!__pyx_v_obj_name) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2496
__pyx_v_obj_name = ((char *)__pyx_k_5);
2498
__pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)values[4]);
2500
__pyx_v_info = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_info == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2502
__pyx_v_info = ((int)0);
2504
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
2505
goto __pyx_L5_argtuple_error;
2507
__pyx_v_func = PyTuple_GET_ITEM(__pyx_args, 0);
2508
__pyx_v_idx_type = __pyx_k_3;
2509
__pyx_v_order = __pyx_k_4;
2510
__pyx_v_obj_name = ((char *)__pyx_k_5);
2511
__pyx_v_lapl = ((struct __pyx_obj_4h5py_3h5p_PropID *)Py_None);
2512
__pyx_v_info = ((int)0);
2514
goto __pyx_L4_argument_unpacking_done;
2515
__pyx_L5_argtuple_error:;
2516
__Pyx_RaiseArgtupleInvalid("visit", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2518
__Pyx_AddTraceback("h5py.h5l.LinkProxy.visit");
2520
__pyx_L4_argument_unpacking_done:;
2521
__Pyx_INCREF((PyObject *)__pyx_v_self);
2522
__Pyx_INCREF(__pyx_v_func);
2523
__Pyx_INCREF((PyObject *)__pyx_v_lapl);
2524
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lapl), __pyx_ptype_4h5py_3h5p_PropID, 1, "lapl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2526
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":243
2527
* INT order (h5.ITER_NATIVE)
2529
* cdef _LinkVisitor it = _LinkVisitor(func) # <<<<<<<<<<<<<<
2530
* cdef H5L_iterate_t cfunc
2533
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2534
__Pyx_GOTREF(__pyx_t_1);
2535
__Pyx_INCREF(__pyx_v_func);
2536
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_func);
2537
__Pyx_GIVEREF(__pyx_v_func);
2538
__pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4h5py_3h5l__LinkVisitor)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2539
__Pyx_GOTREF(__pyx_t_2);
2540
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2541
__pyx_v_it = ((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)__pyx_t_2);
2544
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":246
2545
* cdef H5L_iterate_t cfunc
2547
* if info: # <<<<<<<<<<<<<<
2548
* cfunc = cb_link_iterate
2551
__pyx_t_3 = __pyx_v_info;
2554
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":247
2557
* cfunc = cb_link_iterate # <<<<<<<<<<<<<<
2559
* cfunc = cb_link_simple
2561
__pyx_v_cfunc = __pyx_f_4h5py_3h5l_cb_link_iterate;
2566
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":249
2567
* cfunc = cb_link_iterate
2569
* cfunc = cb_link_simple # <<<<<<<<<<<<<<
2571
* H5Lvisit_by_name(self.id, obj_name, <H5_index_t>idx_type,
2573
__pyx_v_cfunc = __pyx_f_4h5py_3h5l_cb_link_simple;
2577
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":252
2579
* H5Lvisit_by_name(self.id, obj_name, <H5_index_t>idx_type,
2580
* <H5_iter_order_t>order, cfunc, <void*>it, pdefault(lapl)) # <<<<<<<<<<<<<<
2584
__pyx_t_4 = H5Lvisit_by_name(((struct __pyx_obj_4h5py_3h5l_LinkProxy *)__pyx_v_self)->id, __pyx_v_obj_name, ((H5_index_t)__pyx_v_idx_type), ((H5_iter_order_t)__pyx_v_order), __pyx_v_cfunc, ((void *)__pyx_v_it), __pyx_f_4h5py_3h5p_pdefault(__pyx_v_lapl)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2586
/* "/home/tachyon/h5py/h5py/h5l_body.pyx":254
2587
* <H5_iter_order_t>order, cfunc, <void*>it, pdefault(lapl))
2589
* return it.retval # <<<<<<<<<<<<<<
2593
__Pyx_XDECREF(__pyx_r);
2594
__Pyx_INCREF(__pyx_v_it->retval);
2595
__pyx_r = __pyx_v_it->retval;
2598
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
2601
__Pyx_XDECREF(__pyx_t_1);
2602
__Pyx_XDECREF(__pyx_t_2);
2603
__Pyx_AddTraceback("h5py.h5l.LinkProxy.visit");
2606
__Pyx_XDECREF((PyObject *)__pyx_v_it);
2607
__Pyx_DECREF((PyObject *)__pyx_v_self);
2608
__Pyx_DECREF(__pyx_v_func);
2609
__Pyx_DECREF((PyObject *)__pyx_v_lapl);
2610
__Pyx_XGIVEREF(__pyx_r);
2611
__Pyx_RefNannyFinishContext();
2615
static PyObject *__pyx_tp_new_4h5py_3h5l_LinkProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
2616
PyObject *o = (*t->tp_alloc)(t, 0);
2621
static void __pyx_tp_dealloc_4h5py_3h5l_LinkProxy(PyObject *o) {
2622
(*Py_TYPE(o)->tp_free)(o);
2625
static struct PyMethodDef __pyx_methods_4h5py_3h5l_LinkProxy[] = {
2626
{__Pyx_NAMESTR("create_hard"), (PyCFunction)__pyx_pf_4h5py_3h5l_9LinkProxy_create_hard, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5l_9LinkProxy_create_hard)},
2627
{__Pyx_NAMESTR("create_soft"), (PyCFunction)__pyx_pf_4h5py_3h5l_9LinkProxy_create_soft, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5l_9LinkProxy_create_soft)},
2628
{__Pyx_NAMESTR("create_external"), (PyCFunction)__pyx_pf_4h5py_3h5l_9LinkProxy_create_external, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5l_9LinkProxy_create_external)},
2629
{__Pyx_NAMESTR("get_val"), (PyCFunction)__pyx_pf_4h5py_3h5l_9LinkProxy_get_val, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5l_9LinkProxy_get_val)},
2630
{__Pyx_NAMESTR("exists"), (PyCFunction)__pyx_pf_4h5py_3h5l_9LinkProxy_exists, METH_O, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5l_9LinkProxy_exists)},
2631
{__Pyx_NAMESTR("get_info"), (PyCFunction)__pyx_pf_4h5py_3h5l_9LinkProxy_get_info, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5l_9LinkProxy_get_info)},
2632
{__Pyx_NAMESTR("visit"), (PyCFunction)__pyx_pf_4h5py_3h5l_9LinkProxy_visit, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4h5py_3h5l_9LinkProxy_visit)},
2636
static PyNumberMethods __pyx_tp_as_number_LinkProxy = {
2640
#if PY_MAJOR_VERSION < 3
2656
#if PY_MAJOR_VERSION < 3
2660
#if PY_MAJOR_VERSION >= 3
2666
#if PY_MAJOR_VERSION < 3
2669
#if PY_MAJOR_VERSION < 3
2672
0, /*nb_inplace_add*/
2673
0, /*nb_inplace_subtract*/
2674
0, /*nb_inplace_multiply*/
2675
#if PY_MAJOR_VERSION < 3
2676
0, /*nb_inplace_divide*/
2678
0, /*nb_inplace_remainder*/
2679
0, /*nb_inplace_power*/
2680
0, /*nb_inplace_lshift*/
2681
0, /*nb_inplace_rshift*/
2682
0, /*nb_inplace_and*/
2683
0, /*nb_inplace_xor*/
2684
0, /*nb_inplace_or*/
2685
0, /*nb_floor_divide*/
2686
0, /*nb_true_divide*/
2687
0, /*nb_inplace_floor_divide*/
2688
0, /*nb_inplace_true_divide*/
2689
#if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
2694
static PySequenceMethods __pyx_tp_as_sequence_LinkProxy = {
2703
0, /*sq_inplace_concat*/
2704
0, /*sq_inplace_repeat*/
2707
static PyMappingMethods __pyx_tp_as_mapping_LinkProxy = {
2710
0, /*mp_ass_subscript*/
2713
static PyBufferProcs __pyx_tp_as_buffer_LinkProxy = {
2714
#if PY_MAJOR_VERSION < 3
2715
0, /*bf_getreadbuffer*/
2717
#if PY_MAJOR_VERSION < 3
2718
0, /*bf_getwritebuffer*/
2720
#if PY_MAJOR_VERSION < 3
2721
0, /*bf_getsegcount*/
2723
#if PY_MAJOR_VERSION < 3
2724
0, /*bf_getcharbuffer*/
2726
#if PY_VERSION_HEX >= 0x02060000
2729
#if PY_VERSION_HEX >= 0x02060000
2730
0, /*bf_releasebuffer*/
2734
PyTypeObject __pyx_type_4h5py_3h5l_LinkProxy = {
2735
PyVarObject_HEAD_INIT(0, 0)
2736
__Pyx_NAMESTR("h5py.h5l.LinkProxy"), /*tp_name*/
2737
sizeof(struct __pyx_obj_4h5py_3h5l_LinkProxy), /*tp_basicsize*/
2739
__pyx_tp_dealloc_4h5py_3h5l_LinkProxy, /*tp_dealloc*/
2745
&__pyx_tp_as_number_LinkProxy, /*tp_as_number*/
2746
&__pyx_tp_as_sequence_LinkProxy, /*tp_as_sequence*/
2747
&__pyx_tp_as_mapping_LinkProxy, /*tp_as_mapping*/
2748
__pyx_pf_4h5py_3h5l_9LinkProxy___hash__, /*tp_hash*/
2753
&__pyx_tp_as_buffer_LinkProxy, /*tp_as_buffer*/
2754
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
2755
__Pyx_DOCSTR("\n Proxy class which provides access to the HDF5 \"H5L\" API.\n\n These come attached to GroupID objects as \"obj.links\". Since every\n H5L function operates on at least one group, the methods provided\n operate on their parent group identifier. For example::\n\n >>> g = h5g.open(fid, '/')\n >>> g.links.exists(\"MyGroup\")\n True\n >>> g.links.exists(\"FooBar\")\n False\n\n * Hashable: No\n * Equality: Undefined\n "), /*tp_doc*/
2758
__pyx_pf_4h5py_3h5l_9LinkProxy___richcmp__, /*tp_richcompare*/
2759
0, /*tp_weaklistoffset*/
2762
__pyx_methods_4h5py_3h5l_LinkProxy, /*tp_methods*/
2769
0, /*tp_dictoffset*/
2770
__pyx_pf_4h5py_3h5l_9LinkProxy___init__, /*tp_init*/
2772
__pyx_tp_new_4h5py_3h5l_LinkProxy, /*tp_new*/
2778
0, /*tp_subclasses*/
2781
#if PY_VERSION_HEX >= 0x02060000
2782
0, /*tp_version_tag*/
2786
static PyObject *__pyx_tp_new_4h5py_3h5l_LinkInfo(PyTypeObject *t, PyObject *a, PyObject *k) {
2787
PyObject *o = __pyx_ptype_4h5py_2h5_SmartStruct->tp_new(t, a, k);
2792
static void __pyx_tp_dealloc_4h5py_3h5l_LinkInfo(PyObject *o) {
2793
__pyx_ptype_4h5py_2h5_SmartStruct->tp_dealloc(o);
2796
static int __pyx_tp_traverse_4h5py_3h5l_LinkInfo(PyObject *o, visitproc v, void *a) {
2798
if (__pyx_ptype_4h5py_2h5_SmartStruct->tp_traverse) {
2799
e = __pyx_ptype_4h5py_2h5_SmartStruct->tp_traverse(o, v, a); if (e) return e;
2804
static int __pyx_tp_clear_4h5py_3h5l_LinkInfo(PyObject *o) {
2805
if (__pyx_ptype_4h5py_2h5_SmartStruct->tp_clear) {
2806
__pyx_ptype_4h5py_2h5_SmartStruct->tp_clear(o);
2811
static PyObject *__pyx_getprop_4h5py_3h5l_8LinkInfo_type(PyObject *o, void *x) {
2812
return __pyx_pf_4h5py_3h5l_8LinkInfo_4type___get__(o);
2815
static PyObject *__pyx_getprop_4h5py_3h5l_8LinkInfo_corder_valid(PyObject *o, void *x) {
2816
return __pyx_pf_4h5py_3h5l_8LinkInfo_12corder_valid___get__(o);
2819
static PyObject *__pyx_getprop_4h5py_3h5l_8LinkInfo_corder(PyObject *o, void *x) {
2820
return __pyx_pf_4h5py_3h5l_8LinkInfo_6corder___get__(o);
2823
static PyObject *__pyx_getprop_4h5py_3h5l_8LinkInfo_cset(PyObject *o, void *x) {
2824
return __pyx_pf_4h5py_3h5l_8LinkInfo_4cset___get__(o);
2827
static PyObject *__pyx_getprop_4h5py_3h5l_8LinkInfo_u(PyObject *o, void *x) {
2828
return __pyx_pf_4h5py_3h5l_8LinkInfo_1u___get__(o);
2831
static struct PyMethodDef __pyx_methods_4h5py_3h5l_LinkInfo[] = {
2835
static struct PyGetSetDef __pyx_getsets_4h5py_3h5l_LinkInfo[] = {
2836
{(char *)"type", __pyx_getprop_4h5py_3h5l_8LinkInfo_type, 0, __Pyx_DOCSTR(__pyx_k_6), 0},
2837
{(char *)"corder_valid", __pyx_getprop_4h5py_3h5l_8LinkInfo_corder_valid, 0, __Pyx_DOCSTR(__pyx_k_7), 0},
2838
{(char *)"corder", __pyx_getprop_4h5py_3h5l_8LinkInfo_corder, 0, __Pyx_DOCSTR(__pyx_k_8), 0},
2839
{(char *)"cset", __pyx_getprop_4h5py_3h5l_8LinkInfo_cset, 0, __Pyx_DOCSTR(__pyx_k_9), 0},
2840
{(char *)"u", __pyx_getprop_4h5py_3h5l_8LinkInfo_u, 0, __Pyx_DOCSTR(__pyx_k_10), 0},
2844
static PyNumberMethods __pyx_tp_as_number_LinkInfo = {
2848
#if PY_MAJOR_VERSION < 3
2864
#if PY_MAJOR_VERSION < 3
2868
#if PY_MAJOR_VERSION >= 3
2874
#if PY_MAJOR_VERSION < 3
2877
#if PY_MAJOR_VERSION < 3
2880
0, /*nb_inplace_add*/
2881
0, /*nb_inplace_subtract*/
2882
0, /*nb_inplace_multiply*/
2883
#if PY_MAJOR_VERSION < 3
2884
0, /*nb_inplace_divide*/
2886
0, /*nb_inplace_remainder*/
2887
0, /*nb_inplace_power*/
2888
0, /*nb_inplace_lshift*/
2889
0, /*nb_inplace_rshift*/
2890
0, /*nb_inplace_and*/
2891
0, /*nb_inplace_xor*/
2892
0, /*nb_inplace_or*/
2893
0, /*nb_floor_divide*/
2894
0, /*nb_true_divide*/
2895
0, /*nb_inplace_floor_divide*/
2896
0, /*nb_inplace_true_divide*/
2897
#if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
2902
static PySequenceMethods __pyx_tp_as_sequence_LinkInfo = {
2911
0, /*sq_inplace_concat*/
2912
0, /*sq_inplace_repeat*/
2915
static PyMappingMethods __pyx_tp_as_mapping_LinkInfo = {
2918
0, /*mp_ass_subscript*/
2921
static PyBufferProcs __pyx_tp_as_buffer_LinkInfo = {
2922
#if PY_MAJOR_VERSION < 3
2923
0, /*bf_getreadbuffer*/
2925
#if PY_MAJOR_VERSION < 3
2926
0, /*bf_getwritebuffer*/
2928
#if PY_MAJOR_VERSION < 3
2929
0, /*bf_getsegcount*/
2931
#if PY_MAJOR_VERSION < 3
2932
0, /*bf_getcharbuffer*/
2934
#if PY_VERSION_HEX >= 0x02060000
2937
#if PY_VERSION_HEX >= 0x02060000
2938
0, /*bf_releasebuffer*/
2942
PyTypeObject __pyx_type_4h5py_3h5l_LinkInfo = {
2943
PyVarObject_HEAD_INIT(0, 0)
2944
__Pyx_NAMESTR("h5py.h5l.LinkInfo"), /*tp_name*/
2945
sizeof(struct __pyx_obj_4h5py_3h5l_LinkInfo), /*tp_basicsize*/
2947
__pyx_tp_dealloc_4h5py_3h5l_LinkInfo, /*tp_dealloc*/
2953
&__pyx_tp_as_number_LinkInfo, /*tp_as_number*/
2954
&__pyx_tp_as_sequence_LinkInfo, /*tp_as_sequence*/
2955
&__pyx_tp_as_mapping_LinkInfo, /*tp_as_mapping*/
2961
&__pyx_tp_as_buffer_LinkInfo, /*tp_as_buffer*/
2962
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
2964
__pyx_tp_traverse_4h5py_3h5l_LinkInfo, /*tp_traverse*/
2965
__pyx_tp_clear_4h5py_3h5l_LinkInfo, /*tp_clear*/
2966
0, /*tp_richcompare*/
2967
0, /*tp_weaklistoffset*/
2970
__pyx_methods_4h5py_3h5l_LinkInfo, /*tp_methods*/
2972
__pyx_getsets_4h5py_3h5l_LinkInfo, /*tp_getset*/
2977
0, /*tp_dictoffset*/
2980
__pyx_tp_new_4h5py_3h5l_LinkInfo, /*tp_new*/
2986
0, /*tp_subclasses*/
2989
#if PY_VERSION_HEX >= 0x02060000
2990
0, /*tp_version_tag*/
2994
static PyObject *__pyx_tp_new_4h5py_3h5l__LinkVisitor(PyTypeObject *t, PyObject *a, PyObject *k) {
2995
struct __pyx_obj_4h5py_3h5l__LinkVisitor *p;
2996
PyObject *o = (*t->tp_alloc)(t, 0);
2998
p = ((struct __pyx_obj_4h5py_3h5l__LinkVisitor *)o);
2999
p->func = Py_None; Py_INCREF(Py_None);
3000
p->retval = Py_None; Py_INCREF(Py_None);
3001
p->info = ((struct __pyx_obj_4h5py_3h5l_LinkInfo *)Py_None); Py_INCREF(Py_None);
3005
static void __pyx_tp_dealloc_4h5py_3h5l__LinkVisitor(PyObject *o) {
3006
struct __pyx_obj_4h5py_3h5l__LinkVisitor *p = (struct __pyx_obj_4h5py_3h5l__LinkVisitor *)o;
3007
Py_XDECREF(p->func);
3008
Py_XDECREF(p->retval);
3009
Py_XDECREF(((PyObject *)p->info));
3010
(*Py_TYPE(o)->tp_free)(o);
3013
static int __pyx_tp_traverse_4h5py_3h5l__LinkVisitor(PyObject *o, visitproc v, void *a) {
3015
struct __pyx_obj_4h5py_3h5l__LinkVisitor *p = (struct __pyx_obj_4h5py_3h5l__LinkVisitor *)o;
3017
e = (*v)(p->func, a); if (e) return e;
3020
e = (*v)(p->retval, a); if (e) return e;
3023
e = (*v)(((PyObject*)p->info), a); if (e) return e;
3028
static int __pyx_tp_clear_4h5py_3h5l__LinkVisitor(PyObject *o) {
3029
struct __pyx_obj_4h5py_3h5l__LinkVisitor *p = (struct __pyx_obj_4h5py_3h5l__LinkVisitor *)o;
3031
tmp = ((PyObject*)p->func);
3032
p->func = Py_None; Py_INCREF(Py_None);
3034
tmp = ((PyObject*)p->retval);
3035
p->retval = Py_None; Py_INCREF(Py_None);
3037
tmp = ((PyObject*)p->info);
3038
p->info = ((struct __pyx_obj_4h5py_3h5l_LinkInfo *)Py_None); Py_INCREF(Py_None);
3043
static struct PyMethodDef __pyx_methods_4h5py_3h5l__LinkVisitor[] = {
3047
static PyNumberMethods __pyx_tp_as_number__LinkVisitor = {
3051
#if PY_MAJOR_VERSION < 3
3067
#if PY_MAJOR_VERSION < 3
3071
#if PY_MAJOR_VERSION >= 3
3077
#if PY_MAJOR_VERSION < 3
3080
#if PY_MAJOR_VERSION < 3
3083
0, /*nb_inplace_add*/
3084
0, /*nb_inplace_subtract*/
3085
0, /*nb_inplace_multiply*/
3086
#if PY_MAJOR_VERSION < 3
3087
0, /*nb_inplace_divide*/
3089
0, /*nb_inplace_remainder*/
3090
0, /*nb_inplace_power*/
3091
0, /*nb_inplace_lshift*/
3092
0, /*nb_inplace_rshift*/
3093
0, /*nb_inplace_and*/
3094
0, /*nb_inplace_xor*/
3095
0, /*nb_inplace_or*/
3096
0, /*nb_floor_divide*/
3097
0, /*nb_true_divide*/
3098
0, /*nb_inplace_floor_divide*/
3099
0, /*nb_inplace_true_divide*/
3100
#if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
3105
static PySequenceMethods __pyx_tp_as_sequence__LinkVisitor = {
3114
0, /*sq_inplace_concat*/
3115
0, /*sq_inplace_repeat*/
3118
static PyMappingMethods __pyx_tp_as_mapping__LinkVisitor = {
3121
0, /*mp_ass_subscript*/
3124
static PyBufferProcs __pyx_tp_as_buffer__LinkVisitor = {
3125
#if PY_MAJOR_VERSION < 3
3126
0, /*bf_getreadbuffer*/
3128
#if PY_MAJOR_VERSION < 3
3129
0, /*bf_getwritebuffer*/
3131
#if PY_MAJOR_VERSION < 3
3132
0, /*bf_getsegcount*/
3134
#if PY_MAJOR_VERSION < 3
3135
0, /*bf_getcharbuffer*/
3137
#if PY_VERSION_HEX >= 0x02060000
3140
#if PY_VERSION_HEX >= 0x02060000
3141
0, /*bf_releasebuffer*/
3145
PyTypeObject __pyx_type_4h5py_3h5l__LinkVisitor = {
3146
PyVarObject_HEAD_INIT(0, 0)
3147
__Pyx_NAMESTR("h5py.h5l._LinkVisitor"), /*tp_name*/
3148
sizeof(struct __pyx_obj_4h5py_3h5l__LinkVisitor), /*tp_basicsize*/
3150
__pyx_tp_dealloc_4h5py_3h5l__LinkVisitor, /*tp_dealloc*/
3156
&__pyx_tp_as_number__LinkVisitor, /*tp_as_number*/
3157
&__pyx_tp_as_sequence__LinkVisitor, /*tp_as_sequence*/
3158
&__pyx_tp_as_mapping__LinkVisitor, /*tp_as_mapping*/
3164
&__pyx_tp_as_buffer__LinkVisitor, /*tp_as_buffer*/
3165
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
3166
__Pyx_DOCSTR(" Helper class for iteration callback "), /*tp_doc*/
3167
__pyx_tp_traverse_4h5py_3h5l__LinkVisitor, /*tp_traverse*/
3168
__pyx_tp_clear_4h5py_3h5l__LinkVisitor, /*tp_clear*/
3169
0, /*tp_richcompare*/
3170
0, /*tp_weaklistoffset*/
3173
__pyx_methods_4h5py_3h5l__LinkVisitor, /*tp_methods*/
3180
0, /*tp_dictoffset*/
3181
__pyx_pf_4h5py_3h5l_12_LinkVisitor___init__, /*tp_init*/
3183
__pyx_tp_new_4h5py_3h5l__LinkVisitor, /*tp_new*/
3189
0, /*tp_subclasses*/
3192
#if PY_VERSION_HEX >= 0x02060000
3193
0, /*tp_version_tag*/
365
3197
static struct PyMethodDef __pyx_methods[] = {