id3lib-ruby 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +10 -0
- data/INSTALL +33 -15
- data/README +1 -3
- data/Rakefile +83 -32
- data/TODO +4 -0
- data/ext/{Rakefile → id3lib_api/Rakefile} +1 -1
- data/ext/id3lib_api/extconf.rb +27 -0
- data/ext/{id3lib_api.i → id3lib_api/id3lib_api.i} +10 -8
- data/ext/{id3lib_api_wrap.cxx → id3lib_api/id3lib_api_wrap.cxx} +594 -287
- data/lib/id3lib.rb +24 -4
- data/test/data/sample.mp3 +0 -0
- data/test/data/unicode.mp3 +0 -0
- data/test/test_reading.rb +17 -0
- data/test/test_unicode.rb +10 -0
- data/test/test_writing.rb +1 -1
- metadata +145 -45
- data/ext/extconf.rb +0 -20
- data/ext/generate_info.rb +0 -127
    
        data/CHANGES
    CHANGED
    
    | @@ -1,5 +1,15 @@ | |
| 1 1 | 
             
            = id3lib-ruby changes
         | 
| 2 2 |  | 
| 3 | 
            +
            === 0.6.0 (2010-05-16)
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            * Added convenience method user_frame_text to Tag for finding a
         | 
| 6 | 
            +
              TXXX frame given a description (e.g. "MusicBrainz Album Id")
         | 
| 7 | 
            +
              (RubyForge feature request 24381)
         | 
| 8 | 
            +
            * Fixed compilation problem on Ruby 1.9 (GitHub issue 1)
         | 
| 9 | 
            +
            * Don't check for ID3Tag_New in extconf.rb (RubyForge bug 27589)
         | 
| 10 | 
            +
            * Updated to SWIG 1.3.40
         | 
| 11 | 
            +
            * Use rake-compiler for cross-compiling the extension
         | 
| 12 | 
            +
             | 
| 3 13 | 
             
            === 0.5.0 (2006-12-16)
         | 
| 4 14 |  | 
| 5 15 | 
             
            * Warn when encountering nil field instead of raising exception (bug 6446).
         | 
    
        data/INSTALL
    CHANGED
    
    | @@ -16,34 +16,36 @@ For other systems, there is a RubyGems package or a compressed archive. | |
| 16 16 | 
             
            Before installing id3lib-ruby, you need to install the underlying id3lib
         | 
| 17 17 | 
             
            library and, depending on your system, set CONFIGURE_ARGS.
         | 
| 18 18 |  | 
| 19 | 
            -
            ==== Debian
         | 
| 19 | 
            +
            ==== Ubuntu and Debian Linux
         | 
| 20 20 |  | 
| 21 | 
            -
            Install libid3-dev and be sure to have  | 
| 21 | 
            +
            Install libid3-dev and be sure to have ruby-dev installed, otherwise you
         | 
| 22 22 | 
             
            won't be able to build Ruby extensions.
         | 
| 23 23 |  | 
| 24 | 
            -
              sudo aptitude install libid3-dev
         | 
| 24 | 
            +
              sudo aptitude install libid3-dev ruby-dev g++
         | 
| 25 25 |  | 
| 26 | 
            -
            ====  | 
| 26 | 
            +
            ==== Fedora Linux
         | 
| 27 27 |  | 
| 28 | 
            -
              sudo  | 
| 28 | 
            +
              sudo yum install id3lib-devel ruby-devel gcc-c++
         | 
| 29 29 |  | 
| 30 | 
            -
            ====  | 
| 30 | 
            +
            ==== Gentoo Linux
         | 
| 31 31 |  | 
| 32 | 
            -
             | 
| 32 | 
            +
              sudo emerge -n id3lib
         | 
| 33 33 |  | 
| 34 | 
            -
             | 
| 34 | 
            +
            ==== Mac OS X
         | 
| 35 35 |  | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 36 | 
            +
            If you use the Ruby distribution provided by Mac OS X, you need to have Apple's
         | 
| 37 | 
            +
            Xcode installed in order to be able to build extensions.
         | 
| 38 38 |  | 
| 39 | 
            -
             | 
| 39 | 
            +
            Now, either install id3lib through MacPorts or Fink, or by downloading and
         | 
| 40 | 
            +
            compiling manually.
         | 
| 40 41 |  | 
| 41 | 
            -
             | 
| 42 | 
            +
            ===== MacPorts
         | 
| 42 43 |  | 
| 43 | 
            -
             | 
| 44 | 
            -
            have to set CONFIGURE_ARGS:
         | 
| 44 | 
            +
              sudo port install id3lib
         | 
| 45 45 |  | 
| 46 | 
            -
             | 
| 46 | 
            +
            ===== Fink
         | 
| 47 | 
            +
             | 
| 48 | 
            +
              sudo apt-get install id3lib4-dev
         | 
| 47 49 |  | 
| 48 50 | 
             
            === Installing id3lib-ruby
         | 
| 49 51 |  | 
| @@ -55,3 +57,19 @@ following and select the newest version marked "ruby": | |
| 55 57 | 
             
            Or if you install from the archive, unpack it and do:
         | 
| 56 58 |  | 
| 57 59 | 
             
              sudo ruby setup.rb
         | 
| 60 | 
            +
             | 
| 61 | 
            +
            ==== Mac OS X
         | 
| 62 | 
            +
             | 
| 63 | 
            +
            On Mac OS X 10.5 and later, Ruby tries to compile the extension for multiple
         | 
| 64 | 
            +
            architectures (universal build) and fails. You have to specify the right
         | 
| 65 | 
            +
            architecture manually. For 64 bit Intel processors, do:
         | 
| 66 | 
            +
             | 
| 67 | 
            +
              sudo env ARCHFLAGS="-arch x86_64" gem install id3lib-ruby
         | 
| 68 | 
            +
             | 
| 69 | 
            +
            For 32 bit Intel processors:
         | 
| 70 | 
            +
             | 
| 71 | 
            +
              sudo env ARCHFLAGS="-arch i386" gem install id3lib-ruby
         | 
| 72 | 
            +
             | 
| 73 | 
            +
            And for PPC processors:
         | 
| 74 | 
            +
             | 
| 75 | 
            +
              sudo env ARCHFLAGS="-arch ppc" gem install id3lib-ruby
         | 
    
        data/README
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            = id3lib-ruby
         | 
| 2 2 |  | 
| 3 3 | 
             
            id3lib-ruby provides a Ruby interface to the id3lib C++ library for easily
         | 
| 4 | 
            -
            editing ID3 tags (v1 and v2)  | 
| 4 | 
            +
            editing ID3 tags (v1 and v2) of MP3 audio files.
         | 
| 5 5 |  | 
| 6 6 | 
             
            The class documentation starts at ID3Lib::Tag.
         | 
| 7 7 |  | 
| @@ -16,8 +16,6 @@ The class documentation starts at ID3Lib::Tag. | |
| 16 16 | 
             
            * UTF-16 support (warning: id3lib writes broken UTF-16 frames)
         | 
| 17 17 | 
             
            * Windows binary gem available
         | 
| 18 18 |  | 
| 19 | 
            -
            See TODO for planned features.
         | 
| 20 | 
            -
             | 
| 21 19 | 
             
            The CHANGES file contains a list of changes between versions.
         | 
| 22 20 |  | 
| 23 21 |  | 
    
        data/Rakefile
    CHANGED
    
    | @@ -6,8 +6,15 @@ rescue Exception | |
| 6 6 | 
             
              nil
         | 
| 7 7 | 
             
            end
         | 
| 8 8 |  | 
| 9 | 
            +
            begin
         | 
| 10 | 
            +
              require 'rake/extensiontask'
         | 
| 11 | 
            +
            rescue LoadError
         | 
| 12 | 
            +
              # Compiling of extension will have to be done manually.
         | 
| 13 | 
            +
            end
         | 
| 14 | 
            +
             | 
| 9 15 | 
             
            require 'rake/testtask'
         | 
| 10 16 | 
             
            require 'rake/rdoctask'
         | 
| 17 | 
            +
            require 'open-uri'
         | 
