Skip to content

Commit eb80ee6

Browse files
authored
Merge pull request #146 from robinst/jv-mp4-const-iterator
TagLib 2: ignore MP4 const iterator begin and end
2 parents 989c619 + 07d8946 commit eb80ee6

File tree

2 files changed

+8
-61
lines changed

2 files changed

+8
-61
lines changed

ext/taglib_mp4/taglib_mp4.i

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ namespace TagLib {
7575

7676
%ignore TagLib::Map<TagLib::String, TagLib::MP4::Item>::begin;
7777
%ignore TagLib::Map<TagLib::String, TagLib::MP4::Item>::end;
78+
%ignore TagLib::Map<TagLib::String, TagLib::MP4::Item>::cbegin;
79+
%ignore TagLib::Map<TagLib::String, TagLib::MP4::Item>::cend;
7880
%ignore TagLib::Map<TagLib::String, TagLib::MP4::Item>::insert;
7981
%ignore TagLib::Map<TagLib::String, TagLib::MP4::Item>::find;
8082
// We will create a safe version of these below in an %extend

ext/taglib_mp4/taglib_mp4_wrap.cxx

Lines changed: 6 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1868,13 +1868,12 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
18681868
#define SWIGTYPE_p_TagLib__Tag swig_types[12]
18691869
#define SWIGTYPE_p_char swig_types[13]
18701870
#define SWIGTYPE_p_long_long swig_types[14]
1871-
#define SWIGTYPE_p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator swig_types[15]
1872-
#define SWIGTYPE_p_unsigned_char swig_types[16]
1873-
#define SWIGTYPE_p_unsigned_int swig_types[17]
1874-
#define SWIGTYPE_p_unsigned_long swig_types[18]
1875-
#define SWIGTYPE_p_wchar_t swig_types[19]
1876-
static swig_type_info *swig_types[21];
1877-
static swig_module_info swig_module = {swig_types, 20, 0, 0, 0, 0};
1871+
#define SWIGTYPE_p_unsigned_char swig_types[15]
1872+
#define SWIGTYPE_p_unsigned_int swig_types[16]
1873+
#define SWIGTYPE_p_unsigned_long swig_types[17]
1874+
#define SWIGTYPE_p_wchar_t swig_types[18]
1875+
static swig_type_info *swig_types[20];
1876+
static swig_module_info swig_module = {swig_types, 19, 0, 0, 0, 0};
18781877
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
18791878
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
18801879

@@ -4113,54 +4112,6 @@ free_TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg_(void *self) {
41134112
delete arg1;
41144113
}
41154114

4116-
SWIGINTERN VALUE
4117-
_wrap_ItemMap_cbegin(int argc, VALUE *argv, VALUE self) {
4118-
TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ;
4119-
void *argp1 = 0 ;
4120-
int res1 = 0 ;
4121-
SwigValueWrapper< std::map< TagLib::String,TagLib::MP4::Item >::const_iterator > result;
4122-
VALUE vresult = Qnil;
4123-
4124-
if ((argc < 0) || (argc > 0)) {
4125-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4126-
}
4127-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 );
4128-
if (!SWIG_IsOK(res1)) {
4129-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const *","cbegin", 1, self ));
4130-
}
4131-
arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1);
4132-
result = ((TagLib::Map< TagLib::String,TagLib::MP4::Item > const *)arg1)->cbegin();
4133-
vresult = SWIG_NewPointerObj((new TagLib::Map< TagLib::String,TagLib::MP4::Item >::ConstIterator(result)), SWIGTYPE_p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator, SWIG_POINTER_OWN | 0 );
4134-
return vresult;
4135-
fail:
4136-
return Qnil;
4137-
}
4138-
4139-
4140-
SWIGINTERN VALUE
4141-
_wrap_ItemMap_cend(int argc, VALUE *argv, VALUE self) {
4142-
TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ;
4143-
void *argp1 = 0 ;
4144-
int res1 = 0 ;
4145-
SwigValueWrapper< std::map< TagLib::String,TagLib::MP4::Item >::const_iterator > result;
4146-
VALUE vresult = Qnil;
4147-
4148-
if ((argc < 0) || (argc > 0)) {
4149-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4150-
}
4151-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 );
4152-
if (!SWIG_IsOK(res1)) {
4153-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const *","cend", 1, self ));
4154-
}
4155-
arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1);
4156-
result = ((TagLib::Map< TagLib::String,TagLib::MP4::Item > const *)arg1)->cend();
4157-
vresult = SWIG_NewPointerObj((new TagLib::Map< TagLib::String,TagLib::MP4::Item >::ConstIterator(result)), SWIGTYPE_p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator, SWIG_POINTER_OWN | 0 );
4158-
return vresult;
4159-
fail:
4160-
return Qnil;
4161-
}
4162-
4163-
41644115
/*
41654116
Document-method: TagLib::MP4::ItemMap.size
41664117
@@ -5892,7 +5843,6 @@ static swig_type_info _swigt__p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t
58925843
static swig_type_info _swigt__p_TagLib__Tag = {"_p_TagLib__Tag", "TagLib::Tag *", 0, 0, (void*)0, 0};
58935844
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
58945845
static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0};
5895-
static swig_type_info _swigt__p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator = {"_p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator", "TagLib::Map< TagLib::String,TagLib::MP4::Item >::ConstIterator *|std::map< TagLib::String,TagLib::MP4::Item >::const_iterator *", 0, 0, (void*)0, 0};
58965846
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0};
58975847
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0};
58985848
static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0};
@@ -5914,7 +5864,6 @@ static swig_type_info *swig_type_initial[] = {
59145864
&_swigt__p_TagLib__Tag,
59155865
&_swigt__p_char,
59165866
&_swigt__p_long_long,
5917-
&_swigt__p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator,
59185867
&_swigt__p_unsigned_char,
59195868
&_swigt__p_unsigned_int,
59205869
&_swigt__p_unsigned_long,
@@ -5936,7 +5885,6 @@ static swig_cast_info _swigc__p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t[
59365885
static swig_cast_info _swigc__p_TagLib__Tag[] = { {&_swigt__p_TagLib__Tag, 0, 0, 0}, {&_swigt__p_TagLib__MP4__Tag, _p_TagLib__MP4__TagTo_p_TagLib__Tag, 0, 0},{0, 0, 0, 0}};
59375886
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
59385887
static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
5939-
static swig_cast_info _swigc__p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator[] = { {&_swigt__p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator, 0, 0, 0},{0, 0, 0, 0}};
59405888
static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
59415889
static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
59425890
static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
@@ -5958,7 +5906,6 @@ static swig_cast_info *swig_cast_initial[] = {
59585906
_swigc__p_TagLib__Tag,
59595907
_swigc__p_char,
59605908
_swigc__p_long_long,
5961-
_swigc__p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator,
59625909
_swigc__p_unsigned_char,
59635910
_swigc__p_unsigned_int,
59645911
_swigc__p_unsigned_long,
@@ -6299,8 +6246,6 @@ SWIGEXPORT void Init_taglib_mp4(void) {
62996246
SWIG_TypeClientData(SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, (void *) &SwigClassItemMap);
63006247
rb_define_alloc_func(SwigClassItemMap.klass, _wrap_ItemMap_allocate);
63016248
rb_define_method(SwigClassItemMap.klass, "initialize", VALUEFUNC(_wrap_new_ItemMap), -1);
6302-
rb_define_method(SwigClassItemMap.klass, "cbegin", VALUEFUNC(_wrap_ItemMap_cbegin), -1);
6303-
rb_define_method(SwigClassItemMap.klass, "cend", VALUEFUNC(_wrap_ItemMap_cend), -1);
63046249
rb_define_method(SwigClassItemMap.klass, "size", VALUEFUNC(_wrap_ItemMap_size), -1);
63056250
rb_define_method(SwigClassItemMap.klass, "empty?", VALUEFUNC(_wrap_ItemMap_emptyq___), -1);
63066251
rb_define_method(SwigClassItemMap.klass, "contains", VALUEFUNC(_wrap_ItemMap_contains), -1);

0 commit comments

Comments
 (0)