Skip to content

Commit

Permalink
Ignore unwanted module functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobvosmaer committed Apr 12, 2024
1 parent 2e0a425 commit 998ac5b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 100 deletions.
3 changes: 3 additions & 0 deletions ext/taglib_flac_picture/taglib_flac_picture.i
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
%ignore TagLib::FLAC::MetadataBlock::render; // Only useful internally.
%include <taglib/flacmetadatablock.h>

%ignore TagLib::Utils::pictureTypeToString;
%ignore TagLib::Utils::pictureTypeFromString;
%include <taglib/tpicturetype.h>

%ignore TagLib::FLAC::Picture::render; // Only useful internally.
%include <taglib/flacpicture.h>
50 changes: 0 additions & 50 deletions ext/taglib_flac_picture/taglib_flac_picture_wrap.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2242,54 +2242,6 @@ _wrap_MetadataBlock_code(int argc, VALUE *argv, VALUE self) {
}


SWIGINTERN VALUE
_wrap_picture_type_to_string(int argc, VALUE *argv, VALUE self) {
int arg1 ;
int val1 ;
int ecode1 = 0 ;
TagLib::String result;
VALUE vresult = Qnil;

if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
ecode1 = SWIG_AsVal_int(argv[0], &val1);
if (!SWIG_IsOK(ecode1)) {
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","TagLib::Utils::pictureTypeToString", 1, argv[0] ));
}
arg1 = static_cast< int >(val1);
result = TagLib::Utils::pictureTypeToString(arg1);
{
vresult = taglib_string_to_ruby_string(result);
}
return vresult;
fail:
return Qnil;
}


SWIGINTERN VALUE
_wrap_picture_type_from_string(int argc, VALUE *argv, VALUE self) {
TagLib::String *arg1 = 0 ;
TagLib::String tmp1 ;
int result;
VALUE vresult = Qnil;

if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
tmp1 = ruby_string_to_taglib_string(argv[0]);
arg1 = &tmp1;
}
result = (int)TagLib::Utils::pictureTypeFromString((TagLib::String const &)*arg1);
vresult = SWIG_From_int(static_cast< int >(result));
return vresult;
fail:
return Qnil;
}


static swig_class SwigClassPicture;

SWIGINTERN VALUE
Expand Down Expand Up @@ -3231,8 +3183,6 @@ SWIGEXPORT void Init_taglib_flac_picture(void) {
SwigClassMetadataBlock.mark = 0;
SwigClassMetadataBlock.destroy = (void (*)(void *)) free_TagLib_FLAC_MetadataBlock;
SwigClassMetadataBlock.trackObjects = 1;
rb_define_module_function(mFLAC, "picture_type_to_string", VALUEFUNC(_wrap_picture_type_to_string), -1);
rb_define_module_function(mFLAC, "picture_type_from_string", VALUEFUNC(_wrap_picture_type_from_string), -1);

SwigClassPicture.klass = rb_define_class_under(mFLAC, "Picture", ((swig_class *) SWIGTYPE_p_TagLib__FLAC__MetadataBlock->clientdata)->klass);
SWIG_TypeClientData(SWIGTYPE_p_TagLib__FLAC__Picture, (void *) &SwigClassPicture);
Expand Down
3 changes: 3 additions & 0 deletions ext/taglib_id3v2/taglib_id3v2.i
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ VALUE taglib_id3v2_framelist_to_ruby_array(TagLib::ID3v2::FrameList *list) {

%include "relativevolumeframe.i"

%ignore TagLib::Utils::pictureTypeToString;
%ignore TagLib::Utils::pictureTypeFromString;
%include <taglib/tpicturetype.h>

%include <taglib/attachedpictureframe.h>

// Ignore the unified property interface.
Expand Down
50 changes: 0 additions & 50 deletions ext/taglib_id3v2/taglib_id3v2_wrap.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5310,54 +5310,6 @@ free_TagLib_ID3v2_RelativeVolumeFrame_PeakVolume(void *self) {
delete arg1;
}

SWIGINTERN VALUE
_wrap_picture_type_to_string(int argc, VALUE *argv, VALUE self) {
int arg1 ;
int val1 ;
int ecode1 = 0 ;
TagLib::String result;
VALUE vresult = Qnil;

if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
ecode1 = SWIG_AsVal_int(argv[0], &val1);
if (!SWIG_IsOK(ecode1)) {
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","TagLib::Utils::pictureTypeToString", 1, argv[0] ));
}
arg1 = static_cast< int >(val1);
result = TagLib::Utils::pictureTypeToString(arg1);
{
vresult = taglib_string_to_ruby_string(result);
}
return vresult;
fail:
return Qnil;
}


SWIGINTERN VALUE
_wrap_picture_type_from_string(int argc, VALUE *argv, VALUE self) {
TagLib::String *arg1 = 0 ;
TagLib::String tmp1 ;
int result;
VALUE vresult = Qnil;

if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
tmp1 = ruby_string_to_taglib_string(argv[0]);
arg1 = &tmp1;
}
result = (int)TagLib::Utils::pictureTypeFromString((TagLib::String const &)*arg1);
vresult = SWIG_From_int(static_cast< int >(result));
return vresult;
fail:
return Qnil;
}


static swig_class SwigClassAttachedPictureFrame;

SWIGINTERN VALUE
Expand Down Expand Up @@ -11394,8 +11346,6 @@ SWIGEXPORT void Init_taglib_id3v2(void) {
SwigClassPeakVolume.mark = 0;
SwigClassPeakVolume.destroy = (void (*)(void *)) free_TagLib_ID3v2_RelativeVolumeFrame_PeakVolume;
SwigClassPeakVolume.trackObjects = 1;
rb_define_module_function(mID3v2, "picture_type_to_string", VALUEFUNC(_wrap_picture_type_to_string), -1);
rb_define_module_function(mID3v2, "picture_type_from_string", VALUEFUNC(_wrap_picture_type_from_string), -1);

SwigClassAttachedPictureFrame.klass = rb_define_class_under(mID3v2, "AttachedPictureFrame", ((swig_class *) SWIGTYPE_p_TagLib__ID3v2__Frame->clientdata)->klass);
SWIG_TypeClientData(SWIGTYPE_p_TagLib__ID3v2__AttachedPictureFrame, (void *) &SwigClassAttachedPictureFrame);
Expand Down

0 comments on commit 998ac5b

Please sign in to comment.