| 11 18 |  | 
| 12 19 |  | 
| 13 20 | 
             
            FILES_COMMON = FileList[
         | 
| @@ -24,28 +31,13 @@ FILES_DOC = FileList[ | |
| 24 31 | 
             
            ]
         | 
| 25 32 |  | 
| 26 33 | 
             
            FILES_EXT = FileList[
         | 
| 27 | 
            -
              'ext/*.rb',
         | 
| 28 | 
            -
              'ext | 
| 29 | 
            -
              'ext/*.i',
         | 
| 30 | 
            -
              'ext/Rakefile'
         | 
| 34 | 
            +
              'ext/id3lib_api/*.{rb,cxx,i}',
         | 
| 35 | 
            +
              'ext/id3lib_api/Rakefile'
         | 
| 31 36 | 
             
            ]
         | 
| 32 37 |  | 
| 33 38 |  | 
| 34 | 
            -
            desc "Build extension."
         | 
| 35 | 
            -
            task :ext do
         | 
| 36 | 
            -
              sh "cd ext && rake"
         | 
| 37 | 
            -
              puts "(end)"
         | 
| 38 | 
            -
            end
         | 
| 39 | 
            -
             | 
| 40 | 
            -
            desc "Build mswin32 extension."
         | 
| 41 | 
            -
            task :ext_mswin32 do
         | 
| 42 | 
            -
              sh 'cd ext/mswin32; rake'
         | 
| 43 | 
            -
              puts "(end)"
         | 
| 44 | 
            -
            end
         | 
| 45 | 
            -
             | 
| 46 | 
            -
             | 
| 47 39 | 
             
            Rake::TestTask.new do |t|
         | 
| 48 | 
            -
              t.libs = ['lib', 'ext']
         | 
| 40 | 
            +
              t.libs = ['lib', 'ext/id3lib_api']
         | 
| 49 41 | 
             
              t.test_files = FileList['test/test_*.rb']
         | 
| 50 42 | 
             
              t.verbose = true
         | 
| 51 43 | 
             
            end
         | 
| @@ -65,16 +57,18 @@ task :doc => [:rdoc] | |
| 65 57 |  | 
| 66 58 |  | 
| 67 59 | 
             
            if defined? Gem
         | 
| 60 | 
            +
             | 
| 68 61 | 
             
              spec = Gem::Specification.new do |s|
         | 
| 69 62 | 
             
                s.name        = 'id3lib-ruby'
         | 
| 70 63 | 
             
                s.version     = File.read('lib/id3lib.rb')[/VERSION = '(.*)'/, 1]
         | 
| 71 64 | 
             
                s.summary     =
         | 
| 72 65 | 
             
                  'id3lib-ruby provides a Ruby interface to the id3lib C++ library for ' +
         | 
| 73 | 
            -
                  'easily editing ID3 tags (v1 and v2)  | 
| 66 | 
            +
                  'easily editing ID3 tags (v1 and v2) of MP3 audio files.'
         | 
| 67 | 
            +
                s.description = File.read('README')
         | 
| 74 68 | 
             
                s.requirements << 'id3lib C++ library'
         | 
| 75 69 | 
             
                s.files       = FILES_COMMON + FILES_EXT
         | 
| 76 | 
            -
                s.extensions  = ['ext/extconf.rb']
         | 
| 77 70 | 
             
                s.test_files  = FileList['test/test_*.rb']
         | 
| 71 | 
            +
                s.extensions  << 'ext/id3lib_api/extconf.rb'
         | 
| 78 72 | 
             
                s.has_rdoc    = true
         | 
| 79 73 | 
             
                s.extra_rdoc_files = FILES_DOC
         | 
| 80 74 | 
             
                s.rdoc_options = RDOC_OPTS
         | 
| @@ -89,18 +83,75 @@ if defined? Gem | |
| 89 83 | 
             
                pkg.need_zip = true
         | 
| 90 84 | 
             
              end
         | 
| 91 85 |  | 
| 92 | 
            -
               | 
| 93 | 
            -
             | 
| 94 | 
            -
             | 
| 95 | 
            -
             | 
| 96 | 
            -
             | 
| 97 | 
            -
             | 
| 98 | 
            -
             | 
| 99 | 
            -
             | 
| 100 | 
            -
                 | 
| 101 | 
            -
                 | 
| 102 | 
            -
             | 
| 103 | 
            -
             | 
| 86 | 
            +
              if defined? Rake::ExtensionTask
         | 
| 87 | 
            +
             | 
| 88 | 
            +
                host = 'i586-mingw32msvc'
         | 
| 89 | 
            +
                plat = 'x86-mswin32-60'
         | 
| 90 | 
            +
                tmp = "#{Dir.pwd}/tmp/#{plat}"
         | 
| 91 | 
            +
                cflags = "'-Os -DID3LIB_LINKOPTION=1'"
         | 
| 92 | 
            +
                config_options = ["--with-opt-dir=#{tmp}", "--with-cflags=#{cflags}"]
         | 
| 93 | 
            +
                id3lib_version = '3.8.3'
         | 
| 94 | 
            +
                id3lib = "id3lib-#{id3lib_version}"
         | 
| 95 | 
            +
                id3lib_url = "http://downloads.sourceforge.net/project/" +
         | 
| 96 | 
            +
                             "id3lib/id3lib/#{id3lib_version}/#{id3lib}.tar.gz"
         | 
| 97 | 
            +
                patches = FileList["#{Dir.pwd}/ext/mswin32/patches/*patch"]
         | 
| 98 | 
            +
             | 
| 99 | 
            +
                Rake::ExtensionTask.new('id3lib_api', spec) do |ext|
         | 
| 100 | 
            +
                  ext.cross_compile = true
         | 
| 101 | 
            +
                  ext.cross_platform = plat
         | 
| 102 | 
            +
                  ext.cross_config_options.concat(config_options)
         | 
| 103 | 
            +
                  if RUBY_PLATFORM =~ /mingw/
         | 
| 104 | 
            +
                    ext.config_options.concat(config_options)
         | 
| 105 | 
            +
                  end
         | 
| 106 | 
            +
                end
         | 
| 107 | 
            +
             | 
| 108 | 
            +
                task :cross => [:id3lib] do
         | 
| 109 | 
            +
                  # Mkmf just uses "g++" as C++ compiler, despite what's in rbconfig.rb.
         | 
| 110 | 
            +
                  # So, we need to hack around it by setting CXX to the cross compiler.
         | 
| 111 | 
            +
                  ENV["CXX"] = "#{host}-g++"
         | 
| 112 | 
            +
                end
         | 
| 113 | 
            +
             | 
| 114 | 
            +
                # Linking to the DLLs provided by id3lib.sf.net doesn't seem to work on
         | 
| 115 | 
            +
                # Windows, so we download and compile it automatically (the same as when
         | 
| 116 | 
            +
                # cross compiling).
         | 
| 117 | 
            +
                if RUBY_PLATFORM =~ /mingw/
         | 
| 118 | 
            +
                  Rake::Task[:compile].prerequisites.unshift(:id3lib)
         | 
| 119 | 
            +
                end
         | 
| 120 | 
            +
             | 
| 121 | 
            +
                task :id3lib => ["#{tmp}/lib/libid3.a"]
         | 
| 122 | 
            +
             | 
| 123 | 
            +
                file "#{tmp}/lib/libid3.a" => ["#{tmp}/#{id3lib}/config.log"] do
         | 
| 124 | 
            +
                  chdir "#{tmp}/#{id3lib}" do
         | 
| 125 | 
            +
                    env = "CFLAGS=#{cflags} CXXFLAGS=#{cflags}"
         | 
| 126 | 
            +
                    sh "sh configure --host=#{host} --prefix=#{tmp} #{env}"
         | 
| 127 | 
            +
                    sh "make"
         | 
| 128 | 
            +
                    sh "make install"
         | 
| 129 | 
            +
                  end
         | 
| 130 | 
            +
                end
         | 
| 131 | 
            +
             | 
| 132 | 
            +
                file "#{tmp}/#{id3lib}/config.log" => ["#{tmp}/#{id3lib}.tar.gz"] do
         | 
| 133 | 
            +
                  chdir tmp do
         | 
| 134 | 
            +
                    sh "tar xzf #{id3lib}.tar.gz"
         | 
| 135 | 
            +
                    patches.each do |patch|
         | 
| 136 | 
            +
                      sh "patch -p0 < #{patch}"
         | 
| 137 | 
            +
                    end
         | 
| 138 | 
            +
                  end
         | 
| 139 | 
            +
                end
         | 
| 140 | 
            +
             | 
| 141 | 
            +
                file "#{tmp}/#{id3lib}.tar.gz" => [tmp] do |t|
         | 
| 142 | 
            +
                  puts "Downloading #{id3lib_url}"
         | 
| 143 | 
            +
                  data = open(id3lib_url).read()
         | 
| 144 | 
            +
                  break if data == nil
         | 
| 145 | 
            +
                  chdir tmp do
         | 
| 146 | 
            +
                    open(File.basename(t.name), 'wb') do |f|
         | 
| 147 | 
            +
                      f.write(data)
         | 
| 148 | 
            +
                    end
         | 
| 149 | 
            +
                  end
         | 
| 150 | 
            +
                end
         | 
| 151 | 
            +
             | 
| 152 | 
            +
                directory tmp
         | 
| 153 | 
            +
             | 
| 154 | 
            +
              end  # defined? Rake::ExtensionTask
         | 
| 104 155 |  | 
| 105 156 | 
             
            end  # defined? Gem
         | 
| 106 157 |  | 
    
        data/TODO
    CHANGED
    
    | @@ -1,5 +1,9 @@ | |
| 1 1 | 
             
            = id3lib-ruby to-do list
         | 
| 2 2 |  | 
| 3 | 
            +
            The underlying C++ library id3lib is no longer maintained and outdated (no
         | 
| 4 | 
            +
            support for ID3v2.4). Therefore id3lib-ruby is no longer actively developed.
         | 
| 5 | 
            +
            Here's the old to-do list anyway:
         | 
| 6 | 
            +
             | 
| 3 7 | 
             
            * Evaluate an object-oriented way to handle frames, instead of with hashes.
         | 
| 4 8 | 
             
            * Make the update! method intelligent, because the call of strip each time
         | 
| 5 9 | 
             
              is very slow and stupid.
         | 
| @@ -13,7 +13,7 @@ file 'id3lib_api.bundle' => ['id3lib_api_wrap.cxx', 'Makefile'] do | |
| 13 13 | 
             
            end
         | 
| 14 14 |  | 
| 15 15 | 
             
            file 'id3lib_api_wrap.cxx' => ['id3lib_api.i'] do
         | 
| 16 | 
            -
              sh "swig -c++ -ruby - | 
| 16 | 
            +
              sh "swig -c++ -ruby -initname id3lib_api id3lib_api.i"
         | 
| 17 17 | 
             
            end
         | 
| 18 18 |  | 
| 19 19 | 
             
            file 'Makefile' do
         | 
| @@ -0,0 +1,27 @@ | |
| 1 | 
            +
            # Default opt dirs to help mkmf find id3lib
         | 
| 2 | 
            +
            configure_args = "--with-opt-dir=/usr/local:/opt/local:/sw "
         | 
| 3 | 
            +
            ENV['CONFIGURE_ARGS'] = configure_args + ENV.fetch('CONFIGURE_ARGS', "")
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            require 'mkmf'
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            def error msg
         | 
| 8 | 
            +
              message msg + "\n"
         | 
| 9 | 
            +
              abort
         | 
| 10 | 
            +
            end
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            unless have_library('stdc++')
         | 
| 13 | 
            +
              error "You must have libstdc++ installed."
         | 
| 14 | 
            +
            end
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            unless have_library('z')
         | 
| 17 | 
            +
              error "You must have zlib installed."
         | 
| 18 | 
            +
            end
         | 
| 19 | 
            +
             | 
| 20 | 
            +
            # This is only necessary for linking on Windows (don't ask me why).
         | 
| 21 | 
            +
            have_library('iconv')
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            unless have_header('id3.h') and have_library('id3')
         | 
| 24 | 
            +
              error "You must have id3lib installed in order to use id3lib-ruby."
         | 
| 25 | 
            +
            end
         | 
| 26 | 
            +
             | 
| 27 | 
            +
            create_makefile('id3lib_api')
         | 
| @@ -11,6 +11,8 @@ enum ID3_TextEnc; | |
| 11 11 | 
             
            enum ID3_TagType;
         | 
| 12 12 |  | 
| 13 13 | 
             
            typedef unsigned int flags_t;
         | 
| 14 | 
            +
            typedef unsigned long uint32;
         | 
| 15 | 
            +
            typedef unsigned char uchar;
         | 
| 14 16 |  | 
| 15 17 |  | 
| 16 18 | 
             
            %rename (Tag) ID3_Tag;
         | 
| @@ -99,7 +101,7 @@ public: | |
| 99 101 | 
             
            	ID3_TextEnc GetEncoding() const;
         | 
| 100 102 |  | 
| 101 103 | 
             
            	%rename (get_integer) Get;
         | 
| 102 | 
            -
            	 | 
| 104 | 
            +
            	uint32 Get() const;
         | 
| 103 105 |  | 
| 104 106 | 
             
            	%rename (get_ascii) GetRawText;
         | 
| 105 107 | 
             
            	const char * GetRawText() const;
         | 
| @@ -115,7 +117,7 @@ public: | |
| 115 117 | 
             
            		{
         | 
| 116 118 | 
             
            			const char *str = (const char *)self->GetRawUnicodeText();
         | 
| 117 119 | 
             
            			if (str == NULL) return rb_str_new("", 0);
         | 
| 118 | 
            -
            			 | 
| 120 | 
            +
            			size_t size = self->Size();
         | 
| 119 121 | 
             
            			if (size >= 2 && str[size-2] == '\0' && str[size-1] == '\0') {
         | 
| 120 122 | 
             
            				// id3lib seems to be inconsistent: the Unicode strings
         | 
| 121 123 | 
             
            				// don't always end in 0x0000. If they do, we don't want these
         | 
| @@ -131,8 +133,8 @@ public: | |
| 131 133 | 
             
            	%rename (set_encoding) SetEncoding(ID3_TextEnc);
         | 
| 132 134 | 
             
            	bool SetEncoding(ID3_TextEnc enc);
         | 
| 133 135 |  | 
| 134 | 
            -
            	%rename (set_integer) Set( | 
| 135 | 
            -
            	void Set( | 
| 136 | 
            +
            	%rename (set_integer) Set(uint32);
         | 
| 137 | 
            +
            	void Set(uint32 i);
         | 
| 136 138 |  | 
| 137 139 | 
             
            	%rename (set_ascii) Set(const char *);
         | 
| 138 140 | 
             
            	size_t Set(const char *string);
         | 
| @@ -142,8 +144,8 @@ public: | |
| 142 144 | 
             
            		size_t set_binary(VALUE data)
         | 
| 143 145 | 
             
            		{
         | 
| 144 146 | 
             
            			StringValue(data);
         | 
| 145 | 
            -
            			return self->Set((const  | 
| 146 | 
            -
            			                  | 
| 147 | 
            +
            			return self->Set((const uchar *)RSTRING_PTR(data),
         | 
| 148 | 
            +
            			                 RSTRING_LEN(data));
         | 
| 147 149 | 
             
            		}
         | 
| 148 150 |  | 
| 149 151 | 
             
            		size_t set_unicode(VALUE data)
         | 
| @@ -153,14 +155,14 @@ public: | |
| 153 155 | 
             
            			long len;
         | 
| 154 156 | 
             
            			unicode_t *unicode;
         | 
| 155 157 |  | 
| 156 | 
            -
            			len =  | 
| 158 | 
            +
            			len = RSTRING_LEN(data) / sizeof(unicode_t);
         | 
| 157 159 | 
             
            			unicode = (unicode_t *)malloc(sizeof(unicode_t) * (len+1));
         | 
| 158 160 |  | 
| 159 161 | 
             
            			if (unicode == NULL) {
         | 
| 160 162 | 
             
            				rb_raise(rb_eNoMemError, "Couldn't allocate memory for Unicode data.");
         | 
| 161 163 | 
             
            			}
         | 
| 162 164 |  | 
| 163 | 
            -
            			memcpy(unicode,  | 
| 165 | 
            +
            			memcpy(unicode, RSTRING_PTR(data), sizeof(unicode_t) * len);
         | 
| 164 166 | 
             
            			// Unicode strings need 0x0000 at the end.
         | 
| 165 167 | 
             
            			unicode[len] = 0;
         | 
| 166 168 | 
             
            			size_t retval = self->Set(unicode);
         | 
| @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            /* ----------------------------------------------------------------------------
         | 
| 2 2 | 
             
             * This file was automatically generated by SWIG (http://www.swig.org).
         | 
| 3 | 
            -
             * Version 1.3. | 
| 3 | 
            +
             * Version 1.3.40
         | 
| 4 4 | 
             
             * 
         | 
| 5 5 | 
             
             * This file is not intended to be easily readable and contains a number of 
         | 
| 6 6 | 
             
             * coding conventions designed to improve portability and efficiency. Do not make
         | 
| @@ -10,20 +10,28 @@ | |
| 10 10 |  | 
| 11 11 | 
             
            #define SWIGRUBY
         | 
| 12 12 |  | 
| 13 | 
            +
             | 
| 13 14 | 
             
            #ifdef __cplusplus
         | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 15 | 
            +
            /* SwigValueWrapper is described in swig.swg */
         | 
| 16 | 
            +
            template<typename T> class SwigValueWrapper {
         | 
| 17 | 
            +
              struct SwigMovePointer {
         | 
| 18 | 
            +
                T *ptr;
         | 
| 19 | 
            +
                SwigMovePointer(T *p) : ptr(p) { }
         | 
| 20 | 
            +
                ~SwigMovePointer() { delete ptr; }
         | 
| 21 | 
            +
                SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
         | 
| 22 | 
            +
              } pointer;
         | 
| 23 | 
            +
              SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
         | 
| 24 | 
            +
              SwigValueWrapper(const SwigValueWrapper<T>& rhs);
         | 
| 16 25 | 
             
            public:
         | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
                SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
         | 
| 22 | 
            -
                operator T&() const { return *tt; }
         | 
| 23 | 
            -
                T *operator&() { return tt; }
         | 
| 24 | 
            -
            private:
         | 
| 25 | 
            -
                SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
         | 
| 26 | 
            +
              SwigValueWrapper() : pointer(0) { }
         | 
| 27 | 
            +
              SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
         | 
| 28 | 
            +
              operator T&() const { return *pointer.ptr; }
         | 
| 29 | 
            +
              T *operator&() { return pointer.ptr; }
         | 
| 26 30 | 
             
            };
         | 
| 31 | 
            +
             | 
| 32 | 
            +
            template <typename T> T SwigValueInit() {
         | 
| 33 | 
            +
              return T();
         | 
| 34 | 
            +
            }
         | 
| 27 35 | 
             
            #endif
         | 
| 28 36 |  | 
| 29 37 | 
             
            /* -----------------------------------------------------------------------------
         | 
| @@ -33,14 +41,14 @@ private: | |
| 33 41 |  | 
| 34 42 | 
             
            /* template workaround for compilers that cannot correctly implement the C++ standard */
         | 
| 35 43 | 
             
            #ifndef SWIGTEMPLATEDISAMBIGUATOR
         | 
| 36 | 
            -
            # if defined(__SUNPRO_CC)
         | 
| 37 | 
            -
            # | 
| 38 | 
            -
            # | 
| 39 | 
            -
             | 
| 40 | 
            -
             | 
| 41 | 
            -
            # | 
| 44 | 
            +
            # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
         | 
| 45 | 
            +
            #  define SWIGTEMPLATEDISAMBIGUATOR template
         | 
| 46 | 
            +
            # elif defined(__HP_aCC)
         | 
| 47 | 
            +
            /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
         | 
| 48 | 
            +
            /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
         | 
| 49 | 
            +
            #  define SWIGTEMPLATEDISAMBIGUATOR template
         | 
| 42 50 | 
             
            # else
         | 
| 43 | 
            -
            # | 
| 51 | 
            +
            #  define SWIGTEMPLATEDISAMBIGUATOR
         | 
| 44 52 | 
             
            # endif
         | 
| 45 53 | 
             
            #endif
         | 
| 46 54 |  | 
| @@ -68,6 +76,12 @@ private: | |
| 68 76 | 
             
            # endif
         | 
| 69 77 | 
             
            #endif
         | 
| 70 78 |  | 
| 79 | 
            +
            #ifndef SWIG_MSC_UNSUPPRESS_4505
         | 
| 80 | 
            +
            # if defined(_MSC_VER)
         | 
| 81 | 
            +
            #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
         | 
| 82 | 
            +
            # endif 
         | 
| 83 | 
            +
            #endif
         | 
| 84 | 
            +
             | 
| 71 85 | 
             
            #ifndef SWIGUNUSEDPARM
         | 
| 72 86 | 
             
            # ifdef __cplusplus
         | 
| 73 87 | 
             
            #   define SWIGUNUSEDPARM(p)
         | 
| @@ -123,6 +137,12 @@ private: | |
| 123 137 | 
             
            # define _CRT_SECURE_NO_DEPRECATE
         | 
| 124 138 | 
             
            #endif
         | 
| 125 139 |  | 
| 140 | 
            +
            /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
         | 
| 141 | 
            +
            #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
         | 
| 142 | 
            +
            # define _SCL_SECURE_NO_DEPRECATE
         | 
| 143 | 
            +
            #endif
         | 
| 144 | 
            +
             | 
| 145 | 
            +
             | 
| 126 146 | 
             
            /* -----------------------------------------------------------------------------
         | 
| 127 147 | 
             
             *  This section contains generic SWIG labels for method/variable
         | 
| 128 148 | 
             
             *  declarations/attributes, and other compiler dependent labels.
         | 
| @@ -130,14 +150,14 @@ private: | |
| 130 150 |  | 
| 131 151 | 
             
            /* template workaround for compilers that cannot correctly implement the C++ standard */
         | 
| 132 152 | 
             
            #ifndef SWIGTEMPLATEDISAMBIGUATOR
         | 
| 133 | 
            -
            # if defined(__SUNPRO_CC)
         | 
| 134 | 
            -
            # | 
| 135 | 
            -
            # | 
| 136 | 
            -
             | 
| 137 | 
            -
             | 
| 138 | 
            -
            # | 
| 153 | 
            +
            # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
         | 
| 154 | 
            +
            #  define SWIGTEMPLATEDISAMBIGUATOR template
         | 
| 155 | 
            +
            # elif defined(__HP_aCC)
         | 
| 156 | 
            +
            /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
         | 
| 157 | 
            +
            /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
         | 
| 158 | 
            +
            #  define SWIGTEMPLATEDISAMBIGUATOR template
         | 
| 139 159 | 
             
            # else
         | 
| 140 | 
            -
            # | 
| 160 | 
            +
            #  define SWIGTEMPLATEDISAMBIGUATOR
         | 
| 141 161 | 
             
            # endif
         | 
| 142 162 | 
             
            #endif
         | 
| 143 163 |  | 
| @@ -165,6 +185,12 @@ private: | |
| 165 185 | 
             
            # endif
         | 
| 166 186 | 
             
            #endif
         | 
| 167 187 |  | 
| 188 | 
            +
            #ifndef SWIG_MSC_UNSUPPRESS_4505
         | 
| 189 | 
            +
            # if defined(_MSC_VER)
         | 
| 190 | 
            +
            #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
         | 
| 191 | 
            +
            # endif 
         | 
| 192 | 
            +
            #endif
         | 
| 193 | 
            +
             | 
| 168 194 | 
             
            #ifndef SWIGUNUSEDPARM
         | 
| 169 195 | 
             
            # ifdef __cplusplus
         | 
| 170 196 | 
             
            #   define SWIGUNUSEDPARM(p)
         | 
| @@ -220,16 +246,22 @@ private: | |
| 220 246 | 
             
            # define _CRT_SECURE_NO_DEPRECATE
         | 
| 221 247 | 
             
            #endif
         | 
| 222 248 |  | 
| 249 | 
            +
            /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
         | 
| 250 | 
            +
            #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
         | 
| 251 | 
            +
            # define _SCL_SECURE_NO_DEPRECATE
         | 
| 252 | 
            +
            #endif
         | 
| 253 | 
            +
             | 
| 254 | 
            +
             | 
| 223 255 | 
             
            /* -----------------------------------------------------------------------------
         | 
| 224 256 | 
             
             * swigrun.swg
         | 
| 225 257 | 
             
             *
         | 
| 226 | 
            -
             * This file contains generic  | 
| 258 | 
            +
             * This file contains generic C API SWIG runtime support for pointer
         | 
| 227 259 | 
             
             * type checking.
         | 
| 228 260 | 
             
             * ----------------------------------------------------------------------------- */
         | 
| 229 261 |  | 
| 230 262 | 
             
            /* This should only be incremented when either the layout of swig_type_info changes,
         | 
| 231 263 | 
             
               or for whatever reason, the runtime changes incompatibly */
         | 
| 232 | 
            -
            #define SWIG_RUNTIME_VERSION " | 
| 264 | 
            +
            #define SWIG_RUNTIME_VERSION "4"
         | 
| 233 265 |  | 
| 234 266 | 
             
            /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
         | 
| 235 267 | 
             
            #ifdef SWIG_TYPE_TABLE
         | 
| @@ -242,11 +274,11 @@ private: | |
| 242 274 |  | 
| 243 275 | 
             
            /*
         | 
| 244 276 | 
             
              You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
         | 
| 245 | 
            -
              creating a static or dynamic library from the  | 
| 246 | 
            -
              In 99.9% of the cases,  | 
| 277 | 
            +
              creating a static or dynamic library from the SWIG runtime code.
         | 
| 278 | 
            +
              In 99.9% of the cases, SWIG just needs to declare them as 'static'.
         | 
| 247 279 |  | 
| 248 | 
            -
              But only do this if  | 
| 249 | 
            -
              with your compiler or  | 
| 280 | 
            +
              But only do this if strictly necessary, ie, if you have problems
         | 
| 281 | 
            +
              with your compiler or suchlike.
         | 
| 250 282 | 
             
            */
         | 
| 251 283 |  | 
| 252 284 | 
             
            #ifndef SWIGRUNTIME
         | 
| @@ -264,6 +296,7 @@ private: | |
| 264 296 |  | 
| 265 297 | 
             
            /* Flags for pointer conversions */
         | 
| 266 298 | 
             
            #define SWIG_POINTER_DISOWN        0x1
         | 
| 299 | 
            +
            #define SWIG_CAST_NEW_MEMORY       0x2
         | 
| 267 300 |  | 
| 268 301 | 
             
            /* Flags for new pointer objects */
         | 
| 269 302 | 
             
            #define SWIG_POINTER_OWN           0x1
         | 
| @@ -272,14 +305,14 @@ private: | |
| 272 305 | 
             
            /* 
         | 
| 273 306 | 
             
               Flags/methods for returning states.
         | 
| 274 307 |  | 
| 275 | 
            -
               The  | 
| 308 | 
            +
               The SWIG conversion methods, as ConvertPtr, return and integer 
         | 
| 276 309 | 
             
               that tells if the conversion was successful or not. And if not,
         | 
| 277 310 | 
             
               an error code can be returned (see swigerrors.swg for the codes).
         | 
| 278 311 |  | 
| 279 312 | 
             
               Use the following macros/flags to set or process the returning
         | 
| 280 313 | 
             
               states.
         | 
| 281 314 |  | 
| 282 | 
            -
               In old  | 
| 315 | 
            +
               In old versions of SWIG, code such as the following was usually written:
         | 
| 283 316 |  | 
| 284 317 | 
             
                 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
         | 
| 285 318 | 
             
                   // success code
         | 
| @@ -287,7 +320,7 @@ private: | |
| 287 320 | 
             
                   //fail code
         | 
| 288 321 | 
             
                 }
         | 
| 289 322 |  | 
| 290 | 
            -
               Now you can be more explicit | 
| 323 | 
            +
               Now you can be more explicit:
         | 
| 291 324 |  | 
| 292 325 | 
             
                int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
         | 
| 293 326 | 
             
                if (SWIG_IsOK(res)) {
         | 
| @@ -296,7 +329,7 @@ private: | |
| 296 329 | 
             
                  // fail code
         | 
| 297 330 | 
             
                }
         | 
| 298 331 |  | 
| 299 | 
            -
                | 
| 332 | 
            +
               which is the same really, but now you can also do
         | 
| 300 333 |  | 
| 301 334 | 
             
                Type *ptr;
         | 
| 302 335 | 
             
                int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
         | 
| @@ -314,7 +347,7 @@ private: | |
| 314 347 |  | 
| 315 348 | 
             
               I.e., now SWIG_ConvertPtr can return new objects and you can
         | 
| 316 349 | 
             
               identify the case and take care of the deallocation. Of course that
         | 
| 317 | 
            -
                | 
| 350 | 
            +
               also requires SWIG_ConvertPtr to return new result values, such as
         | 
| 318 351 |  | 
| 319 352 | 
             
                  int SWIG_ConvertPtr(obj, ptr,...) {         
         | 
| 320 353 | 
             
                    if (<obj is ok>) {			       
         | 
| @@ -332,7 +365,7 @@ private: | |
| 332 365 |  | 
| 333 366 | 
             
               Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
         | 
| 334 367 | 
             
               more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
         | 
| 335 | 
            -
                | 
| 368 | 
            +
               SWIG errors code.
         | 
| 336 369 |  | 
| 337 370 | 
             
               Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
         | 
| 338 371 | 
             
               allows to return the 'cast rank', for example, if you have this
         | 
| @@ -346,9 +379,8 @@ private: | |
| 346 379 | 
             
                  fooi(1)   // cast rank '0'
         | 
| 347 380 |  | 
| 348 381 | 
             
               just use the SWIG_AddCast()/SWIG_CheckState()
         | 
| 382 | 
            +
            */
         | 
| 349 383 |  | 
| 350 | 
            -
             | 
| 351 | 
            -
             */
         | 
| 352 384 | 
             
            #define SWIG_OK                    (0) 
         | 
| 353 385 | 
             
            #define SWIG_ERROR                 (-1)
         | 
| 354 386 | 
             
            #define SWIG_IsOK(r)               (r >= 0)
         | 
| @@ -373,7 +405,6 @@ private: | |
| 373 405 | 
             
            #define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
         | 
| 374 406 | 
             
            #define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
         | 
| 375 407 |  | 
| 376 | 
            -
             | 
| 377 408 | 
             
            /* Cast-Rank Mode */
         | 
| 378 409 | 
             
            #if defined(SWIG_CASTRANK_MODE)
         | 
| 379 410 | 
             
            #  ifndef SWIG_TypeRank
         | 
| @@ -396,18 +427,16 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) { | |
| 396 427 | 
             
            #endif
         | 
| 397 428 |  | 
| 398 429 |  | 
| 399 | 
            -
             | 
| 400 | 
            -
             | 
| 401 430 | 
             
            #include <string.h>
         | 
| 402 431 |  | 
| 403 432 | 
             
            #ifdef __cplusplus
         | 
| 404 433 | 
             
            extern "C" {
         | 
| 405 434 | 
             
            #endif
         | 
| 406 435 |  | 
| 407 | 
            -
            typedef void *(*swig_converter_func)(void *);
         | 
| 436 | 
            +
            typedef void *(*swig_converter_func)(void *, int *);
         | 
| 408 437 | 
             
            typedef struct swig_type_info *(*swig_dycast_func)(void **);
         | 
| 409 438 |  | 
| 410 | 
            -
            /* Structure to store  | 
| 439 | 
            +
            /* Structure to store information on one type */
         | 
| 411 440 | 
             
            typedef struct swig_type_info {
         | 
| 412 441 | 
             
              const char             *name;			/* mangled name of this type */
         | 
| 413 442 | 
             
              const char             *str;			/* human readable name of this type */
         | 
| @@ -452,7 +481,7 @@ SWIG_TypeNameComp(const char *f1, const char *l1, | |
| 452 481 | 
             
                while ((*f2 == ' ') && (f2 != l2)) ++f2;
         | 
| 453 482 | 
             
                if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
         | 
| 454 483 | 
             
              }
         | 
| 455 | 
            -
              return (l1 - f1) - (l2 - f2);
         | 
| 484 | 
            +
              return (int)((l1 - f1) - (l2 - f2));
         | 
| 456 485 | 
             
            }
         | 
| 457 486 |  | 
| 458 487 | 
             
            /*
         | 
| @@ -494,48 +523,66 @@ SWIG_TypeCompare(const char *nb, const char *tb) { | |
| 494 523 | 
             
            }
         | 
| 495 524 |  | 
| 496 525 |  | 
| 497 | 
            -
            /* think of this as a c++ template<> or a scheme macro */
         | 
| 498 | 
            -
            #define SWIG_TypeCheck_Template(comparison, ty)         \
         | 
| 499 | 
            -
              if (ty) {                                             \
         | 
| 500 | 
            -
                swig_cast_info *iter = ty->cast;                    \
         | 
| 501 | 
            -
                while (iter) {                                      \
         | 
| 502 | 
            -
                  if (comparison) {                                 \
         | 
| 503 | 
            -
                    if (iter == ty->cast) return iter;              \
         | 
| 504 | 
            -
                    /* Move iter to the top of the linked list */   \
         | 
| 505 | 
            -
                    iter->prev->next = iter->next;                  \
         | 
| 506 | 
            -
                    if (iter->next)                                 \
         | 
| 507 | 
            -
                      iter->next->prev = iter->prev;                \
         | 
| 508 | 
            -
                    iter->next = ty->cast;                          \
         | 
| 509 | 
            -
                    iter->prev = 0;                                 \
         | 
| 510 | 
            -
                    if (ty->cast) ty->cast->prev = iter;            \
         | 
| 511 | 
            -
                    ty->cast = iter;                                \
         | 
| 512 | 
            -
                    return iter;                                    \
         | 
| 513 | 
            -
                  }                                                 \
         | 
| 514 | 
            -
                  iter = iter->next;                                \
         | 
| 515 | 
            -
                }                                                   \
         | 
| 516 | 
            -
              }                                                     \
         | 
| 517 | 
            -
              return 0
         | 
| 518 | 
            -
             | 
| 519 526 | 
             
            /*
         | 
| 520 527 | 
             
              Check the typename
         | 
| 521 528 | 
             
            */
         | 
| 522 529 | 
             
            SWIGRUNTIME swig_cast_info *
         | 
| 523 530 | 
             
            SWIG_TypeCheck(const char *c, swig_type_info *ty) {
         | 
| 524 | 
            -
               | 
| 531 | 
            +
              if (ty) {
         | 
| 532 | 
            +
                swig_cast_info *iter = ty->cast;
         | 
| 533 | 
            +
                while (iter) {
         | 
| 534 | 
            +
                  if (strcmp(iter->type->name, c) == 0) {
         | 
| 535 | 
            +
                    if (iter == ty->cast)
         | 
| 536 | 
            +
                      return iter;
         | 
| 537 | 
            +
                    /* Move iter to the top of the linked list */
         | 
| 538 | 
            +
                    iter->prev->next = iter->next;
         | 
| 539 | 
            +
                    if (iter->next)
         | 
| 540 | 
            +
                      iter->next->prev = iter->prev;
         | 
| 541 | 
            +
                    iter->next = ty->cast;
         | 
| 542 | 
            +
                    iter->prev = 0;
         | 
| 543 | 
            +
                    if (ty->cast) ty->cast->prev = iter;
         | 
| 544 | 
            +
                    ty->cast = iter;
         | 
| 545 | 
            +
                    return iter;
         | 
| 546 | 
            +
                  }
         | 
| 547 | 
            +
                  iter = iter->next;
         | 
| 548 | 
            +
                }
         | 
| 549 | 
            +
              }
         | 
| 550 | 
            +
              return 0;
         | 
| 525 551 | 
             
            }
         | 
| 526 552 |  | 
| 527 | 
            -
            /*  | 
| 553 | 
            +
            /* 
         | 
| 554 | 
            +
              Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
         | 
| 555 | 
            +
            */
         | 
| 528 556 | 
             
            SWIGRUNTIME swig_cast_info *
         | 
| 529 | 
            -
            SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info * | 
| 530 | 
            -
               | 
| 557 | 
            +
            SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
         | 
| 558 | 
            +
              if (ty) {
         | 
| 559 | 
            +
                swig_cast_info *iter = ty->cast;
         | 
| 560 | 
            +
                while (iter) {
         | 
| 561 | 
            +
                  if (iter->type == from) {
         | 
| 562 | 
            +
                    if (iter == ty->cast)
         | 
| 563 | 
            +
                      return iter;
         | 
| 564 | 
            +
                    /* Move iter to the top of the linked list */
         | 
| 565 | 
            +
                    iter->prev->next = iter->next;
         | 
| 566 | 
            +
                    if (iter->next)
         | 
| 567 | 
            +
                      iter->next->prev = iter->prev;
         | 
| 568 | 
            +
                    iter->next = ty->cast;
         | 
| 569 | 
            +
                    iter->prev = 0;
         | 
| 570 | 
            +
                    if (ty->cast) ty->cast->prev = iter;
         | 
| 571 | 
            +
                    ty->cast = iter;
         | 
| 572 | 
            +
                    return iter;
         | 
| 573 | 
            +
                  }
         | 
| 574 | 
            +
                  iter = iter->next;
         | 
| 575 | 
            +
                }
         | 
| 576 | 
            +
              }
         | 
| 577 | 
            +
              return 0;
         | 
| 531 578 | 
             
            }
         | 
| 532 579 |  | 
| 533 580 | 
             
            /*
         | 
| 534 581 | 
             
              Cast a pointer up an inheritance hierarchy
         | 
| 535 582 | 
             
            */
         | 
| 536 583 | 
             
            SWIGRUNTIMEINLINE void *
         | 
| 537 | 
            -
            SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
         | 
| 538 | 
            -
              return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
         | 
| 584 | 
            +
            SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
         | 
| 585 | 
            +
              return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
         | 
| 539 586 | 
             
            }
         | 
| 540 587 |  | 
| 541 588 | 
             
            /* 
         | 
| @@ -808,6 +855,24 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { | |
| 808 855 |  | 
| 809 856 | 
             
            #include <ruby.h>
         | 
| 810 857 |  | 
| 858 | 
            +
            /* Remove global macros defined in Ruby's win32.h */
         | 
| 859 | 
            +
            #ifdef write
         | 
| 860 | 
            +
            # undef write
         | 
| 861 | 
            +
            #endif
         | 
| 862 | 
            +
            #ifdef read
         | 
| 863 | 
            +
            # undef read
         | 
| 864 | 
            +
            #endif
         | 
| 865 | 
            +
            #ifdef bind
         | 
| 866 | 
            +
            # undef bind
         | 
| 867 | 
            +
            #endif
         | 
| 868 | 
            +
            #ifdef close
         | 
| 869 | 
            +
            # undef close
         | 
| 870 | 
            +
            #endif
         | 
| 871 | 
            +
            #ifdef connect
         | 
| 872 | 
            +
            # undef connect
         | 
| 873 | 
            +
            #endif
         | 
| 874 | 
            +
             | 
| 875 | 
            +
             | 
| 811 876 | 
             
            /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
         | 
| 812 877 | 
             
            #ifndef NUM2LL
         | 
| 813 878 | 
             
            #define NUM2LL(x) NUM2LONG((x))
         | 
| @@ -836,12 +901,44 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { | |
| 836 901 | 
             
            #ifndef RSTRING_PTR
         | 
| 837 902 | 
             
            # define RSTRING_PTR(x) RSTRING(x)->ptr
         | 
| 838 903 | 
             
            #endif
         | 
| 904 | 
            +
            #ifndef RSTRING_END
         | 
| 905 | 
            +
            # define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x))
         | 
| 906 | 
            +
            #endif
         | 
| 839 907 | 
             
            #ifndef RARRAY_LEN
         | 
| 840 908 | 
             
            # define RARRAY_LEN(x) RARRAY(x)->len
         | 
| 841 909 | 
             
            #endif
         | 
| 842 910 | 
             
            #ifndef RARRAY_PTR
         | 
| 843 911 | 
             
            # define RARRAY_PTR(x) RARRAY(x)->ptr
         | 
| 844 912 | 
             
            #endif
         | 
| 913 | 
            +
            #ifndef RFLOAT_VALUE
         | 
| 914 | 
            +
            # define RFLOAT_VALUE(x) RFLOAT(x)->value
         | 
| 915 | 
            +
            #endif
         | 
| 916 | 
            +
            #ifndef DOUBLE2NUM
         | 
| 917 | 
            +
            # define DOUBLE2NUM(x) rb_float_new(x)
         | 
| 918 | 
            +
            #endif
         | 
| 919 | 
            +
            #ifndef RHASH_TBL
         | 
| 920 | 
            +
            # define RHASH_TBL(x) (RHASH(x)->tbl)
         | 
| 921 | 
            +
            #endif
         | 
| 922 | 
            +
            #ifndef RHASH_ITER_LEV
         | 
| 923 | 
            +
            # define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev)
         | 
| 924 | 
            +
            #endif
         | 
| 925 | 
            +
            #ifndef RHASH_IFNONE
         | 
| 926 | 
            +
            # define RHASH_IFNONE(x) (RHASH(x)->ifnone)
         | 
| 927 | 
            +
            #endif
         | 
| 928 | 
            +
            #ifndef RHASH_SIZE
         | 
| 929 | 
            +
            # define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries)
         | 
| 930 | 
            +
            #endif
         | 
| 931 | 
            +
            #ifndef RHASH_EMPTY_P
         | 
| 932 | 
            +
            # define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0)
         | 
| 933 | 
            +
            #endif
         | 
| 934 | 
            +
            #ifndef RSTRUCT_LEN
         | 
| 935 | 
            +
            # define RSTRUCT_LEN(x) RSTRUCT(x)->len
         | 
| 936 | 
            +
            #endif
         | 
| 937 | 
            +
            #ifndef RSTRUCT_PTR
         | 
| 938 | 
            +
            # define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
         | 
| 939 | 
            +
            #endif
         | 
| 940 | 
            +
             | 
| 941 | 
            +
             | 
| 845 942 |  | 
| 846 943 | 
             
            /*
         | 
| 847 944 | 
             
             * Need to be very careful about how these macros are defined, especially
         | 
| @@ -903,6 +1000,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { | |
| 903 1000 | 
             
            #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
         | 
| 904 1001 | 
             
            #endif
         | 
| 905 1002 |  | 
| 1003 | 
            +
            static VALUE _mSWIG = Qnil;
         | 
| 906 1004 |  | 
| 907 1005 | 
             
            /* -----------------------------------------------------------------------------
         | 
| 908 1006 | 
             
             * error manipulation
         | 
| @@ -993,7 +1091,71 @@ SWIG_Ruby_ErrorType(int SWIG_code) { | |
| 993 1091 | 
             
            }
         | 
| 994 1092 |  | 
| 995 1093 |  | 
| 1094 | 
            +
            /* This function is called when a user inputs a wrong argument to
         | 
| 1095 | 
            +
               a method.
         | 
| 1096 | 
            +
             */
         | 
| 1097 | 
            +
            SWIGINTERN 
         | 
| 1098 | 
            +
            const char* Ruby_Format_TypeError( const char* msg,
         | 
| 1099 | 
            +
            				   const char* type, 
         | 
| 1100 | 
            +
            				   const char* name, 
         | 
| 1101 | 
            +
            				   const int argn,
         | 
| 1102 | 
            +
            				   VALUE input )
         | 
| 1103 | 
            +
            {
         | 
| 1104 | 
            +
              char buf[128];
         | 
| 1105 | 
            +
              VALUE str;
         | 
| 1106 | 
            +
              VALUE asStr;
         | 
| 1107 | 
            +
              if ( msg && *msg )
         | 
| 1108 | 
            +
                {
         | 
| 1109 | 
            +
                  str = rb_str_new2(msg);
         | 
| 1110 | 
            +
                }
         | 
| 1111 | 
            +
              else
         | 
| 1112 | 
            +
                {
         | 
| 1113 | 
            +
                  str = rb_str_new(NULL, 0);
         | 
| 1114 | 
            +
                }
         | 
| 1115 | 
            +
             | 
| 1116 | 
            +
              str = rb_str_cat2( str, "Expected argument " );
         | 
| 1117 | 
            +
              sprintf( buf, "%d of type ", argn-1 );
         | 
| 1118 | 
            +
              str = rb_str_cat2( str, buf );
         | 
| 1119 | 
            +
              str = rb_str_cat2( str, type );
         | 
| 1120 | 
            +
              str = rb_str_cat2( str, ", but got " );
         | 
| 1121 | 
            +
              str = rb_str_cat2( str, rb_obj_classname(input) );
         | 
| 1122 | 
            +
              str = rb_str_cat2( str, " " );
         | 
| 1123 | 
            +
              asStr = rb_inspect(input);
         | 
| 1124 | 
            +
              if ( RSTRING_LEN(asStr) > 30 )
         | 
| 1125 | 
            +
                {
         | 
| 1126 | 
            +
                  str = rb_str_cat( str, StringValuePtr(asStr), 30 );
         | 
| 1127 | 
            +
                  str = rb_str_cat2( str, "..." );
         | 
| 1128 | 
            +
                }
         | 
| 1129 | 
            +
              else
         | 
| 1130 | 
            +
                {
         | 
| 1131 | 
            +
                  str = rb_str_append( str, asStr );
         | 
| 1132 | 
            +
                }
         | 
| 1133 | 
            +
             | 
| 1134 | 
            +
              if ( name )
         | 
| 1135 | 
            +
                {
         | 
| 1136 | 
            +
                  str = rb_str_cat2( str, "\n\tin SWIG method '" );
         | 
| 1137 | 
            +
                  str = rb_str_cat2( str, name );
         | 
| 1138 | 
            +
                  str = rb_str_cat2( str, "'" );
         | 
| 1139 | 
            +
                }
         | 
| 1140 | 
            +
             | 
| 1141 | 
            +
              return StringValuePtr( str );
         | 
| 1142 | 
            +
            }
         | 
| 996 1143 |  | 
| 1144 | 
            +
            /* This function is called when an overloaded method fails */
         | 
| 1145 | 
            +
            SWIGINTERN 
         | 
| 1146 | 
            +
            void Ruby_Format_OverloadedError(
         | 
| 1147 | 
            +
            				 const int argc,
         | 
| 1148 | 
            +
            				 const int maxargs,
         | 
| 1149 | 
            +
            				 const char* method, 
         | 
| 1150 | 
            +
            				 const char* prototypes 
         | 
| 1151 | 
            +
            				 )
         | 
| 1152 | 
            +
            {
         | 
| 1153 | 
            +
              const char* msg = "Wrong # of arguments";
         | 
| 1154 | 
            +
              if ( argc <= maxargs ) msg = "Wrong arguments";
         | 
| 1155 | 
            +
              rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n"  
         | 
| 1156 | 
            +
            	   "Possible C/C++ prototypes are:\n%s",
         | 
| 1157 | 
            +
            	   msg, method, prototypes);
         | 
| 1158 | 
            +
            }
         | 
| 997 1159 |  | 
| 998 1160 | 
             
            /* -----------------------------------------------------------------------------
         | 
| 999 1161 | 
             
             * See the LICENSE file for information on copyright, usage and redistribution
         | 
| @@ -1011,26 +1173,54 @@ SWIG_Ruby_ErrorType(int SWIG_code) { | |
| 1011 1173 | 
             
            extern "C" {
         | 
| 1012 1174 | 
             
            #endif
         | 
| 1013 1175 |  | 
| 1176 | 
            +
            /* Ruby 1.8 actually assumes the first case. */
         | 
| 1177 | 
            +
            #if SIZEOF_VOIDP == SIZEOF_LONG
         | 
| 1178 | 
            +
            #  define SWIG2NUM(v) LONG2NUM((unsigned long)v)
         | 
| 1179 | 
            +
            #  define NUM2SWIG(x) (unsigned long)NUM2LONG(x)
         | 
| 1180 | 
            +
            #elif SIZEOF_VOIDP == SIZEOF_LONG_LONG
         | 
| 1181 | 
            +
            #  define SWIG2NUM(v) LL2NUM((unsigned long long)v)
         | 
| 1182 | 
            +
            #  define NUM2SWIG(x) (unsigned long long)NUM2LL(x)
         | 
| 1183 | 
            +
            #else
         | 
| 1184 | 
            +
            #  error sizeof(void*) is not the same as long or long long
         | 
| 1185 | 
            +
            #endif
         | 
| 1186 | 
            +
             | 
| 1014 1187 |  | 
| 1015 1188 | 
             
            /* Global Ruby hash table to store Trackings from C/C++
         | 
| 1016 | 
            -
               structs to Ruby Objects.  | 
| 1017 | 
            -
             | 
| 1018 | 
            -
             | 
| 1019 | 
            -
             | 
| 1020 | 
            -
             | 
| 1021 | 
            -
             | 
| 1189 | 
            +
               structs to Ruby Objects. 
         | 
| 1190 | 
            +
            */
         | 
| 1191 | 
            +
            static VALUE swig_ruby_trackings = Qnil;
         | 
| 1192 | 
            +
             | 
| 1193 | 
            +
            /* Global variable that stores a reference to the ruby
         | 
| 1194 | 
            +
               hash table delete function. */
         | 
| 1195 | 
            +
            static ID swig_ruby_hash_delete;
         | 
| 1022 1196 |  | 
| 1023 1197 | 
             
            /* Setup a Ruby hash table to store Trackings */
         | 
| 1024 1198 | 
             
            SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
         | 
| 1025 1199 | 
             
              /* Create a ruby hash table to store Trackings from C++ 
         | 
| 1026 | 
            -
                 objects to Ruby objects. | 
| 1027 | 
            -
             | 
| 1028 | 
            -
               | 
| 1029 | 
            -
             | 
| 1030 | 
            -
             | 
| 1031 | 
            -
             | 
| 1032 | 
            -
                  | 
| 1033 | 
            -
               | 
| 1200 | 
            +
                 objects to Ruby objects. */
         | 
| 1201 | 
            +
             | 
| 1202 | 
            +
              /* Try to see if some other .so has already created a 
         | 
| 1203 | 
            +
                 tracking hash table, which we keep hidden in an instance var
         | 
| 1204 | 
            +
                 in the SWIG module.
         | 
| 1205 | 
            +
                 This is done to allow multiple DSOs to share the same
         | 
| 1206 | 
            +
                 tracking table.
         | 
| 1207 | 
            +
              */
         | 
| 1208 | 
            +
              ID trackings_id = rb_intern( "@__trackings__" );
         | 
| 1209 | 
            +
              VALUE verbose = rb_gv_get("VERBOSE");
         | 
| 1210 | 
            +
              rb_gv_set("VERBOSE", Qfalse);
         | 
| 1211 | 
            +
              swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id );
         | 
| 1212 | 
            +
              rb_gv_set("VERBOSE", verbose);
         | 
| 1213 | 
            +
             | 
| 1214 | 
            +
              /* No, it hasn't.  Create one ourselves */ 
         | 
| 1215 | 
            +
              if ( swig_ruby_trackings == Qnil )
         | 
| 1216 | 
            +
                {
         | 
| 1217 | 
            +
                  swig_ruby_trackings = rb_hash_new();
         | 
| 1218 | 
            +
                  rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings );
         | 
| 1219 | 
            +
                }
         | 
| 1220 | 
            +
             | 
| 1221 | 
            +
              /* Now store a reference to the hash table delete function
         | 
| 1222 | 
            +
                 so that we only have to look it up once.*/
         | 
| 1223 | 
            +
              swig_ruby_hash_delete = rb_intern("delete");
         | 
| 1034 1224 | 
             
            }
         | 
| 1035 1225 |  | 
| 1036 1226 | 
             
            /* Get a Ruby number to reference a pointer */
         | 
| @@ -1040,8 +1230,7 @@ SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) { | |
| 1040 1230 | 
             
                 a Ruby number object. */
         | 
| 1041 1231 |  | 
| 1042 1232 | 
             
              /* Convert the pointer to a Ruby number */
         | 
| 1043 | 
            -
               | 
| 1044 | 
            -
              return LONG2NUM(value);
         | 
| 1233 | 
            +
              return SWIG2NUM(ptr);
         | 
| 1045 1234 | 
             
            }
         | 
| 1046 1235 |  | 
| 1047 1236 | 
             
            /* Get a Ruby number to reference an object */
         | 
| @@ -1051,8 +1240,7 @@ SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) { | |
| 1051 1240 | 
             
                 a Ruby number object. */
         | 
| 1052 1241 |  | 
| 1053 1242 | 
             
              /* Convert the Object to a Ruby number */
         | 
| 1054 | 
            -
               | 
| 1055 | 
            -
              return LONG2NUM(value);
         | 
| 1243 | 
            +
              return SWIG2NUM(object);
         | 
| 1056 1244 | 
             
            }
         | 
| 1057 1245 |  | 
| 1058 1246 | 
             
            /* Get a Ruby object from a previously stored reference */
         | 
| @@ -1060,9 +1248,8 @@ SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) { | |
| 1060 1248 | 
             
              /* The provided Ruby number object is a reference
         | 
| 1061 1249 | 
             
                 to the Ruby object we want.*/
         | 
| 1062 1250 |  | 
| 1063 | 
            -
              /*  | 
| 1064 | 
            -
               | 
| 1065 | 
            -
              return (VALUE) value;
         | 
| 1251 | 
            +
              /* Convert the Ruby number to a Ruby object */
         | 
| 1252 | 
            +
              return NUM2SWIG(reference);
         | 
| 1066 1253 | 
             
            }
         | 
| 1067 1254 |  | 
| 1068 1255 | 
             
            /* Add a Tracking from a C/C++ struct to a Ruby object */
         | 
| @@ -1154,6 +1341,15 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) { | |
| 1154 1341 | 
             
              return target;
         | 
| 1155 1342 | 
             
            }
         | 
| 1156 1343 |  | 
| 1344 | 
            +
            /* For ruby1.8.4 and earlier. */
         | 
| 1345 | 
            +
            #ifndef RUBY_INIT_STACK
         | 
| 1346 | 
            +
               RUBY_EXTERN void Init_stack(VALUE* addr);
         | 
| 1347 | 
            +
            #  define RUBY_INIT_STACK \
         | 
| 1348 | 
            +
               VALUE variable_in_this_stack_frame; \
         | 
| 1349 | 
            +
               Init_stack(&variable_in_this_stack_frame);
         | 
| 1350 | 
            +
            #endif
         | 
| 1351 | 
            +
             | 
| 1352 | 
            +
             | 
| 1157 1353 | 
             
            #ifdef __cplusplus
         | 
| 1158 1354 | 
             
            }
         | 
| 1159 1355 | 
             
            #endif
         | 
| @@ -1218,6 +1414,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) { | |
| 1218 1414 | 
             
            #define SWIG_MangleStr(value)                        	SWIG_Ruby_MangleStr(value)		  
         | 
| 1219 1415 | 
             
            #define SWIG_CheckConvert(value, ty)                 	SWIG_Ruby_CheckConvert(value, ty)	  
         | 
| 1220 1416 |  | 
| 1417 | 
            +
            #include "assert.h"
         | 
| 1221 1418 |  | 
| 1222 1419 | 
             
            /* -----------------------------------------------------------------------------
         | 
| 1223 1420 | 
             
             * pointers/data manipulation
         | 
| @@ -1225,9 +1422,6 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) { | |
| 1225 1422 |  | 
| 1226 1423 | 
             
            #ifdef __cplusplus
         | 
| 1227 1424 | 
             
            extern "C" {
         | 
| 1228 | 
            -
            #if 0
         | 
| 1229 | 
            -
            } /* cc-mode */
         | 
| 1230 | 
            -
            #endif
         | 
| 1231 1425 | 
             
            #endif
         | 
| 1232 1426 |  | 
| 1233 1427 | 
             
            typedef struct {
         | 
| @@ -1239,10 +1433,44 @@ typedef struct { | |
| 1239 1433 | 
             
            } swig_class;
         | 
| 1240 1434 |  | 
| 1241 1435 |  | 
| 1242 | 
            -
             | 
| 1436 | 
            +
            /* Global pointer used to keep some internal SWIG stuff */
         | 
| 1243 1437 | 
             
            static VALUE _cSWIG_Pointer = Qnil;
         | 
| 1244 1438 | 
             
            static VALUE swig_runtime_data_type_pointer = Qnil;
         | 
| 1245 1439 |  | 
| 1440 | 
            +
            /* Global IDs used to keep some internal SWIG stuff */
         | 
| 1441 | 
            +
            static ID swig_arity_id = 0;
         | 
| 1442 | 
            +
            static ID swig_call_id  = 0;
         | 
| 1443 | 
            +
             | 
| 1444 | 
            +
            /*
         | 
| 1445 | 
            +
              If your swig extension is to be run within an embedded ruby and has
         | 
| 1446 | 
            +
              director callbacks, you should set -DRUBY_EMBEDDED during compilation.  
         | 
| 1447 | 
            +
              This will reset ruby's stack frame on each entry point from the main 
         | 
| 1448 | 
            +
              program the first time a virtual director function is invoked (in a 
         | 
| 1449 | 
            +
              non-recursive way).
         | 
| 1450 | 
            +
              If this is not done, you run the risk of Ruby trashing the stack.
         | 
| 1451 | 
            +
            */
         | 
| 1452 | 
            +
             | 
| 1453 | 
            +
            #ifdef RUBY_EMBEDDED
         | 
| 1454 | 
            +
             | 
| 1455 | 
            +
            #  define SWIG_INIT_STACK                            \
         | 
| 1456 | 
            +
                  if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
         | 
| 1457 | 
            +
                  ++swig_virtual_calls;
         | 
| 1458 | 
            +
            #  define SWIG_RELEASE_STACK --swig_virtual_calls;
         | 
| 1459 | 
            +
            #  define Ruby_DirectorTypeMismatchException(x) \
         | 
| 1460 | 
            +
                      rb_raise( rb_eTypeError, x ); return c_result;
         | 
| 1461 | 
            +
             | 
| 1462 | 
            +
                  static unsigned int swig_virtual_calls = 0;
         | 
| 1463 | 
            +
             | 
| 1464 | 
            +
            #else  /* normal non-embedded extension */
         | 
| 1465 | 
            +
             | 
| 1466 | 
            +
            #  define SWIG_INIT_STACK
         | 
| 1467 | 
            +
            #  define SWIG_RELEASE_STACK
         | 
| 1468 | 
            +
            #  define Ruby_DirectorTypeMismatchException(x) \
         | 
| 1469 | 
            +
                      throw Swig::DirectorTypeMismatchException( x );
         | 
| 1470 | 
            +
             | 
| 1471 | 
            +
            #endif  /* RUBY_EMBEDDED */
         | 
| 1472 | 
            +
             | 
| 1473 | 
            +
             | 
| 1246 1474 | 
             
            SWIGRUNTIME VALUE 
         | 
| 1247 1475 | 
             
            getExceptionClass(void) {
         | 
| 1248 1476 | 
             
              static int init = 0;
         | 
| @@ -1274,6 +1502,8 @@ SWIG_Ruby_InitRuntime(void) | |
| 1274 1502 | 
             
            {
         | 
| 1275 1503 | 
             
              if (_mSWIG == Qnil) {
         | 
| 1276 1504 | 
             
                _mSWIG = rb_define_module("SWIG");
         | 
| 1505 | 
            +
                swig_call_id  = rb_intern("call");
         | 
| 1506 | 
            +
                swig_arity_id = rb_intern("arity");
         | 
| 1277 1507 | 
             
              }
         | 
| 1278 1508 | 
             
            }
         | 
| 1279 1509 |  | 
| @@ -1297,7 +1527,7 @@ SWIGRUNTIME VALUE | |
| 1297 1527 | 
             
            SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
         | 
| 1298 1528 | 
             
            {
         | 
| 1299 1529 | 
             
              int own =  flags & SWIG_POINTER_OWN; 
         | 
| 1300 | 
            -
              
         | 
| 1530 | 
            +
              int track;
         | 
| 1301 1531 | 
             
              char *klass_name;
         | 
| 1302 1532 | 
             
              swig_class *sklass;
         | 
| 1303 1533 | 
             
              VALUE klass;
         | 
| @@ -1310,14 +1540,15 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags) | |
| 1310 1540 | 
             
                sklass = (swig_class *) type->clientdata;
         | 
| 1311 1541 |  | 
| 1312 1542 | 
             
                /* Are we tracking this class and have we already returned this Ruby object? */
         | 
| 1313 | 
            -
                 | 
| 1543 | 
            +
                track = sklass->trackObjects;
         | 
| 1544 | 
            +
                if (track) {
         | 
| 1314 1545 | 
             
                  obj = SWIG_RubyInstanceFor(ptr);
         | 
| 1315 1546 |  | 
| 1316 1547 | 
             
                  /* Check the object's type and make sure it has the correct type.
         | 
| 1317 1548 | 
             
                    It might not in cases where methods do things like 
         | 
| 1318 1549 | 
             
                    downcast methods. */
         | 
| 1319 1550 | 
             
                  if (obj != Qnil) {
         | 
| 1320 | 
            -
                    VALUE value = rb_iv_get(obj, "__swigtype__");
         | 
| 1551 | 
            +
                    VALUE value = rb_iv_get(obj, "@__swigtype__");
         | 
| 1321 1552 | 
             
                    char* type_name = RSTRING_PTR(value);
         | 
| 1322 1553 |  | 
| 1323 1554 | 
             
                    if (strcmp(type->name, type_name) == 0) {
         | 
| @@ -1327,10 +1558,13 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags) | |
| 1327 1558 | 
             
                }
         | 
| 1328 1559 |  | 
| 1329 1560 | 
             
                /* Create a new Ruby object */
         | 
| 1330 | 
            -
                obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),  | 
| 1561 | 
            +
                obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), 
         | 
| 1562 | 
            +
            			   ( own ? VOIDFUNC(sklass->destroy) : 
         | 
| 1563 | 
            +
            			     (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )
         | 
| 1564 | 
            +
            			     ), ptr);
         | 
| 1331 1565 |  | 
| 1332 1566 | 
             
                /* If tracking is on for this class then track this object. */
         | 
| 1333 | 
            -
                if ( | 
| 1567 | 
            +
                if (track) {
         | 
| 1334 1568 | 
             
                  SWIG_RubyAddTracking(ptr, obj);
         | 
| 1335 1569 | 
             
                }
         | 
| 1336 1570 | 
             
              } else {
         | 
| @@ -1340,7 +1574,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags) | |
| 1340 1574 | 
             
                free((void *) klass_name);
         | 
| 1341 1575 | 
             
                obj = Data_Wrap_Struct(klass, 0, 0, ptr);
         | 
| 1342 1576 | 
             
              }
         | 
| 1343 | 
            -
              rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
         | 
| 1577 | 
            +
              rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
         | 
| 1344 1578 |  | 
| 1345 1579 | 
             
              return obj;
         | 
| 1346 1580 | 
             
            }
         | 
| @@ -1352,7 +1586,7 @@ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type) | |
| 1352 1586 | 
             
              VALUE obj;
         | 
| 1353 1587 | 
             
              swig_class *sklass = (swig_class *) type->clientdata;
         | 
| 1354 1588 | 
             
              obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
         | 
| 1355 | 
            -
              rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
         | 
| 1589 | 
            +
              rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
         | 
| 1356 1590 | 
             
              return obj;
         | 
| 1357 1591 | 
             
            }
         | 
| 1358 1592 |  | 
| @@ -1360,7 +1594,7 @@ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type) | |
| 1360 1594 | 
             
            SWIGRUNTIMEINLINE char *
         | 
| 1361 1595 | 
             
            SWIG_Ruby_MangleStr(VALUE obj)
         | 
| 1362 1596 | 
             
            {
         | 
| 1363 | 
            -
              VALUE stype = rb_iv_get(obj, "__swigtype__");
         | 
| 1597 | 
            +
              VALUE stype = rb_iv_get(obj, "@__swigtype__");
         | 
| 1364 1598 | 
             
              return StringValuePtr(stype);
         | 
| 1365 1599 | 
             
            }
         | 
| 1366 1600 |  | 
| @@ -1442,8 +1676,11 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, | |
| 1442 1676 | 
             
                tc = SWIG_TypeCheck(c, ty);
         | 
| 1443 1677 | 
             
                if (!tc) {
         | 
| 1444 1678 | 
             
                  return SWIG_ERROR;
         | 
| 1679 | 
            +
                } else {
         | 
| 1680 | 
            +
                  int newmemory = 0;
         | 
| 1681 | 
            +
                  *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
         | 
| 1682 | 
            +
                  assert(!newmemory); /* newmemory handling not yet implemented */
         | 
| 1445 1683 | 
             
                }
         | 
| 1446 | 
            -
                *ptr = SWIG_TypeCast(tc, vptr);
         | 
| 1447 1684 | 
             
              } else {
         | 
| 1448 1685 | 
             
                *ptr = vptr;
         | 
| 1449 1686 | 
             
              }
         | 
| @@ -1524,10 +1761,42 @@ SWIG_Ruby_SetModule(swig_module_info *pointer) | |
| 1524 1761 | 
             
              rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
         | 
| 1525 1762 | 
             
            }
         | 
| 1526 1763 |  | 
| 1764 | 
            +
            /* This function can be used to check whether a proc or method or similarly
         | 
| 1765 | 
            +
               callable function has been passed.  Usually used in a %typecheck, like:
         | 
| 1766 | 
            +
             | 
| 1767 | 
            +
               %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) {
         | 
| 1768 | 
            +
                    $result = SWIG_Ruby_isCallable( $input );
         | 
| 1769 | 
            +
               }
         | 
| 1770 | 
            +
             */
         | 
| 1771 | 
            +
            SWIGINTERN
         | 
| 1772 | 
            +
            int SWIG_Ruby_isCallable( VALUE proc )
         | 
| 1773 | 
            +
            {
         | 
| 1774 | 
            +
              if ( rb_respond_to( proc, swig_call_id ) == Qtrue )
         | 
| 1775 | 
            +
                return 1;
         | 
| 1776 | 
            +
              return 0;
         | 
| 1777 | 
            +
            }
         | 
| 1778 | 
            +
             | 
| 1779 | 
            +
            /* This function can be used to check the arity (number of arguments)
         | 
| 1780 | 
            +
               a proc or method can take.  Usually used in a %typecheck.
         | 
| 1781 | 
            +
               Valid arities will be that equal to minimal or those < 0
         | 
| 1782 | 
            +
               which indicate a variable number of parameters at the end.
         | 
| 1783 | 
            +
             */
         | 
| 1784 | 
            +
            SWIGINTERN
         | 
| 1785 | 
            +
            int SWIG_Ruby_arity( VALUE proc, int minimal )
         | 
| 1786 | 
            +
            {
         | 
| 1787 | 
            +
              if ( rb_respond_to( proc, swig_arity_id ) == Qtrue )
         | 
| 1788 | 
            +
                {
         | 
| 1789 | 
            +
                  VALUE num = rb_funcall( proc, swig_arity_id, 0 );
         | 
| 1790 | 
            +
                  int arity = NUM2INT(num);
         | 
| 1791 | 
            +
                  if ( arity < 0 && (arity+1) < -minimal ) return 1;
         | 
| 1792 | 
            +
                  if ( arity == minimal ) return 1;
         | 
| 1793 | 
            +
                  return 1;
         | 
| 1794 | 
            +
                }
         | 
| 1795 | 
            +
              return 0;
         | 
| 1796 | 
            +
            }
         | 
| 1797 | 
            +
             | 
| 1798 | 
            +
             | 
| 1527 1799 | 
             
            #ifdef __cplusplus
         | 
| 1528 | 
            -
            #if 0
         | 
| 1529 | 
            -
            { /* cc-mode */
         | 
| 1530 | 
            -
            #endif
         | 
| 1531 1800 | 
             
            }
         | 
| 1532 1801 | 
             
            #endif
         | 
| 1533 1802 |  | 
| @@ -1546,9 +1815,11 @@ SWIG_Ruby_SetModule(swig_module_info *pointer) | |
| 1546 1815 | 
             
            #define SWIGTYPE_p_ID3_Tag swig_types[2]
         | 
| 1547 1816 | 
             
            #define SWIGTYPE_p_ID3_Tag__Iterator swig_types[3]
         | 
| 1548 1817 | 
             
            #define SWIGTYPE_p_char swig_types[4]
         | 
| 1549 | 
            -
            #define  | 
| 1550 | 
            -
             | 
| 1551 | 
            -
             | 
| 1818 | 
            +
            #define SWIGTYPE_p_unsigned_char swig_types[5]
         | 
| 1819 | 
            +
            #define SWIGTYPE_p_unsigned_int swig_types[6]
         | 
| 1820 | 
            +
            #define SWIGTYPE_p_unsigned_long swig_types[7]
         | 
| 1821 | 
            +
            static swig_type_info *swig_types[9];
         | 
| 1822 | 
            +
            static swig_module_info swig_module = {swig_types, 8, 0, 0, 0, 0};
         | 
| 1552 1823 | 
             
            #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
         | 
| 1553 1824 | 
             
            #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
         | 
| 1554 1825 |  | 
| @@ -1559,7 +1830,11 @@ static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0}; | |
| 1559 1830 |  | 
| 1560 1831 | 
             
            static VALUE mAPI;
         | 
| 1561 1832 |  | 
| 1562 | 
            -
            #define  | 
| 1833 | 
            +
            #define SWIG_RUBY_THREAD_BEGIN_BLOCK
         | 
| 1834 | 
            +
            #define SWIG_RUBY_THREAD_END_BLOCK
         | 
| 1835 | 
            +
             | 
| 1836 | 
            +
             | 
| 1837 | 
            +
            #define SWIGVERSION 0x010340 
         | 
| 1563 1838 | 
             
            #define SWIG_VERSION SWIGVERSION
         | 
| 1564 1839 |  | 
| 1565 1840 |  | 
| @@ -1590,11 +1865,11 @@ SWIGINTERN int | |
| 1590 1865 | 
             
            SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
         | 
| 1591 1866 | 
             
            {
         | 
| 1592 1867 | 
             
              if (TYPE(obj) == T_STRING) {
         | 
| 1593 | 
            -
                
         | 
| 1594 | 
            -
             | 
| 1595 | 
            -
             | 
| 1868 | 
            +
                #if defined(StringValuePtr)
         | 
| 1869 | 
            +
                char *cstr = StringValuePtr(obj); 
         | 
| 1870 | 
            +
                #else
         | 
| 1596 1871 | 
             
                char *cstr = STR2CSTR(obj);
         | 
| 1597 | 
            -
                
         | 
| 1872 | 
            +
                #endif
         | 
| 1598 1873 | 
             
                size_t size = RSTRING_LEN(obj) + 1;
         | 
| 1599 1874 | 
             
                if (cptr)  {
         | 
| 1600 1875 | 
             
                  if (alloc) {
         | 
| @@ -1628,14 +1903,12 @@ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) | |
| 1628 1903 |  | 
| 1629 1904 |  | 
| 1630 1905 | 
             
            #include <limits.h>
         | 
| 1631 | 
            -
            # | 
| 1632 | 
            -
            #  | 
| 1633 | 
            -
            # | 
| 1634 | 
            -
            # | 
| 1635 | 
            -
            # | 
| 1636 | 
            -
            #endif
         | 
| 1637 | 
            -
            #ifndef ULLONG_MAX
         | 
| 1638 | 
            -
            # define ULLONG_MAX	ULONG_LONG_MAX
         | 
| 1906 | 
            +
            #if !defined(SWIG_NO_LLONG_MAX)
         | 
| 1907 | 
            +
            # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
         | 
| 1908 | 
            +
            #   define LLONG_MAX __LONG_LONG_MAX__
         | 
| 1909 | 
            +
            #   define LLONG_MIN (-LLONG_MAX - 1LL)
         | 
| 1910 | 
            +
            #   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
         | 
| 1911 | 
            +
            # endif
         | 
| 1639 1912 | 
             
            #endif
         | 
| 1640 1913 |  | 
| 1641 1914 |  | 
| @@ -1646,7 +1919,7 @@ SWIG_ruby_failed(void) | |
| 1646 1919 | 
             
            } 
         | 
| 1647 1920 |  | 
| 1648 1921 |  | 
| 1649 | 
            -
            /*@SWIG | 
| 1922 | 
            +
            /*@SWIG:/usr/local/share/swig/1.3.40/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
         | 
| 1650 1923 | 
             
            SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
         | 
| 1651 1924 | 
             
            {
         | 
| 1652 1925 | 
             
              VALUE obj = args[0];
         | 
| @@ -1698,7 +1971,7 @@ SWIG_From_bool  (bool value) | |
| 1698 1971 | 
             
            }
         | 
| 1699 1972 |  | 
| 1700 1973 |  | 
| 1701 | 
            -
            /*@SWIG | 
| 1974 | 
            +
            /*@SWIG:/usr/local/share/swig/1.3.40/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
         | 
| 1702 1975 | 
             
            SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
         | 
| 1703 1976 | 
             
            {
         | 
| 1704 1977 | 
             
              VALUE obj = args[0];
         | 
| @@ -1823,7 +2096,7 @@ SWIGINTERN VALUE ID3_Field_get_binary(ID3_Field *self){ | |
| 1823 2096 | 
             
            SWIGINTERN VALUE ID3_Field_get_unicode(ID3_Field *self){
         | 
| 1824 2097 | 
             
            			const char *str = (const char *)self->GetRawUnicodeText();
         | 
| 1825 2098 | 
             
            			if (str == NULL) return rb_str_new("", 0);
         | 
| 1826 | 
            -
            			 | 
| 2099 | 
            +
            			size_t size = self->Size();
         | 
| 1827 2100 | 
             
            			if (size >= 2 && str[size-2] == '\0' && str[size-1] == '\0') {
         | 
| 1828 2101 | 
             
            				// id3lib seems to be inconsistent: the Unicode strings
         | 
| 1829 2102 | 
             
            				// don't always end in 0x0000. If they do, we don't want these
         | 
| @@ -1834,8 +2107,8 @@ SWIGINTERN VALUE ID3_Field_get_unicode(ID3_Field *self){ | |
| 1834 2107 | 
             
            		}
         | 
| 1835 2108 | 
             
            SWIGINTERN size_t ID3_Field_set_binary(ID3_Field *self,VALUE data){
         | 
| 1836 2109 | 
             
            			StringValue(data);
         | 
| 1837 | 
            -
            			return self->Set((const  | 
| 1838 | 
            -
            			                  | 
| 2110 | 
            +
            			return self->Set((const uchar *)RSTRING_PTR(data),
         | 
| 2111 | 
            +
            			                 RSTRING_LEN(data));
         | 
| 1839 2112 | 
             
            		}
         | 
| 1840 2113 | 
             
            SWIGINTERN size_t ID3_Field_set_unicode(ID3_Field *self,VALUE data){
         | 
| 1841 2114 | 
             
            			StringValue(data);
         | 
| @@ -1843,14 +2116,14 @@ SWIGINTERN size_t ID3_Field_set_unicode(ID3_Field *self,VALUE data){ | |
| 1843 2116 | 
             
            			long len;
         | 
| 1844 2117 | 
             
            			unicode_t *unicode;
         | 
| 1845 2118 |  | 
| 1846 | 
            -
            			len =  | 
| 2119 | 
            +
            			len = RSTRING_LEN(data) / sizeof(unicode_t);
         | 
| 1847 2120 | 
             
            			unicode = (unicode_t *)malloc(sizeof(unicode_t) * (len+1));
         | 
| 1848 2121 |  | 
| 1849 2122 | 
             
            			if (unicode == NULL) {
         | 
| 1850 2123 | 
             
            				rb_raise(rb_eNoMemError, "Couldn't allocate memory for Unicode data.");
         | 
| 1851 2124 | 
             
            			}
         | 
| 1852 2125 |  | 
| 1853 | 
            -
            			memcpy(unicode,  | 
| 2126 | 
            +
            			memcpy(unicode, RSTRING_PTR(data), sizeof(unicode_t) * len);
         | 
| 1854 2127 | 
             
            			// Unicode strings need 0x0000 at the end.
         | 
| 1855 2128 | 
             
            			unicode[len] = 0;
         | 
| 1856 2129 | 
             
            			size_t retval = self->Set(unicode);
         | 
| @@ -1859,26 +2132,26 @@ SWIGINTERN size_t ID3_Field_set_unicode(ID3_Field *self,VALUE data){ | |
| 1859 2132 | 
             
            			free(unicode);
         | 
| 1860 2133 | 
             
            			return retval;
         | 
| 1861 2134 | 
             
            		}
         | 
| 1862 | 
            -
            swig_class  | 
| 2135 | 
            +
            swig_class SwigClassTag;
         | 
| 1863 2136 |  | 
| 1864 2137 | 
             
            SWIGINTERN VALUE
         | 
| 1865 2138 | 
             
            _wrap_new_Tag__SWIG_0(int argc, VALUE *argv, VALUE self) {
         | 
| 1866 2139 | 
             
              char *arg1 = (char *) 0 ;
         | 
| 1867 | 
            -
              ID3_Tag *result = 0 ;
         | 
| 1868 2140 | 
             
              int res1 ;
         | 
| 1869 2141 | 
             
              char *buf1 = 0 ;
         | 
| 1870 2142 | 
             
              int alloc1 = 0 ;
         | 
| 2143 | 
            +
              ID3_Tag *result = 0 ;
         | 
| 1871 2144 |  | 
| 1872 2145 | 
             
              if ((argc < 1) || (argc > 1)) {
         | 
| 1873 2146 | 
             
                rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
         | 
| 1874 2147 | 
             
              }
         | 
| 1875 2148 | 
             
              res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
         | 
| 1876 2149 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 1877 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2150 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","ID3_Tag", 1, argv[0] ));
         | 
| 1878 2151 | 
             
              }
         | 
| 1879 2152 | 
             
              arg1 = reinterpret_cast< char * >(buf1);
         | 
| 1880 | 
            -
              result = (ID3_Tag *)new ID3_Tag((char const *)arg1); | 
| 1881 | 
            -
              
         | 
| 2153 | 
            +
              result = (ID3_Tag *)new ID3_Tag((char const *)arg1);
         | 
| 2154 | 
            +
              DATA_PTR(self) = result;
         | 
| 1882 2155 | 
             
              if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
         | 
| 1883 2156 | 
             
              return self;
         | 
| 1884 2157 | 
             
            fail:
         | 
| @@ -1911,8 +2184,8 @@ _wrap_new_Tag__SWIG_1(int argc, VALUE *argv, VALUE self) { | |
| 1911 2184 | 
             
              if ((argc < 0) || (argc > 0)) {
         | 
| 1912 2185 | 
             
                rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
         | 
| 1913 2186 | 
             
              }
         | 
| 1914 | 
            -
              result = (ID3_Tag *)new ID3_Tag(); | 
| 1915 | 
            -
              
         | 
| 2187 | 
            +
              result = (ID3_Tag *)new ID3_Tag();
         | 
| 2188 | 
            +
              DATA_PTR(self) = result;
         | 
| 1916 2189 | 
             
              return self;
         | 
| 1917 2190 | 
             
            fail:
         | 
| 1918 2191 | 
             
              return Qnil;
         | 
| @@ -1926,7 +2199,7 @@ SWIGINTERN VALUE _wrap_new_Tag(int nargs, VALUE *args, VALUE self) { | |
| 1926 2199 |  | 
| 1927 2200 | 
             
              argc = nargs;
         | 
| 1928 2201 | 
             
              if (argc > 1) SWIG_fail;
         | 
| 1929 | 
            -
              for (ii = 0; (ii < argc); ii | 
| 2202 | 
            +
              for (ii = 0; (ii < argc); ++ii) {
         | 
| 1930 2203 | 
             
                argv[ii] = args[ii];
         | 
| 1931 2204 | 
             
              }
         | 
| 1932 2205 | 
             
              if (argc == 0) {
         | 
| @@ -1942,7 +2215,10 @@ SWIGINTERN VALUE _wrap_new_Tag(int nargs, VALUE *args, VALUE self) { | |
| 1942 2215 | 
             
              }
         | 
| 1943 2216 |  | 
| 1944 2217 | 
             
            fail:
         | 
| 1945 | 
            -
               | 
| 2218 | 
            +
              Ruby_Format_OverloadedError( argc, 1, "Tag.new", 
         | 
| 2219 | 
            +
                "    Tag.new(char const *name)\n"
         | 
| 2220 | 
            +
                "    Tag.new()\n");
         | 
| 2221 | 
            +
              
         | 
| 1946 2222 | 
             
              return Qnil;
         | 
| 1947 2223 | 
             
            }
         | 
| 1948 2224 |  | 
| @@ -1956,11 +2232,11 @@ SWIGINTERN VALUE | |
| 1956 2232 | 
             
            _wrap_Tag_has_tag_type(int argc, VALUE *argv, VALUE self) {
         | 
| 1957 2233 | 
             
              ID3_Tag *arg1 = (ID3_Tag *) 0 ;
         | 
| 1958 2234 | 
             
              ID3_TagType arg2 ;
         | 
| 1959 | 
            -
              bool result;
         | 
| 1960 2235 | 
             
              void *argp1 = 0 ;
         | 
| 1961 2236 | 
             
              int res1 = 0 ;
         | 
| 1962 2237 | 
             
              int val2 ;
         | 
| 1963 2238 | 
             
              int ecode2 = 0 ;
         | 
| 2239 | 
            +
              bool result;
         | 
| 1964 2240 | 
             
              VALUE vresult = Qnil;
         | 
| 1965 2241 |  | 
| 1966 2242 | 
             
              if ((argc < 1) || (argc > 1)) {
         | 
| @@ -1968,12 +2244,12 @@ _wrap_Tag_has_tag_type(int argc, VALUE *argv, VALUE self) { | |
| 1968 2244 | 
             
              }
         | 
| 1969 2245 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Tag, 0 |  0 );
         | 
| 1970 2246 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 1971 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2247 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Tag const *","HasTagType", 1, self )); 
         | 
| 1972 2248 | 
             
              }
         | 
| 1973 2249 | 
             
              arg1 = reinterpret_cast< ID3_Tag * >(argp1);
         | 
| 1974 2250 | 
             
              ecode2 = SWIG_AsVal_int(argv[0], &val2);
         | 
| 1975 2251 | 
             
              if (!SWIG_IsOK(ecode2)) {
         | 
| 1976 | 
            -
                SWIG_exception_fail(SWIG_ArgError(ecode2),  | 
| 2252 | 
            +
                SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ID3_TagType","HasTagType", 2, argv[0] ));
         | 
| 1977 2253 | 
             
              } 
         | 
| 1978 2254 | 
             
              arg2 = static_cast< ID3_TagType >(val2);
         | 
| 1979 2255 | 
             
              result = (bool)((ID3_Tag const *)arg1)->HasTagType(arg2);
         | 
| @@ -1989,7 +2265,6 @@ _wrap_Tag_link__SWIG_0(int argc, VALUE *argv, VALUE self) { | |
| 1989 2265 | 
             
              ID3_Tag *arg1 = (ID3_Tag *) 0 ;
         | 
| 1990 2266 | 
             
              char *arg2 = (char *) 0 ;
         | 
| 1991 2267 | 
             
              flags_t arg3 ;
         | 
| 1992 | 
            -
              size_t result;
         | 
| 1993 2268 | 
             
              void *argp1 = 0 ;
         | 
| 1994 2269 | 
             
              int res1 = 0 ;
         | 
| 1995 2270 | 
             
              int res2 ;
         | 
| @@ -1997,6 +2272,7 @@ _wrap_Tag_link__SWIG_0(int argc, VALUE *argv, VALUE self) { | |
| 1997 2272 | 
             
              int alloc2 = 0 ;
         | 
| 1998 2273 | 
             
              unsigned int val3 ;
         | 
| 1999 2274 | 
             
              int ecode3 = 0 ;
         | 
| 2275 | 
            +
              size_t result;
         | 
| 2000 2276 | 
             
              VALUE vresult = Qnil;
         | 
| 2001 2277 |  | 
| 2002 2278 | 
             
              if ((argc < 2) || (argc > 2)) {
         | 
| @@ -2004,17 +2280,17 @@ _wrap_Tag_link__SWIG_0(int argc, VALUE *argv, VALUE self) { | |
| 2004 2280 | 
             
              }
         | 
| 2005 2281 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Tag, 0 |  0 );
         | 
| 2006 2282 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2007 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2283 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Tag *","Link", 1, self )); 
         | 
| 2008 2284 | 
             
              }
         | 
| 2009 2285 | 
             
              arg1 = reinterpret_cast< ID3_Tag * >(argp1);
         | 
| 2010 2286 | 
             
              res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
         | 
| 2011 2287 | 
             
              if (!SWIG_IsOK(res2)) {
         | 
| 2012 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res2),  | 
| 2288 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Link", 2, argv[0] ));
         | 
| 2013 2289 | 
             
              }
         | 
| 2014 2290 | 
             
              arg2 = reinterpret_cast< char * >(buf2);
         | 
| 2015 2291 | 
             
              ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
         | 
| 2016 2292 | 
             
              if (!SWIG_IsOK(ecode3)) {
         | 
| 2017 | 
            -
                SWIG_exception_fail(SWIG_ArgError(ecode3),  | 
| 2293 | 
            +
                SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "flags_t","Link", 3, argv[1] ));
         | 
| 2018 2294 | 
             
              } 
         | 
| 2019 2295 | 
             
              arg3 = static_cast< flags_t >(val3);
         | 
| 2020 2296 | 
             
              result = (arg1)->Link((char const *)arg2,arg3);
         | 
| @@ -2031,12 +2307,12 @@ SWIGINTERN VALUE | |
| 2031 2307 | 
             
            _wrap_Tag_link__SWIG_1(int argc, VALUE *argv, VALUE self) {
         | 
| 2032 2308 | 
             
              ID3_Tag *arg1 = (ID3_Tag *) 0 ;
         | 
| 2033 2309 | 
             
              char *arg2 = (char *) 0 ;
         | 
| 2034 | 
            -
              size_t result;
         | 
| 2035 2310 | 
             
              void *argp1 = 0 ;
         | 
| 2036 2311 | 
             
              int res1 = 0 ;
         | 
| 2037 2312 | 
             
              int res2 ;
         | 
| 2038 2313 | 
             
              char *buf2 = 0 ;
         | 
| 2039 2314 | 
             
              int alloc2 = 0 ;
         | 
| 2315 | 
            +
              size_t result;
         | 
| 2040 2316 | 
             
              VALUE vresult = Qnil;
         | 
| 2041 2317 |  | 
| 2042 2318 | 
             
              if ((argc < 1) || (argc > 1)) {
         | 
| @@ -2044,12 +2320,12 @@ _wrap_Tag_link__SWIG_1(int argc, VALUE *argv, VALUE self) { | |
| 2044 2320 | 
             
              }
         | 
| 2045 2321 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Tag, 0 |  0 );
         | 
| 2046 2322 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2047 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2323 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Tag *","Link", 1, self )); 
         | 
| 2048 2324 | 
             
              }
         | 
| 2049 2325 | 
             
              arg1 = reinterpret_cast< ID3_Tag * >(argp1);
         | 
| 2050 2326 | 
             
              res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
         | 
| 2051 2327 | 
             
              if (!SWIG_IsOK(res2)) {
         | 
| 2052 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res2),  | 
| 2328 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Link", 2, argv[0] ));
         | 
| 2053 2329 | 
             
              }
         | 
| 2054 2330 | 
             
              arg2 = reinterpret_cast< char * >(buf2);
         | 
| 2055 2331 | 
             
              result = (arg1)->Link((char const *)arg2);
         | 
| @@ -2070,7 +2346,7 @@ SWIGINTERN VALUE _wrap_Tag_link(int nargs, VALUE *args, VALUE self) { | |
| 2070 2346 | 
             
              argc = nargs + 1;
         | 
| 2071 2347 | 
             
              argv[0] = self;
         | 
| 2072 2348 | 
             
              if (argc > 4) SWIG_fail;
         | 
| 2073 | 
            -
              for (ii = 1; (ii < argc); ii | 
| 2349 | 
            +
              for (ii = 1; (ii < argc); ++ii) {
         | 
| 2074 2350 | 
             
                argv[ii] = args[ii-1];
         | 
| 2075 2351 | 
             
              }
         | 
| 2076 2352 | 
             
              if (argc == 2) {
         | 
| @@ -2107,7 +2383,10 @@ SWIGINTERN VALUE _wrap_Tag_link(int nargs, VALUE *args, VALUE self) { | |
| 2107 2383 | 
             
              }
         | 
| 2108 2384 |  | 
| 2109 2385 | 
             
            fail:
         | 
| 2110 | 
            -
               | 
| 2386 | 
            +
              Ruby_Format_OverloadedError( argc, 4, "Tag.link", 
         | 
| 2387 | 
            +
                "    size_t Tag.link(char const *filename, flags_t flags)\n"
         | 
| 2388 | 
            +
                "    size_t Tag.link(char const *filename)\n");
         | 
| 2389 | 
            +
              
         | 
| 2111 2390 | 
             
              return Qnil;
         | 
| 2112 2391 | 
             
            }
         | 
| 2113 2392 |  | 
| @@ -2116,11 +2395,11 @@ SWIGINTERN VALUE | |
| 2116 2395 | 
             
            _wrap_Tag_update__SWIG_0(int argc, VALUE *argv, VALUE self) {
         | 
| 2117 2396 | 
             
              ID3_Tag *arg1 = (ID3_Tag *) 0 ;
         | 
| 2118 2397 | 
             
              flags_t arg2 ;
         | 
| 2119 | 
            -
              flags_t result;
         | 
| 2120 2398 | 
             
              void *argp1 = 0 ;
         | 
| 2121 2399 | 
             
              int res1 = 0 ;
         | 
| 2122 2400 | 
             
              unsigned int val2 ;
         | 
| 2123 2401 | 
             
              int ecode2 = 0 ;
         | 
| 2402 | 
            +
              flags_t result;
         | 
| 2124 2403 | 
             
              VALUE vresult = Qnil;
         | 
| 2125 2404 |  | 
| 2126 2405 | 
             
              if ((argc < 1) || (argc > 1)) {
         | 
| @@ -2128,12 +2407,12 @@ _wrap_Tag_update__SWIG_0(int argc, VALUE *argv, VALUE self) { | |
| 2128 2407 | 
             
              }
         | 
| 2129 2408 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Tag, 0 |  0 );
         | 
| 2130 2409 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2131 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2410 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Tag *","Update", 1, self )); 
         | 
| 2132 2411 | 
             
              }
         | 
| 2133 2412 | 
             
              arg1 = reinterpret_cast< ID3_Tag * >(argp1);
         | 
| 2134 2413 | 
             
              ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
         | 
| 2135 2414 | 
             
              if (!SWIG_IsOK(ecode2)) {
         | 
| 2136 | 
            -
                SWIG_exception_fail(SWIG_ArgError(ecode2),  | 
| 2415 | 
            +
                SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "flags_t","Update", 2, argv[0] ));
         | 
| 2137 2416 | 
             
              } 
         | 
| 2138 2417 | 
             
              arg2 = static_cast< flags_t >(val2);
         | 
| 2139 2418 | 
             
              result = (flags_t)(arg1)->Update(arg2);
         | 
| @@ -2147,9 +2426,9 @@ fail: | |
| 2147 2426 | 
             
            SWIGINTERN VALUE
         | 
| 2148 2427 | 
             
            _wrap_Tag_update__SWIG_1(int argc, VALUE *argv, VALUE self) {
         | 
| 2149 2428 | 
             
              ID3_Tag *arg1 = (ID3_Tag *) 0 ;
         | 
| 2150 | 
            -
              flags_t result;
         | 
| 2151 2429 | 
             
              void *argp1 = 0 ;
         | 
| 2152 2430 | 
             
              int res1 = 0 ;
         | 
| 2431 | 
            +
              flags_t result;
         | 
| 2153 2432 | 
             
              VALUE vresult = Qnil;
         | 
| 2154 2433 |  | 
| 2155 2434 | 
             
              if ((argc < 0) || (argc > 0)) {
         | 
| @@ -2157,7 +2436,7 @@ _wrap_Tag_update__SWIG_1(int argc, VALUE *argv, VALUE self) { | |
| 2157 2436 | 
             
              }
         | 
| 2158 2437 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Tag, 0 |  0 );
         | 
| 2159 2438 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2160 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2439 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Tag *","Update", 1, self )); 
         | 
| 2161 2440 | 
             
              }
         | 
| 2162 2441 | 
             
              arg1 = reinterpret_cast< ID3_Tag * >(argp1);
         | 
| 2163 2442 | 
             
              result = (flags_t)(arg1)->Update();
         | 
| @@ -2176,7 +2455,7 @@ SWIGINTERN VALUE _wrap_Tag_update(int nargs, VALUE *args, VALUE self) { | |
| 2176 2455 | 
             
              argc = nargs + 1;
         | 
| 2177 2456 | 
             
              argv[0] = self;
         | 
| 2178 2457 | 
             
              if (argc > 3) SWIG_fail;
         | 
| 2179 | 
            -
              for (ii = 1; (ii < argc); ii | 
| 2458 | 
            +
              for (ii = 1; (ii < argc); ++ii) {
         | 
| 2180 2459 | 
             
                argv[ii] = args[ii-1];
         | 
| 2181 2460 | 
             
              }
         | 
| 2182 2461 | 
             
              if (argc == 1) {
         | 
| @@ -2205,7 +2484,10 @@ SWIGINTERN VALUE _wrap_Tag_update(int nargs, VALUE *args, VALUE self) { | |
| 2205 2484 | 
             
              }
         | 
| 2206 2485 |  | 
| 2207 2486 | 
             
            fail:
         | 
| 2208 | 
            -
               | 
| 2487 | 
            +
              Ruby_Format_OverloadedError( argc, 3, "Tag.update", 
         | 
| 2488 | 
            +
                "    flags_t Tag.update(flags_t flags)\n"
         | 
| 2489 | 
            +
                "    flags_t Tag.update()\n");
         | 
| 2490 | 
            +
              
         | 
| 2209 2491 | 
             
              return Qnil;
         | 
| 2210 2492 | 
             
            }
         | 
| 2211 2493 |  | 
| @@ -2214,11 +2496,11 @@ SWIGINTERN VALUE | |
| 2214 2496 | 
             
            _wrap_Tag_strip__SWIG_0(int argc, VALUE *argv, VALUE self) {
         | 
| 2215 2497 | 
             
              ID3_Tag *arg1 = (ID3_Tag *) 0 ;
         | 
| 2216 2498 | 
             
              flags_t arg2 ;
         | 
| 2217 | 
            -
              flags_t result;
         | 
| 2218 2499 | 
             
              void *argp1 = 0 ;
         | 
| 2219 2500 | 
             
              int res1 = 0 ;
         | 
| 2220 2501 | 
             
              unsigned int val2 ;
         | 
| 2221 2502 | 
             
              int ecode2 = 0 ;
         | 
| 2503 | 
            +
              flags_t result;
         | 
| 2222 2504 | 
             
              VALUE vresult = Qnil;
         | 
| 2223 2505 |  | 
| 2224 2506 | 
             
              if ((argc < 1) || (argc > 1)) {
         | 
| @@ -2226,12 +2508,12 @@ _wrap_Tag_strip__SWIG_0(int argc, VALUE *argv, VALUE self) { | |
| 2226 2508 | 
             
              }
         | 
| 2227 2509 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Tag, 0 |  0 );
         | 
| 2228 2510 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2229 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2511 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Tag *","Strip", 1, self )); 
         | 
| 2230 2512 | 
             
              }
         | 
| 2231 2513 | 
             
              arg1 = reinterpret_cast< ID3_Tag * >(argp1);
         | 
| 2232 2514 | 
             
              ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
         | 
| 2233 2515 | 
             
              if (!SWIG_IsOK(ecode2)) {
         | 
| 2234 | 
            -
                SWIG_exception_fail(SWIG_ArgError(ecode2),  | 
| 2516 | 
            +
                SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "flags_t","Strip", 2, argv[0] ));
         | 
| 2235 2517 | 
             
              } 
         | 
| 2236 2518 | 
             
              arg2 = static_cast< flags_t >(val2);
         | 
| 2237 2519 | 
             
              result = (flags_t)(arg1)->Strip(arg2);
         | 
| @@ -2245,9 +2527,9 @@ fail: | |
| 2245 2527 | 
             
            SWIGINTERN VALUE
         | 
| 2246 2528 | 
             
            _wrap_Tag_strip__SWIG_1(int argc, VALUE *argv, VALUE self) {
         | 
| 2247 2529 | 
             
              ID3_Tag *arg1 = (ID3_Tag *) 0 ;
         | 
| 2248 | 
            -
              flags_t result;
         | 
| 2249 2530 | 
             
              void *argp1 = 0 ;
         | 
| 2250 2531 | 
             
              int res1 = 0 ;
         | 
| 2532 | 
            +
              flags_t result;
         | 
| 2251 2533 | 
             
              VALUE vresult = Qnil;
         | 
| 2252 2534 |  | 
| 2253 2535 | 
             
              if ((argc < 0) || (argc > 0)) {
         | 
| @@ -2255,7 +2537,7 @@ _wrap_Tag_strip__SWIG_1(int argc, VALUE *argv, VALUE self) { | |
| 2255 2537 | 
             
              }
         | 
| 2256 2538 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Tag, 0 |  0 );
         | 
| 2257 2539 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2258 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2540 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Tag *","Strip", 1, self )); 
         | 
| 2259 2541 | 
             
              }
         | 
| 2260 2542 | 
             
              arg1 = reinterpret_cast< ID3_Tag * >(argp1);
         | 
| 2261 2543 | 
             
              result = (flags_t)(arg1)->Strip();
         | 
| @@ -2274,7 +2556,7 @@ SWIGINTERN VALUE _wrap_Tag_strip(int nargs, VALUE *args, VALUE self) { | |
| 2274 2556 | 
             
              argc = nargs + 1;
         | 
| 2275 2557 | 
             
              argv[0] = self;
         | 
| 2276 2558 | 
             
              if (argc > 3) SWIG_fail;
         | 
| 2277 | 
            -
              for (ii = 1; (ii < argc); ii | 
| 2559 | 
            +
              for (ii = 1; (ii < argc); ++ii) {
         | 
| 2278 2560 | 
             
                argv[ii] = args[ii-1];
         | 
| 2279 2561 | 
             
              }
         | 
| 2280 2562 | 
             
              if (argc == 1) {
         | 
| @@ -2303,7 +2585,10 @@ SWIGINTERN VALUE _wrap_Tag_strip(int nargs, VALUE *args, VALUE self) { | |
| 2303 2585 | 
             
              }
         | 
| 2304 2586 |  | 
| 2305 2587 | 
             
            fail:
         | 
| 2306 | 
            -
               | 
| 2588 | 
            +
              Ruby_Format_OverloadedError( argc, 3, "Tag.strip", 
         | 
| 2589 | 
            +
                "    flags_t Tag.strip(flags_t flags)\n"
         | 
| 2590 | 
            +
                "    flags_t Tag.strip()\n");
         | 
| 2591 | 
            +
              
         | 
| 2307 2592 | 
             
              return Qnil;
         | 
| 2308 2593 | 
             
            }
         | 
| 2309 2594 |  | 
| @@ -2319,7 +2604,7 @@ _wrap_Tag_clear(int argc, VALUE *argv, VALUE self) { | |
| 2319 2604 | 
             
              }
         | 
| 2320 2605 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Tag, 0 |  0 );
         | 
| 2321 2606 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2322 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2607 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Tag *","Clear", 1, self )); 
         | 
| 2323 2608 | 
             
              }
         | 
| 2324 2609 | 
             
              arg1 = reinterpret_cast< ID3_Tag * >(argp1);
         | 
| 2325 2610 | 
             
              (arg1)->Clear();
         | 
| @@ -2333,11 +2618,11 @@ SWIGINTERN VALUE | |
| 2333 2618 | 
             
            _wrap_Tag_remove_frame(int argc, VALUE *argv, VALUE self) {
         | 
| 2334 2619 | 
             
              ID3_Tag *arg1 = (ID3_Tag *) 0 ;
         | 
| 2335 2620 | 
             
              ID3_Frame *arg2 = (ID3_Frame *) 0 ;
         | 
| 2336 | 
            -
              ID3_Frame *result = 0 ;
         | 
| 2337 2621 | 
             
              void *argp1 = 0 ;
         | 
| 2338 2622 | 
             
              int res1 = 0 ;
         | 
| 2339 2623 | 
             
              void *argp2 = 0 ;
         | 
| 2340 2624 | 
             
              int res2 = 0 ;
         | 
| 2625 | 
            +
              ID3_Frame *result = 0 ;
         | 
| 2341 2626 | 
             
              VALUE vresult = Qnil;
         | 
| 2342 2627 |  | 
| 2343 2628 | 
             
              if ((argc < 1) || (argc > 1)) {
         | 
| @@ -2345,12 +2630,12 @@ _wrap_Tag_remove_frame(int argc, VALUE *argv, VALUE self) { | |
| 2345 2630 | 
             
              }
         | 
| 2346 2631 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Tag, 0 |  0 );
         | 
| 2347 2632 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2348 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2633 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Tag *","RemoveFrame", 1, self )); 
         | 
| 2349 2634 | 
             
              }
         | 
| 2350 2635 | 
             
              arg1 = reinterpret_cast< ID3_Tag * >(argp1);
         | 
| 2351 2636 | 
             
              res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ID3_Frame, 0 |  0 );
         | 
| 2352 2637 | 
             
              if (!SWIG_IsOK(res2)) {
         | 
| 2353 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res2),  | 
| 2638 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ID3_Frame const *","RemoveFrame", 2, argv[0] )); 
         | 
| 2354 2639 | 
             
              }
         | 
| 2355 2640 | 
             
              arg2 = reinterpret_cast< ID3_Frame * >(argp2);
         | 
| 2356 2641 | 
             
              result = (ID3_Frame *)(arg1)->RemoveFrame((ID3_Frame const *)arg2);
         | 
| @@ -2375,12 +2660,12 @@ _wrap_Tag_add_frame(int argc, VALUE *argv, VALUE self) { | |
| 2375 2660 | 
             
              }
         | 
| 2376 2661 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Tag, 0 |  0 );
         | 
| 2377 2662 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2378 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2663 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Tag *","AddFrame", 1, self )); 
         | 
| 2379 2664 | 
             
              }
         | 
| 2380 2665 | 
             
              arg1 = reinterpret_cast< ID3_Tag * >(argp1);
         | 
| 2381 2666 | 
             
              res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ID3_Frame, 0 |  0 );
         | 
| 2382 2667 | 
             
              if (!SWIG_IsOK(res2)) {
         | 
| 2383 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res2),  | 
| 2668 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ID3_Frame const *","AddFrame", 2, argv[0] )); 
         | 
| 2384 2669 | 
             
              }
         | 
| 2385 2670 | 
             
              arg2 = reinterpret_cast< ID3_Frame * >(argp2);
         | 
| 2386 2671 | 
             
              (arg1)->AddFrame((ID3_Frame const *)arg2);
         | 
| @@ -2393,9 +2678,9 @@ fail: | |
| 2393 2678 | 
             
            SWIGINTERN VALUE
         | 
| 2394 2679 | 
             
            _wrap_Tag_get_filename(int argc, VALUE *argv, VALUE self) {
         | 
| 2395 2680 | 
             
              ID3_Tag *arg1 = (ID3_Tag *) 0 ;
         | 
| 2396 | 
            -
              char *result = 0 ;
         | 
| 2397 2681 | 
             
              void *argp1 = 0 ;
         | 
| 2398 2682 | 
             
              int res1 = 0 ;
         | 
| 2683 | 
            +
              char *result = 0 ;
         | 
| 2399 2684 | 
             
              VALUE vresult = Qnil;
         | 
| 2400 2685 |  | 
| 2401 2686 | 
             
              if ((argc < 0) || (argc > 0)) {
         | 
| @@ -2403,7 +2688,7 @@ _wrap_Tag_get_filename(int argc, VALUE *argv, VALUE self) { | |
| 2403 2688 | 
             
              }
         | 
| 2404 2689 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Tag, 0 |  0 );
         | 
| 2405 2690 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2406 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2691 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Tag const *","GetFileName", 1, self )); 
         | 
| 2407 2692 | 
             
              }
         | 
| 2408 2693 | 
             
              arg1 = reinterpret_cast< ID3_Tag * >(argp1);
         | 
| 2409 2694 | 
             
              result = (char *)((ID3_Tag const *)arg1)->GetFileName();
         | 
| @@ -2418,11 +2703,11 @@ SWIGINTERN VALUE | |
| 2418 2703 | 
             
            _wrap_Tag_set_padding(int argc, VALUE *argv, VALUE self) {
         | 
| 2419 2704 | 
             
              ID3_Tag *arg1 = (ID3_Tag *) 0 ;
         | 
| 2420 2705 | 
             
              bool arg2 ;
         | 
| 2421 | 
            -
              bool result;
         | 
| 2422 2706 | 
             
              void *argp1 = 0 ;
         | 
| 2423 2707 | 
             
              int res1 = 0 ;
         | 
| 2424 2708 | 
             
              bool val2 ;
         | 
| 2425 2709 | 
             
              int ecode2 = 0 ;
         | 
| 2710 | 
            +
              bool result;
         | 
| 2426 2711 | 
             
              VALUE vresult = Qnil;
         | 
| 2427 2712 |  | 
| 2428 2713 | 
             
              if ((argc < 1) || (argc > 1)) {
         | 
| @@ -2430,12 +2715,12 @@ _wrap_Tag_set_padding(int argc, VALUE *argv, VALUE self) { | |
| 2430 2715 | 
             
              }
         | 
| 2431 2716 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Tag, 0 |  0 );
         | 
| 2432 2717 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2433 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2718 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Tag *","SetPadding", 1, self )); 
         | 
| 2434 2719 | 
             
              }
         | 
| 2435 2720 | 
             
              arg1 = reinterpret_cast< ID3_Tag * >(argp1);
         | 
| 2436 2721 | 
             
              ecode2 = SWIG_AsVal_bool(argv[0], &val2);
         | 
| 2437 2722 | 
             
              if (!SWIG_IsOK(ecode2)) {
         | 
| 2438 | 
            -
                SWIG_exception_fail(SWIG_ArgError(ecode2),  | 
| 2723 | 
            +
                SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","SetPadding", 2, argv[0] ));
         | 
| 2439 2724 | 
             
              } 
         | 
| 2440 2725 | 
             
              arg2 = static_cast< bool >(val2);
         | 
| 2441 2726 | 
             
              result = (bool)(arg1)->SetPadding(arg2);
         | 
| @@ -2449,9 +2734,9 @@ fail: | |
| 2449 2734 | 
             
            SWIGINTERN VALUE
         | 
| 2450 2735 | 
             
            _wrap_Tag_size(int argc, VALUE *argv, VALUE self) {
         | 
| 2451 2736 | 
             
              ID3_Tag *arg1 = (ID3_Tag *) 0 ;
         | 
| 2452 | 
            -
              size_t result;
         | 
| 2453 2737 | 
             
              void *argp1 = 0 ;
         | 
| 2454 2738 | 
             
              int res1 = 0 ;
         | 
| 2739 | 
            +
              size_t result;
         | 
| 2455 2740 | 
             
              VALUE vresult = Qnil;
         | 
| 2456 2741 |  | 
| 2457 2742 | 
             
              if ((argc < 0) || (argc > 0)) {
         | 
| @@ -2459,7 +2744,7 @@ _wrap_Tag_size(int argc, VALUE *argv, VALUE self) { | |
| 2459 2744 | 
             
              }
         | 
| 2460 2745 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Tag, 0 |  0 );
         | 
| 2461 2746 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2462 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2747 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Tag const *","Size", 1, self )); 
         | 
| 2463 2748 | 
             
              }
         | 
| 2464 2749 | 
             
              arg1 = reinterpret_cast< ID3_Tag * >(argp1);
         | 
| 2465 2750 | 
             
              result = ((ID3_Tag const *)arg1)->Size();
         | 
| @@ -2474,11 +2759,11 @@ SWIGINTERN VALUE | |
| 2474 2759 | 
             
            _wrap_Tag_find(int argc, VALUE *argv, VALUE self) {
         | 
| 2475 2760 | 
             
              ID3_Tag *arg1 = (ID3_Tag *) 0 ;
         | 
| 2476 2761 | 
             
              ID3_FrameID arg2 ;
         | 
| 2477 | 
            -
              ID3_Frame *result = 0 ;
         | 
| 2478 2762 | 
             
              void *argp1 = 0 ;
         | 
| 2479 2763 | 
             
              int res1 = 0 ;
         | 
| 2480 2764 | 
             
              int val2 ;
         | 
| 2481 2765 | 
             
              int ecode2 = 0 ;
         | 
| 2766 | 
            +
              ID3_Frame *result = 0 ;
         | 
| 2482 2767 | 
             
              VALUE vresult = Qnil;
         | 
| 2483 2768 |  | 
| 2484 2769 | 
             
              if ((argc < 1) || (argc > 1)) {
         | 
| @@ -2486,12 +2771,12 @@ _wrap_Tag_find(int argc, VALUE *argv, VALUE self) { | |
| 2486 2771 | 
             
              }
         | 
| 2487 2772 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Tag, 0 |  0 );
         | 
| 2488 2773 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2489 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2774 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Tag const *","Find", 1, self )); 
         | 
| 2490 2775 | 
             
              }
         | 
| 2491 2776 | 
             
              arg1 = reinterpret_cast< ID3_Tag * >(argp1);
         | 
| 2492 2777 | 
             
              ecode2 = SWIG_AsVal_int(argv[0], &val2);
         | 
| 2493 2778 | 
             
              if (!SWIG_IsOK(ecode2)) {
         | 
| 2494 | 
            -
                SWIG_exception_fail(SWIG_ArgError(ecode2),  | 
| 2779 | 
            +
                SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ID3_FrameID","Find", 2, argv[0] ));
         | 
| 2495 2780 | 
             
              } 
         | 
| 2496 2781 | 
             
              arg2 = static_cast< ID3_FrameID >(val2);
         | 
| 2497 2782 | 
             
              result = (ID3_Frame *)((ID3_Tag const *)arg1)->Find(arg2);
         | 
| @@ -2505,9 +2790,9 @@ fail: | |
| 2505 2790 | 
             
            SWIGINTERN VALUE
         | 
| 2506 2791 | 
             
            _wrap_Tag_create_iterator(int argc, VALUE *argv, VALUE self) {
         | 
| 2507 2792 | 
             
              ID3_Tag *arg1 = (ID3_Tag *) 0 ;
         | 
| 2508 | 
            -
              ID3_Tag::Iterator *result = 0 ;
         | 
| 2509 2793 | 
             
              void *argp1 = 0 ;
         | 
| 2510 2794 | 
             
              int res1 = 0 ;
         | 
| 2795 | 
            +
              ID3_Tag::Iterator *result = 0 ;
         | 
| 2511 2796 | 
             
              VALUE vresult = Qnil;
         | 
| 2512 2797 |  | 
| 2513 2798 | 
             
              if ((argc < 0) || (argc > 0)) {
         | 
| @@ -2515,7 +2800,7 @@ _wrap_Tag_create_iterator(int argc, VALUE *argv, VALUE self) { | |
| 2515 2800 | 
             
              }
         | 
| 2516 2801 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Tag, 0 |  0 );
         | 
| 2517 2802 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2518 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2803 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Tag *","CreateIterator", 1, self )); 
         | 
| 2519 2804 | 
             
              }
         | 
| 2520 2805 | 
             
              arg1 = reinterpret_cast< ID3_Tag * >(argp1);
         | 
| 2521 2806 | 
             
              result = (ID3_Tag::Iterator *)(arg1)->CreateIterator();
         | 
| @@ -2526,14 +2811,14 @@ fail: | |
| 2526 2811 | 
             
            }
         | 
| 2527 2812 |  | 
| 2528 2813 |  | 
| 2529 | 
            -
            swig_class  | 
| 2814 | 
            +
            swig_class SwigClassTag_Iterator;
         | 
| 2530 2815 |  | 
| 2531 2816 | 
             
            SWIGINTERN VALUE
         | 
| 2532 2817 | 
             
            _wrap_Tag_Iterator_get_next(int argc, VALUE *argv, VALUE self) {
         | 
| 2533 2818 | 
             
              ID3_Tag::Iterator *arg1 = (ID3_Tag::Iterator *) 0 ;
         | 
| 2534 | 
            -
              ID3_Frame *result = 0 ;
         | 
| 2535 2819 | 
             
              void *argp1 = 0 ;
         | 
| 2536 2820 | 
             
              int res1 = 0 ;
         | 
| 2821 | 
            +
              ID3_Frame *result = 0 ;
         | 
| 2537 2822 | 
             
              VALUE vresult = Qnil;
         | 
| 2538 2823 |  | 
| 2539 2824 | 
             
              if ((argc < 0) || (argc > 0)) {
         | 
| @@ -2541,7 +2826,7 @@ _wrap_Tag_Iterator_get_next(int argc, VALUE *argv, VALUE self) { | |
| 2541 2826 | 
             
              }
         | 
| 2542 2827 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Tag__Iterator, 0 |  0 );
         | 
| 2543 2828 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2544 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2829 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Tag::Iterator *","GetNext", 1, self )); 
         | 
| 2545 2830 | 
             
              }
         | 
| 2546 2831 | 
             
              arg1 = reinterpret_cast< ID3_Tag::Iterator * >(argp1);
         | 
| 2547 2832 | 
             
              result = (ID3_Frame *)(arg1)->GetNext();
         | 
| @@ -2557,25 +2842,25 @@ free_ID3_Tag_Iterator(ID3_Tag::Iterator *arg1) { | |
| 2557 2842 | 
             
                delete arg1;
         | 
| 2558 2843 | 
             
            }
         | 
| 2559 2844 |  | 
| 2560 | 
            -
            swig_class  | 
| 2845 | 
            +
            swig_class SwigClassFrame;
         | 
| 2561 2846 |  | 
| 2562 2847 | 
             
            SWIGINTERN VALUE
         | 
| 2563 2848 | 
             
            _wrap_new_Frame__SWIG_0(int argc, VALUE *argv, VALUE self) {
         | 
| 2564 2849 | 
             
              ID3_FrameID arg1 ;
         | 
| 2565 | 
            -
              ID3_Frame *result = 0 ;
         | 
| 2566 2850 | 
             
              int val1 ;
         | 
| 2567 2851 | 
             
              int ecode1 = 0 ;
         | 
| 2852 | 
            +
              ID3_Frame *result = 0 ;
         | 
| 2568 2853 |  | 
| 2569 2854 | 
             
              if ((argc < 1) || (argc > 1)) {
         | 
| 2570 2855 | 
             
                rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
         | 
| 2571 2856 | 
             
              }
         | 
| 2572 2857 | 
             
              ecode1 = SWIG_AsVal_int(argv[0], &val1);
         | 
| 2573 2858 | 
             
              if (!SWIG_IsOK(ecode1)) {
         | 
| 2574 | 
            -
                SWIG_exception_fail(SWIG_ArgError(ecode1),  | 
| 2859 | 
            +
                SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "ID3_FrameID","ID3_Frame", 1, argv[0] ));
         | 
| 2575 2860 | 
             
              } 
         | 
| 2576 2861 | 
             
              arg1 = static_cast< ID3_FrameID >(val1);
         | 
| 2577 | 
            -
              result = (ID3_Frame *)new ID3_Frame(arg1); | 
| 2578 | 
            -
              
         | 
| 2862 | 
            +
              result = (ID3_Frame *)new ID3_Frame(arg1);
         | 
| 2863 | 
            +
              DATA_PTR(self) = result;
         | 
| 2579 2864 | 
             
              return self;
         | 
| 2580 2865 | 
             
            fail:
         | 
| 2581 2866 | 
             
              return Qnil;
         | 
| @@ -2606,8 +2891,8 @@ _wrap_new_Frame__SWIG_1(int argc, VALUE *argv, VALUE self) { | |
| 2606 2891 | 
             
              if ((argc < 0) || (argc > 0)) {
         | 
| 2607 2892 | 
             
                rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
         | 
| 2608 2893 | 
             
              }
         | 
| 2609 | 
            -
              result = (ID3_Frame *)new ID3_Frame(); | 
| 2610 | 
            -
              
         | 
| 2894 | 
            +
              result = (ID3_Frame *)new ID3_Frame();
         | 
| 2895 | 
            +
              DATA_PTR(self) = result;
         | 
| 2611 2896 | 
             
              return self;
         | 
| 2612 2897 | 
             
            fail:
         | 
| 2613 2898 | 
             
              return Qnil;
         | 
| @@ -2621,7 +2906,7 @@ SWIGINTERN VALUE _wrap_new_Frame(int nargs, VALUE *args, VALUE self) { | |
| 2621 2906 |  | 
| 2622 2907 | 
             
              argc = nargs;
         | 
| 2623 2908 | 
             
              if (argc > 1) SWIG_fail;
         | 
| 2624 | 
            -
              for (ii = 0; (ii < argc); ii | 
| 2909 | 
            +
              for (ii = 0; (ii < argc); ++ii) {
         | 
| 2625 2910 | 
             
                argv[ii] = args[ii];
         | 
| 2626 2911 | 
             
              }
         | 
| 2627 2912 | 
             
              if (argc == 0) {
         | 
| @@ -2639,7 +2924,10 @@ SWIGINTERN VALUE _wrap_new_Frame(int nargs, VALUE *args, VALUE self) { | |
| 2639 2924 | 
             
              }
         | 
| 2640 2925 |  | 
| 2641 2926 | 
             
            fail:
         | 
| 2642 | 
            -
               | 
| 2927 | 
            +
              Ruby_Format_OverloadedError( argc, 1, "Frame.new", 
         | 
| 2928 | 
            +
                "    Frame.new(ID3_FrameID id)\n"
         | 
| 2929 | 
            +
                "    Frame.new()\n");
         | 
| 2930 | 
            +
              
         | 
| 2643 2931 | 
             
              return Qnil;
         | 
| 2644 2932 | 
             
            }
         | 
| 2645 2933 |  | 
| @@ -2653,11 +2941,11 @@ SWIGINTERN VALUE | |
| 2653 2941 | 
             
            _wrap_Frame_get_field(int argc, VALUE *argv, VALUE self) {
         | 
| 2654 2942 | 
             
              ID3_Frame *arg1 = (ID3_Frame *) 0 ;
         | 
| 2655 2943 | 
             
              ID3_FieldID arg2 ;
         | 
| 2656 | 
            -
              ID3_Field *result = 0 ;
         | 
| 2657 2944 | 
             
              void *argp1 = 0 ;
         | 
| 2658 2945 | 
             
              int res1 = 0 ;
         | 
| 2659 2946 | 
             
              int val2 ;
         | 
| 2660 2947 | 
             
              int ecode2 = 0 ;
         | 
| 2948 | 
            +
              ID3_Field *result = 0 ;
         | 
| 2661 2949 | 
             
              VALUE vresult = Qnil;
         | 
| 2662 2950 |  | 
| 2663 2951 | 
             
              if ((argc < 1) || (argc > 1)) {
         | 
| @@ -2665,12 +2953,12 @@ _wrap_Frame_get_field(int argc, VALUE *argv, VALUE self) { | |
| 2665 2953 | 
             
              }
         | 
| 2666 2954 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Frame, 0 |  0 );
         | 
| 2667 2955 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2668 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2956 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Frame const *","GetField", 1, self )); 
         | 
| 2669 2957 | 
             
              }
         | 
| 2670 2958 | 
             
              arg1 = reinterpret_cast< ID3_Frame * >(argp1);
         | 
| 2671 2959 | 
             
              ecode2 = SWIG_AsVal_int(argv[0], &val2);
         | 
| 2672 2960 | 
             
              if (!SWIG_IsOK(ecode2)) {
         | 
| 2673 | 
            -
                SWIG_exception_fail(SWIG_ArgError(ecode2),  | 
| 2961 | 
            +
                SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ID3_FieldID","GetField", 2, argv[0] ));
         | 
| 2674 2962 | 
             
              } 
         | 
| 2675 2963 | 
             
              arg2 = static_cast< ID3_FieldID >(val2);
         | 
| 2676 2964 | 
             
              result = (ID3_Field *)((ID3_Frame const *)arg1)->GetField(arg2);
         | 
| @@ -2684,9 +2972,9 @@ fail: | |
| 2684 2972 | 
             
            SWIGINTERN VALUE
         | 
| 2685 2973 | 
             
            _wrap_Frame_get_id(int argc, VALUE *argv, VALUE self) {
         | 
| 2686 2974 | 
             
              ID3_Frame *arg1 = (ID3_Frame *) 0 ;
         | 
| 2687 | 
            -
              ID3_FrameID result;
         | 
| 2688 2975 | 
             
              void *argp1 = 0 ;
         | 
| 2689 2976 | 
             
              int res1 = 0 ;
         | 
| 2977 | 
            +
              ID3_FrameID result;
         | 
| 2690 2978 | 
             
              VALUE vresult = Qnil;
         | 
| 2691 2979 |  | 
| 2692 2980 | 
             
              if ((argc < 0) || (argc > 0)) {
         | 
| @@ -2694,7 +2982,7 @@ _wrap_Frame_get_id(int argc, VALUE *argv, VALUE self) { | |
| 2694 2982 | 
             
              }
         | 
| 2695 2983 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Frame, 0 |  0 );
         | 
| 2696 2984 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2697 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 2985 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Frame const *","GetID", 1, self )); 
         | 
| 2698 2986 | 
             
              }
         | 
| 2699 2987 | 
             
              arg1 = reinterpret_cast< ID3_Frame * >(argp1);
         | 
| 2700 2988 | 
             
              result = (ID3_FrameID)((ID3_Frame const *)arg1)->GetID();
         | 
| @@ -2705,14 +2993,14 @@ fail: | |
| 2705 2993 | 
             
            }
         | 
| 2706 2994 |  | 
| 2707 2995 |  | 
| 2708 | 
            -
            swig_class  | 
| 2996 | 
            +
            swig_class SwigClassField;
         | 
| 2709 2997 |  | 
| 2710 2998 | 
             
            SWIGINTERN VALUE
         | 
| 2711 2999 | 
             
            _wrap_Field_get_type(int argc, VALUE *argv, VALUE self) {
         | 
| 2712 3000 | 
             
              ID3_Field *arg1 = (ID3_Field *) 0 ;
         | 
| 2713 | 
            -
              ID3_FieldType result;
         | 
| 2714 3001 | 
             
              void *argp1 = 0 ;
         | 
| 2715 3002 | 
             
              int res1 = 0 ;
         | 
| 3003 | 
            +
              ID3_FieldType result;
         | 
| 2716 3004 | 
             
              VALUE vresult = Qnil;
         | 
| 2717 3005 |  | 
| 2718 3006 | 
             
              if ((argc < 0) || (argc > 0)) {
         | 
| @@ -2720,7 +3008,7 @@ _wrap_Field_get_type(int argc, VALUE *argv, VALUE self) { | |
| 2720 3008 | 
             
              }
         | 
| 2721 3009 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Field, 0 |  0 );
         | 
| 2722 3010 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2723 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 3011 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Field const *","GetType", 1, self )); 
         | 
| 2724 3012 | 
             
              }
         | 
| 2725 3013 | 
             
              arg1 = reinterpret_cast< ID3_Field * >(argp1);
         | 
| 2726 3014 | 
             
              result = (ID3_FieldType)((ID3_Field const *)arg1)->GetType();
         | 
| @@ -2734,9 +3022,9 @@ fail: | |
| 2734 3022 | 
             
            SWIGINTERN VALUE
         | 
| 2735 3023 | 
             
            _wrap_Field_get_encoding(int argc, VALUE *argv, VALUE self) {
         | 
| 2736 3024 | 
             
              ID3_Field *arg1 = (ID3_Field *) 0 ;
         | 
| 2737 | 
            -
              ID3_TextEnc result;
         | 
| 2738 3025 | 
             
              void *argp1 = 0 ;
         | 
| 2739 3026 | 
             
              int res1 = 0 ;
         | 
| 3027 | 
            +
              ID3_TextEnc result;
         | 
| 2740 3028 | 
             
              VALUE vresult = Qnil;
         | 
| 2741 3029 |  | 
| 2742 3030 | 
             
              if ((argc < 0) || (argc > 0)) {
         | 
| @@ -2744,7 +3032,7 @@ _wrap_Field_get_encoding(int argc, VALUE *argv, VALUE self) { | |
| 2744 3032 | 
             
              }
         | 
| 2745 3033 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Field, 0 |  0 );
         | 
| 2746 3034 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2747 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 3035 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Field const *","GetEncoding", 1, self )); 
         | 
| 2748 3036 | 
             
              }
         | 
| 2749 3037 | 
             
              arg1 = reinterpret_cast< ID3_Field * >(argp1);
         | 
| 2750 3038 | 
             
              result = (ID3_TextEnc)((ID3_Field const *)arg1)->GetEncoding();
         | 
| @@ -2758,9 +3046,9 @@ fail: | |
| 2758 3046 | 
             
            SWIGINTERN VALUE
         | 
| 2759 3047 | 
             
            _wrap_Field_get_integer(int argc, VALUE *argv, VALUE self) {
         | 
| 2760 3048 | 
             
              ID3_Field *arg1 = (ID3_Field *) 0 ;
         | 
| 2761 | 
            -
              unsigned long result;
         | 
| 2762 3049 | 
             
              void *argp1 = 0 ;
         | 
| 2763 3050 | 
             
              int res1 = 0 ;
         | 
| 3051 | 
            +
              uint32 result;
         | 
| 2764 3052 | 
             
              VALUE vresult = Qnil;
         | 
| 2765 3053 |  | 
| 2766 3054 | 
             
              if ((argc < 0) || (argc > 0)) {
         | 
| @@ -2768,10 +3056,10 @@ _wrap_Field_get_integer(int argc, VALUE *argv, VALUE self) { | |
| 2768 3056 | 
             
              }
         | 
| 2769 3057 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Field, 0 |  0 );
         | 
| 2770 3058 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2771 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 3059 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Field const *","Get", 1, self )); 
         | 
| 2772 3060 | 
             
              }
         | 
| 2773 3061 | 
             
              arg1 = reinterpret_cast< ID3_Field * >(argp1);
         | 
| 2774 | 
            -
              result = ( | 
| 3062 | 
            +
              result = (uint32)((ID3_Field const *)arg1)->Get();
         | 
| 2775 3063 | 
             
              vresult = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
         | 
| 2776 3064 | 
             
              return vresult;
         | 
| 2777 3065 | 
             
            fail:
         | 
| @@ -2782,9 +3070,9 @@ fail: | |
| 2782 3070 | 
             
            SWIGINTERN VALUE
         | 
| 2783 3071 | 
             
            _wrap_Field_get_ascii(int argc, VALUE *argv, VALUE self) {
         | 
| 2784 3072 | 
             
              ID3_Field *arg1 = (ID3_Field *) 0 ;
         | 
| 2785 | 
            -
              char *result = 0 ;
         | 
| 2786 3073 | 
             
              void *argp1 = 0 ;
         | 
| 2787 3074 | 
             
              int res1 = 0 ;
         | 
| 3075 | 
            +
              char *result = 0 ;
         | 
| 2788 3076 | 
             
              VALUE vresult = Qnil;
         | 
| 2789 3077 |  | 
| 2790 3078 | 
             
              if ((argc < 0) || (argc > 0)) {
         | 
| @@ -2792,7 +3080,7 @@ _wrap_Field_get_ascii(int argc, VALUE *argv, VALUE self) { | |
| 2792 3080 | 
             
              }
         | 
| 2793 3081 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Field, 0 |  0 );
         | 
| 2794 3082 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2795 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 3083 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Field const *","GetRawText", 1, self )); 
         | 
| 2796 3084 | 
             
              }
         | 
| 2797 3085 | 
             
              arg1 = reinterpret_cast< ID3_Field * >(argp1);
         | 
| 2798 3086 | 
             
              result = (char *)((ID3_Field const *)arg1)->GetRawText();
         | 
| @@ -2806,9 +3094,9 @@ fail: | |
| 2806 3094 | 
             
            SWIGINTERN VALUE
         | 
| 2807 3095 | 
             
            _wrap_Field_get_binary(int argc, VALUE *argv, VALUE self) {
         | 
| 2808 3096 | 
             
              ID3_Field *arg1 = (ID3_Field *) 0 ;
         | 
| 2809 | 
            -
              VALUE result;
         | 
| 2810 3097 | 
             
              void *argp1 = 0 ;
         | 
| 2811 3098 | 
             
              int res1 = 0 ;
         | 
| 3099 | 
            +
              VALUE result;
         | 
| 2812 3100 | 
             
              VALUE vresult = Qnil;
         | 
| 2813 3101 |  | 
| 2814 3102 | 
             
              if ((argc < 0) || (argc > 0)) {
         | 
| @@ -2816,7 +3104,7 @@ _wrap_Field_get_binary(int argc, VALUE *argv, VALUE self) { | |
| 2816 3104 | 
             
              }
         | 
| 2817 3105 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Field, 0 |  0 );
         | 
| 2818 3106 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2819 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 3107 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Field *","get_binary", 1, self )); 
         | 
| 2820 3108 | 
             
              }
         | 
| 2821 3109 | 
             
              arg1 = reinterpret_cast< ID3_Field * >(argp1);
         | 
| 2822 3110 | 
             
              result = (VALUE)ID3_Field_get_binary(arg1);
         | 
| @@ -2830,9 +3118,9 @@ fail: | |
| 2830 3118 | 
             
            SWIGINTERN VALUE
         | 
| 2831 3119 | 
             
            _wrap_Field_get_unicode(int argc, VALUE *argv, VALUE self) {
         | 
| 2832 3120 | 
             
              ID3_Field *arg1 = (ID3_Field *) 0 ;
         | 
| 2833 | 
            -
              VALUE result;
         | 
| 2834 3121 | 
             
              void *argp1 = 0 ;
         | 
| 2835 3122 | 
             
              int res1 = 0 ;
         | 
| 3123 | 
            +
              VALUE result;
         | 
| 2836 3124 | 
             
              VALUE vresult = Qnil;
         | 
| 2837 3125 |  | 
| 2838 3126 | 
             
              if ((argc < 0) || (argc > 0)) {
         | 
| @@ -2840,7 +3128,7 @@ _wrap_Field_get_unicode(int argc, VALUE *argv, VALUE self) { | |
| 2840 3128 | 
             
              }
         | 
| 2841 3129 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Field, 0 |  0 );
         | 
| 2842 3130 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2843 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 3131 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Field *","get_unicode", 1, self )); 
         | 
| 2844 3132 | 
             
              }
         | 
| 2845 3133 | 
             
              arg1 = reinterpret_cast< ID3_Field * >(argp1);
         | 
| 2846 3134 | 
             
              result = (VALUE)ID3_Field_get_unicode(arg1);
         | 
| @@ -2855,11 +3143,11 @@ SWIGINTERN VALUE | |
| 2855 3143 | 
             
            _wrap_Field_set_encoding(int argc, VALUE *argv, VALUE self) {
         | 
| 2856 3144 | 
             
              ID3_Field *arg1 = (ID3_Field *) 0 ;
         | 
| 2857 3145 | 
             
              ID3_TextEnc arg2 ;
         | 
| 2858 | 
            -
              bool result;
         | 
| 2859 3146 | 
             
              void *argp1 = 0 ;
         | 
| 2860 3147 | 
             
              int res1 = 0 ;
         | 
| 2861 3148 | 
             
              int val2 ;
         | 
| 2862 3149 | 
             
              int ecode2 = 0 ;
         | 
| 3150 | 
            +
              bool result;
         | 
| 2863 3151 | 
             
              VALUE vresult = Qnil;
         | 
| 2864 3152 |  | 
| 2865 3153 | 
             
              if ((argc < 1) || (argc > 1)) {
         | 
| @@ -2867,12 +3155,12 @@ _wrap_Field_set_encoding(int argc, VALUE *argv, VALUE self) { | |
| 2867 3155 | 
             
              }
         | 
| 2868 3156 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Field, 0 |  0 );
         | 
| 2869 3157 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2870 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 3158 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Field *","SetEncoding", 1, self )); 
         | 
| 2871 3159 | 
             
              }
         | 
| 2872 3160 | 
             
              arg1 = reinterpret_cast< ID3_Field * >(argp1);
         | 
| 2873 3161 | 
             
              ecode2 = SWIG_AsVal_int(argv[0], &val2);
         | 
| 2874 3162 | 
             
              if (!SWIG_IsOK(ecode2)) {
         | 
| 2875 | 
            -
                SWIG_exception_fail(SWIG_ArgError(ecode2),  | 
| 3163 | 
            +
                SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ID3_TextEnc","SetEncoding", 2, argv[0] ));
         | 
| 2876 3164 | 
             
              } 
         | 
| 2877 3165 | 
             
              arg2 = static_cast< ID3_TextEnc >(val2);
         | 
| 2878 3166 | 
             
              result = (bool)(arg1)->SetEncoding(arg2);
         | 
| @@ -2886,7 +3174,7 @@ fail: | |
| 2886 3174 | 
             
            SWIGINTERN VALUE
         | 
| 2887 3175 | 
             
            _wrap_Field_set_integer(int argc, VALUE *argv, VALUE self) {
         | 
| 2888 3176 | 
             
              ID3_Field *arg1 = (ID3_Field *) 0 ;
         | 
| 2889 | 
            -
               | 
| 3177 | 
            +
              uint32 arg2 ;
         | 
| 2890 3178 | 
             
              void *argp1 = 0 ;
         | 
| 2891 3179 | 
             
              int res1 = 0 ;
         | 
| 2892 3180 | 
             
              unsigned long val2 ;
         | 
| @@ -2897,14 +3185,14 @@ _wrap_Field_set_integer(int argc, VALUE *argv, VALUE self) { | |
| 2897 3185 | 
             
              }
         | 
| 2898 3186 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Field, 0 |  0 );
         | 
| 2899 3187 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2900 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 3188 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Field *","Set", 1, self )); 
         | 
| 2901 3189 | 
             
              }
         | 
| 2902 3190 | 
             
              arg1 = reinterpret_cast< ID3_Field * >(argp1);
         | 
| 2903 3191 | 
             
              ecode2 = SWIG_AsVal_unsigned_SS_long(argv[0], &val2);
         | 
| 2904 3192 | 
             
              if (!SWIG_IsOK(ecode2)) {
         | 
| 2905 | 
            -
                SWIG_exception_fail(SWIG_ArgError(ecode2),  | 
| 3193 | 
            +
                SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint32","Set", 2, argv[0] ));
         | 
| 2906 3194 | 
             
              } 
         | 
| 2907 | 
            -
              arg2 = static_cast<  | 
| 3195 | 
            +
              arg2 = static_cast< uint32 >(val2);
         | 
| 2908 3196 | 
             
              (arg1)->Set(arg2);
         | 
| 2909 3197 | 
             
              return Qnil;
         | 
| 2910 3198 | 
             
            fail:
         | 
| @@ -2916,12 +3204,12 @@ SWIGINTERN VALUE | |
| 2916 3204 | 
             
            _wrap_Field_set_ascii(int argc, VALUE *argv, VALUE self) {
         | 
| 2917 3205 | 
             
              ID3_Field *arg1 = (ID3_Field *) 0 ;
         | 
| 2918 3206 | 
             
              char *arg2 = (char *) 0 ;
         | 
| 2919 | 
            -
              size_t result;
         | 
| 2920 3207 | 
             
              void *argp1 = 0 ;
         | 
| 2921 3208 | 
             
              int res1 = 0 ;
         | 
| 2922 3209 | 
             
              int res2 ;
         | 
| 2923 3210 | 
             
              char *buf2 = 0 ;
         | 
| 2924 3211 | 
             
              int alloc2 = 0 ;
         | 
| 3212 | 
            +
              size_t result;
         | 
| 2925 3213 | 
             
              VALUE vresult = Qnil;
         | 
| 2926 3214 |  | 
| 2927 3215 | 
             
              if ((argc < 1) || (argc > 1)) {
         | 
| @@ -2929,12 +3217,12 @@ _wrap_Field_set_ascii(int argc, VALUE *argv, VALUE self) { | |
| 2929 3217 | 
             
              }
         | 
| 2930 3218 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Field, 0 |  0 );
         | 
| 2931 3219 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2932 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 3220 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Field *","Set", 1, self )); 
         | 
| 2933 3221 | 
             
              }
         | 
| 2934 3222 | 
             
              arg1 = reinterpret_cast< ID3_Field * >(argp1);
         | 
| 2935 3223 | 
             
              res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
         | 
| 2936 3224 | 
             
              if (!SWIG_IsOK(res2)) {
         | 
| 2937 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res2),  | 
| 3225 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] ));
         | 
| 2938 3226 | 
             
              }
         | 
| 2939 3227 | 
             
              arg2 = reinterpret_cast< char * >(buf2);
         | 
| 2940 3228 | 
             
              result = (arg1)->Set((char const *)arg2);
         | 
| @@ -2951,9 +3239,9 @@ SWIGINTERN VALUE | |
| 2951 3239 | 
             
            _wrap_Field_set_binary(int argc, VALUE *argv, VALUE self) {
         | 
| 2952 3240 | 
             
              ID3_Field *arg1 = (ID3_Field *) 0 ;
         | 
| 2953 3241 | 
             
              VALUE arg2 = (VALUE) 0 ;
         | 
| 2954 | 
            -
              size_t result;
         | 
| 2955 3242 | 
             
              void *argp1 = 0 ;
         | 
| 2956 3243 | 
             
              int res1 = 0 ;
         | 
| 3244 | 
            +
              size_t result;
         | 
| 2957 3245 | 
             
              VALUE vresult = Qnil;
         | 
| 2958 3246 |  | 
| 2959 3247 | 
             
              if ((argc < 1) || (argc > 1)) {
         | 
| @@ -2961,7 +3249,7 @@ _wrap_Field_set_binary(int argc, VALUE *argv, VALUE self) { | |
| 2961 3249 | 
             
              }
         | 
| 2962 3250 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Field, 0 |  0 );
         | 
| 2963 3251 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2964 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 3252 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Field *","set_binary", 1, self )); 
         | 
| 2965 3253 | 
             
              }
         | 
| 2966 3254 | 
             
              arg1 = reinterpret_cast< ID3_Field * >(argp1);
         | 
| 2967 3255 | 
             
              arg2 = argv[0];
         | 
| @@ -2977,9 +3265,9 @@ SWIGINTERN VALUE | |
| 2977 3265 | 
             
            _wrap_Field_set_unicode(int argc, VALUE *argv, VALUE self) {
         | 
| 2978 3266 | 
             
              ID3_Field *arg1 = (ID3_Field *) 0 ;
         | 
| 2979 3267 | 
             
              VALUE arg2 = (VALUE) 0 ;
         | 
| 2980 | 
            -
              size_t result;
         | 
| 2981 3268 | 
             
              void *argp1 = 0 ;
         | 
| 2982 3269 | 
             
              int res1 = 0 ;
         | 
| 3270 | 
            +
              size_t result;
         | 
| 2983 3271 | 
             
              VALUE vresult = Qnil;
         | 
| 2984 3272 |  | 
| 2985 3273 | 
             
              if ((argc < 1) || (argc > 1)) {
         | 
| @@ -2987,7 +3275,7 @@ _wrap_Field_set_unicode(int argc, VALUE *argv, VALUE self) { | |
| 2987 3275 | 
             
              }
         | 
| 2988 3276 | 
             
              res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ID3_Field, 0 |  0 );
         | 
| 2989 3277 | 
             
              if (!SWIG_IsOK(res1)) {
         | 
| 2990 | 
            -
                SWIG_exception_fail(SWIG_ArgError(res1),  | 
| 3278 | 
            +
                SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ID3_Field *","set_unicode", 1, self )); 
         | 
| 2991 3279 | 
             
              }
         | 
| 2992 3280 | 
             
              arg1 = reinterpret_cast< ID3_Field * >(argp1);
         | 
| 2993 3281 | 
             
              arg2 = argv[0];
         | 
| @@ -3007,7 +3295,9 @@ static swig_type_info _swigt__p_ID3_Frame = {"_p_ID3_Frame", "ID3_Frame *", 0, 0 | |
| 3007 3295 | 
             
            static swig_type_info _swigt__p_ID3_Tag = {"_p_ID3_Tag", "ID3_Tag *", 0, 0, (void*)0, 0};
         | 
| 3008 3296 | 
             
            static swig_type_info _swigt__p_ID3_Tag__Iterator = {"_p_ID3_Tag__Iterator", "ID3_Tag::Iterator *", 0, 0, (void*)0, 0};
         | 
| 3009 3297 | 
             
            static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
         | 
| 3298 | 
            +
            static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "uchar *|unsigned char *", 0, 0, (void*)0, 0};
         | 
| 3010 3299 | 
             
            static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|flags_t *", 0, 0, (void*)0, 0};
         | 
| 3300 | 
            +
            static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "uint32 *|unsigned long *", 0, 0, (void*)0, 0};
         | 
| 3011 3301 |  | 
| 3012 3302 | 
             
            static swig_type_info *swig_type_initial[] = {
         | 
| 3013 3303 | 
             
              &_swigt__p_ID3_Field,
         | 
| @@ -3015,7 +3305,9 @@ static swig_type_info *swig_type_initial[] = { | |
| 3015 3305 | 
             
              &_swigt__p_ID3_Tag,
         | 
| 3016 3306 | 
             
              &_swigt__p_ID3_Tag__Iterator,
         | 
| 3017 3307 | 
             
              &_swigt__p_char,
         | 
| 3308 | 
            +
              &_swigt__p_unsigned_char,
         | 
| 3018 3309 | 
             
              &_swigt__p_unsigned_int,
         | 
| 3310 | 
            +
              &_swigt__p_unsigned_long,
         | 
| 3019 3311 | 
             
            };
         | 
| 3020 3312 |  | 
| 3021 3313 | 
             
            static swig_cast_info _swigc__p_ID3_Field[] = {  {&_swigt__p_ID3_Field, 0, 0, 0},{0, 0, 0, 0}};
         | 
| @@ -3023,7 +3315,9 @@ static swig_cast_info _swigc__p_ID3_Frame[] = {  {&_swigt__p_ID3_Frame, 0, 0, 0} | |
| 3023 3315 | 
             
            static swig_cast_info _swigc__p_ID3_Tag[] = {  {&_swigt__p_ID3_Tag, 0, 0, 0},{0, 0, 0, 0}};
         | 
| 3024 3316 | 
             
            static swig_cast_info _swigc__p_ID3_Tag__Iterator[] = {  {&_swigt__p_ID3_Tag__Iterator, 0, 0, 0},{0, 0, 0, 0}};
         | 
| 3025 3317 | 
             
            static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
         | 
| 3318 | 
            +
            static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
         | 
| 3026 3319 | 
             
            static swig_cast_info _swigc__p_unsigned_int[] = {  {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
         | 
| 3320 | 
            +
            static swig_cast_info _swigc__p_unsigned_long[] = {  {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
         | 
| 3027 3321 |  | 
| 3028 3322 | 
             
            static swig_cast_info *swig_cast_initial[] = {
         | 
| 3029 3323 | 
             
              _swigc__p_ID3_Field,
         | 
| @@ -3031,7 +3325,9 @@ static swig_cast_info *swig_cast_initial[] = { | |
| 3031 3325 | 
             
              _swigc__p_ID3_Tag,
         | 
| 3032 3326 | 
             
              _swigc__p_ID3_Tag__Iterator,
         | 
| 3033 3327 | 
             
              _swigc__p_char,
         | 
| 3328 | 
            +
              _swigc__p_unsigned_char,
         | 
| 3034 3329 | 
             
              _swigc__p_unsigned_int,
         | 
| 3330 | 
            +
              _swigc__p_unsigned_long,
         | 
| 3035 3331 | 
             
            };
         | 
| 3036 3332 |  | 
| 3037 3333 |  | 
| @@ -3094,7 +3390,7 @@ SWIGRUNTIME void | |
| 3094 3390 | 
             
            SWIG_InitializeModule(void *clientdata) {
         | 
| 3095 3391 | 
             
              size_t i;
         | 
| 3096 3392 | 
             
              swig_module_info *module_head, *iter;
         | 
| 3097 | 
            -
              int found;
         | 
| 3393 | 
            +
              int found, init;
         | 
| 3098 3394 |  | 
| 3099 3395 | 
             
              clientdata = clientdata;
         | 
| 3100 3396 |  | 
| @@ -3104,6 +3400,9 @@ SWIG_InitializeModule(void *clientdata) { | |
| 3104 3400 | 
             
                swig_module.type_initial = swig_type_initial;
         | 
| 3105 3401 | 
             
                swig_module.cast_initial = swig_cast_initial;
         | 
| 3106 3402 | 
             
                swig_module.next = &swig_module;
         | 
| 3403 | 
            +
                init = 1;
         | 
| 3404 | 
            +
              } else {
         | 
| 3405 | 
            +
                init = 0;
         | 
| 3107 3406 | 
             
              }
         | 
| 3108 3407 |  | 
| 3109 3408 | 
             
              /* Try and load any already created modules */
         | 
| @@ -3132,6 +3431,12 @@ SWIG_InitializeModule(void *clientdata) { | |
| 3132 3431 | 
             
                module_head->next = &swig_module;
         | 
| 3133 3432 | 
             
              }
         | 
| 3134 3433 |  | 
| 3434 | 
            +
              /* When multiple interpeters are used, a module could have already been initialized in
         | 
| 3435 | 
            +
                 a different interpreter, but not yet have a pointer in this interpreter.
         | 
| 3436 | 
            +
                 In this case, we do not want to continue adding types... everything should be
         | 
| 3437 | 
            +
                 set up already */
         | 
| 3438 | 
            +
              if (init == 0) return;
         | 
| 3439 | 
            +
             | 
| 3135 3440 | 
             
              /* Now work on filling in swig_module.types */
         | 
| 3136 3441 | 
             
            #ifdef SWIGRUNTIME_DEBUG
         | 
| 3137 3442 | 
             
              printf("SWIG_InitializeModule: size %d\n", swig_module.size);
         | 
| @@ -3265,7 +3570,9 @@ SWIG_PropagateClientData(void) { | |
| 3265 3570 | 
             
            }
         | 
| 3266 3571 | 
             
            #endif
         | 
| 3267 3572 |  | 
| 3573 | 
            +
            /*
         | 
| 3268 3574 |  | 
| 3575 | 
            +
            */
         | 
| 3269 3576 | 
             
            #ifdef __cplusplus
         | 
| 3270 3577 | 
             
            extern "C"
         | 
| 3271 3578 | 
             
            #endif
         | 
| @@ -3283,59 +3590,59 @@ SWIGEXPORT void Init_id3lib_api(void) { | |
| 3283 3590 |  | 
| 3284 3591 | 
             
              SWIG_RubyInitializeTrackings();
         | 
| 3285 3592 |  | 
| 3286 | 
            -
               | 
| 3287 | 
            -
              SWIG_TypeClientData(SWIGTYPE_p_ID3_Tag, (void *) & | 
| 3288 | 
            -
              rb_define_alloc_func( | 
| 3289 | 
            -
              rb_define_method( | 
| 3290 | 
            -
              rb_define_method( | 
| 3291 | 
            -
              rb_define_method( | 
| 3292 | 
            -
              rb_define_method( | 
| 3293 | 
            -
              rb_define_method( | 
| 3294 | 
            -
              rb_define_method( | 
| 3295 | 
            -
              rb_define_method( | 
| 3296 | 
            -
              rb_define_method( | 
| 3297 | 
            -
              rb_define_method( | 
| 3298 | 
            -
              rb_define_method( | 
| 3299 | 
            -
              rb_define_method( | 
| 3300 | 
            -
              rb_define_method( | 
| 3301 | 
            -
              rb_define_method( | 
| 3302 | 
            -
               | 
| 3303 | 
            -
               | 
| 3304 | 
            -
               | 
| 3305 | 
            -
              
         | 
| 3306 | 
            -
               | 
| 3307 | 
            -
              SWIG_TypeClientData(SWIGTYPE_p_ID3_Tag__Iterator, (void *) & | 
| 3308 | 
            -
              rb_undef_alloc_func( | 
| 3309 | 
            -
              rb_define_method( | 
| 3310 | 
            -
               | 
| 3311 | 
            -
               | 
| 3312 | 
            -
               | 
| 3313 | 
            -
              
         | 
| 3314 | 
            -
               | 
| 3315 | 
            -
              SWIG_TypeClientData(SWIGTYPE_p_ID3_Frame, (void *) & | 
| 3316 | 
            -
              rb_define_alloc_func( | 
| 3317 | 
            -
              rb_define_method( | 
| 3318 | 
            -
              rb_define_method( | 
| 3319 | 
            -
              rb_define_method( | 
| 3320 | 
            -
               | 
| 3321 | 
            -
               | 
| 3322 | 
            -
               | 
| 3323 | 
            -
              
         | 
| 3324 | 
            -
               | 
| 3325 | 
            -
              SWIG_TypeClientData(SWIGTYPE_p_ID3_Field, (void *) & | 
| 3326 | 
            -
              rb_undef_alloc_func( | 
| 3327 | 
            -
              rb_define_method( | 
| 3328 | 
            -
              rb_define_method( | 
| 3329 | 
            -
              rb_define_method( | 
| 3330 | 
            -
              rb_define_method( | 
| 3331 | 
            -
              rb_define_method( | 
| 3332 | 
            -
              rb_define_method( | 
| 3333 | 
            -
              rb_define_method( | 
| 3334 | 
            -
              rb_define_method( | 
| 3335 | 
            -
              rb_define_method( | 
| 3336 | 
            -
              rb_define_method( | 
| 3337 | 
            -
              rb_define_method( | 
| 3338 | 
            -
               | 
| 3339 | 
            -
               | 
| 3593 | 
            +
              SwigClassTag.klass = rb_define_class_under(mAPI, "Tag", rb_cObject);
         | 
| 3594 | 
            +
              SWIG_TypeClientData(SWIGTYPE_p_ID3_Tag, (void *) &SwigClassTag);
         | 
| 3595 | 
            +
              rb_define_alloc_func(SwigClassTag.klass, _wrap_Tag_allocate);
         | 
| 3596 | 
            +
              rb_define_method(SwigClassTag.klass, "initialize", VALUEFUNC(_wrap_new_Tag), -1);
         | 
| 3597 | 
            +
              rb_define_method(SwigClassTag.klass, "has_tag_type", VALUEFUNC(_wrap_Tag_has_tag_type), -1);
         | 
| 3598 | 
            +
              rb_define_method(SwigClassTag.klass, "link", VALUEFUNC(_wrap_Tag_link), -1);
         | 
| 3599 | 
            +
              rb_define_method(SwigClassTag.klass, "update", VALUEFUNC(_wrap_Tag_update), -1);
         | 
| 3600 | 
            +
              rb_define_method(SwigClassTag.klass, "strip", VALUEFUNC(_wrap_Tag_strip), -1);
         | 
| 3601 | 
            +
              rb_define_method(SwigClassTag.klass, "clear", VALUEFUNC(_wrap_Tag_clear), -1);
         | 
| 3602 | 
            +
              rb_define_method(SwigClassTag.klass, "remove_frame", VALUEFUNC(_wrap_Tag_remove_frame), -1);
         | 
| 3603 | 
            +
              rb_define_method(SwigClassTag.klass, "add_frame", VALUEFUNC(_wrap_Tag_add_frame), -1);
         | 
| 3604 | 
            +
              rb_define_method(SwigClassTag.klass, "get_filename", VALUEFUNC(_wrap_Tag_get_filename), -1);
         | 
| 3605 | 
            +
              rb_define_method(SwigClassTag.klass, "set_padding", VALUEFUNC(_wrap_Tag_set_padding), -1);
         | 
| 3606 | 
            +
              rb_define_method(SwigClassTag.klass, "size", VALUEFUNC(_wrap_Tag_size), -1);
         | 
| 3607 | 
            +
              rb_define_method(SwigClassTag.klass, "find", VALUEFUNC(_wrap_Tag_find), -1);
         | 
| 3608 | 
            +
              rb_define_method(SwigClassTag.klass, "create_iterator", VALUEFUNC(_wrap_Tag_create_iterator), -1);
         | 
| 3609 | 
            +
              SwigClassTag.mark = 0;
         | 
| 3610 | 
            +
              SwigClassTag.destroy = (void (*)(void *)) free_ID3_Tag;
         | 
| 3611 | 
            +
              SwigClassTag.trackObjects = 0;
         | 
| 3612 | 
            +
              
         | 
| 3613 | 
            +
              SwigClassTag_Iterator.klass = rb_define_class_under(mAPI, "Tag_Iterator", rb_cObject);
         | 
| 3614 | 
            +
              SWIG_TypeClientData(SWIGTYPE_p_ID3_Tag__Iterator, (void *) &SwigClassTag_Iterator);
         | 
| 3615 | 
            +
              rb_undef_alloc_func(SwigClassTag_Iterator.klass);
         | 
| 3616 | 
            +
              rb_define_method(SwigClassTag_Iterator.klass, "get_next", VALUEFUNC(_wrap_Tag_Iterator_get_next), -1);
         | 
| 3617 | 
            +
              SwigClassTag_Iterator.mark = 0;
         | 
| 3618 | 
            +
              SwigClassTag_Iterator.destroy = (void (*)(void *)) free_ID3_Tag_Iterator;
         | 
| 3619 | 
            +
              SwigClassTag_Iterator.trackObjects = 0;
         | 
| 3620 | 
            +
              
         | 
| 3621 | 
            +
              SwigClassFrame.klass = rb_define_class_under(mAPI, "Frame", rb_cObject);
         | 
| 3622 | 
            +
              SWIG_TypeClientData(SWIGTYPE_p_ID3_Frame, (void *) &SwigClassFrame);
         | 
| 3623 | 
            +
              rb_define_alloc_func(SwigClassFrame.klass, _wrap_Frame_allocate);
         | 
| 3624 | 
            +
              rb_define_method(SwigClassFrame.klass, "initialize", VALUEFUNC(_wrap_new_Frame), -1);
         | 
| 3625 | 
            +
              rb_define_method(SwigClassFrame.klass, "get_field", VALUEFUNC(_wrap_Frame_get_field), -1);
         | 
| 3626 | 
            +
              rb_define_method(SwigClassFrame.klass, "get_id", VALUEFUNC(_wrap_Frame_get_id), -1);
         | 
| 3627 | 
            +
              SwigClassFrame.mark = 0;
         | 
| 3628 | 
            +
              SwigClassFrame.destroy = (void (*)(void *)) free_ID3_Frame;
         | 
| 3629 | 
            +
              SwigClassFrame.trackObjects = 0;
         | 
| 3630 | 
            +
              
         | 
| 3631 | 
            +
              SwigClassField.klass = rb_define_class_under(mAPI, "Field", rb_cObject);
         | 
| 3632 | 
            +
              SWIG_TypeClientData(SWIGTYPE_p_ID3_Field, (void *) &SwigClassField);
         | 
| 3633 | 
            +
              rb_undef_alloc_func(SwigClassField.klass);
         | 
| 3634 | 
            +
              rb_define_method(SwigClassField.klass, "get_type", VALUEFUNC(_wrap_Field_get_type), -1);
         | 
| 3635 | 
            +
              rb_define_method(SwigClassField.klass, "get_encoding", VALUEFUNC(_wrap_Field_get_encoding), -1);
         | 
| 3636 | 
            +
              rb_define_method(SwigClassField.klass, "get_integer", VALUEFUNC(_wrap_Field_get_integer), -1);
         | 
| 3637 | 
            +
              rb_define_method(SwigClassField.klass, "get_ascii", VALUEFUNC(_wrap_Field_get_ascii), -1);
         | 
| 3638 | 
            +
              rb_define_method(SwigClassField.klass, "get_binary", VALUEFUNC(_wrap_Field_get_binary), -1);
         | 
| 3639 | 
            +
              rb_define_method(SwigClassField.klass, "get_unicode", VALUEFUNC(_wrap_Field_get_unicode), -1);
         | 
| 3640 | 
            +
              rb_define_method(SwigClassField.klass, "set_encoding", VALUEFUNC(_wrap_Field_set_encoding), -1);
         | 
| 3641 | 
            +
              rb_define_method(SwigClassField.klass, "set_integer", VALUEFUNC(_wrap_Field_set_integer), -1);
         | 
| 3642 | 
            +
              rb_define_method(SwigClassField.klass, "set_ascii", VALUEFUNC(_wrap_Field_set_ascii), -1);
         | 
| 3643 | 
            +
              rb_define_method(SwigClassField.klass, "set_binary", VALUEFUNC(_wrap_Field_set_binary), -1);
         | 
| 3644 | 
            +
              rb_define_method(SwigClassField.klass, "set_unicode", VALUEFUNC(_wrap_Field_set_unicode), -1);
         | 
| 3645 | 
            +
              SwigClassField.mark = 0;
         | 
| 3646 | 
            +
              SwigClassField.trackObjects = 0;
         | 
| 3340 3647 | 
             
            }
         | 
| 3341 3648 |  |