taglib-ruby 0.6.0 → 0.7.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.
- checksums.yaml +7 -0
- data/CHANGES.md +9 -0
- data/README.md +40 -9
- data/Rakefile +1 -2
- data/docs/taglib/aiff.rb +63 -0
- data/docs/taglib/base.rb +22 -1
- data/docs/taglib/id3v2.rb +21 -2
- data/docs/taglib/riff.rb +3 -0
- data/docs/taglib/wav.rb +63 -0
- data/ext/extconf_common.rb +15 -1
- data/ext/taglib_aiff/extconf.rb +4 -0
- data/ext/taglib_aiff/taglib_aiff.i +68 -0
- data/ext/taglib_aiff/taglib_aiff_wrap.cxx +2920 -0
- data/ext/taglib_base/includes.i +7 -2
- data/ext/taglib_base/taglib_base_wrap.cxx +109 -115
- data/ext/taglib_flac/taglib_flac_wrap.cxx +108 -114
- data/ext/taglib_id3v1/taglib_id3v1_wrap.cxx +109 -115
- data/ext/taglib_id3v2/taglib_id3v2.i +3 -1
- data/ext/taglib_id3v2/taglib_id3v2_wrap.cxx +139 -119
- data/ext/taglib_mp4/taglib_mp4_wrap.cxx +109 -115
- data/ext/taglib_mpeg/taglib_mpeg_wrap.cxx +108 -114
- data/ext/taglib_ogg/taglib_ogg_wrap.cxx +109 -115
- data/ext/taglib_vorbis/taglib_vorbis_wrap.cxx +108 -114
- data/ext/taglib_wav/extconf.rb +4 -0
- data/ext/taglib_wav/taglib_wav.i +66 -0
- data/ext/taglib_wav/taglib_wav_wrap.cxx +3057 -0
- data/lib/taglib.rb +2 -0
- data/lib/taglib/aiff.rb +7 -0
- data/lib/taglib/version.rb +1 -1
- data/lib/taglib/wav.rb +7 -0
- data/taglib-ruby.gemspec +27 -2
- data/tasks/ext.rake +17 -10
- data/tasks/swig.rake +10 -0
- data/test/aiff_examples_test.rb +39 -0
- data/test/aiff_file_test.rb +94 -0
- data/test/aiff_file_write_test.rb +88 -0
- data/test/data/Makefile +8 -2
- data/test/data/aiff-sample.aiff +0 -0
- data/test/data/wav-create.cpp +55 -0
- data/test/data/wav-dump.cpp +74 -0
- data/test/data/wav-sample.wav +0 -0
- data/test/file_test.rb +21 -0
- data/test/id3v2_unknown_frames_test.rb +30 -0
- data/test/wav_examples_test.rb +42 -0
- data/test/wav_file_test.rb +96 -0
- data/test/wav_file_write_test.rb +88 -0
- metadata +49 -45
@@ -1,11 +1,11 @@
|
|
1
1
|
/* ----------------------------------------------------------------------------
|
2
2
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
3
|
-
* Version 2.0.
|
4
|
-
*
|
5
|
-
* This file is not intended to be easily readable and contains a number of
|
3
|
+
* Version 2.0.12
|
4
|
+
*
|
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
|
7
|
-
* changes to this file unless you know what you are doing--modify the SWIG
|
8
|
-
* interface file instead.
|
7
|
+
* changes to this file unless you know what you are doing--modify the SWIG
|
8
|
+
* interface file instead.
|
9
9
|
* ----------------------------------------------------------------------------- */
|
10
10
|
|
11
11
|
#define SWIGRUBY
|
@@ -65,28 +65,28 @@ template <typename T> T SwigValueInit() {
|
|
65
65
|
#ifndef SWIGUNUSED
|
66
66
|
# if defined(__GNUC__)
|
67
67
|
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
68
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
68
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
69
69
|
# else
|
70
70
|
# define SWIGUNUSED
|
71
71
|
# endif
|
72
72
|
# elif defined(__ICC)
|
73
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
73
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
74
74
|
# else
|
75
|
-
# define SWIGUNUSED
|
75
|
+
# define SWIGUNUSED
|
76
76
|
# endif
|
77
77
|
#endif
|
78
78
|
|
79
79
|
#ifndef SWIG_MSC_UNSUPPRESS_4505
|
80
80
|
# if defined(_MSC_VER)
|
81
81
|
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
82
|
-
# endif
|
82
|
+
# endif
|
83
83
|
#endif
|
84
84
|
|
85
85
|
#ifndef SWIGUNUSEDPARM
|
86
86
|
# ifdef __cplusplus
|
87
87
|
# define SWIGUNUSEDPARM(p)
|
88
88
|
# else
|
89
|
-
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
89
|
+
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
90
90
|
# endif
|
91
91
|
#endif
|
92
92
|
|
@@ -129,7 +129,7 @@ template <typename T> T SwigValueInit() {
|
|
129
129
|
# define SWIGSTDCALL __stdcall
|
130
130
|
# else
|
131
131
|
# define SWIGSTDCALL
|
132
|
-
# endif
|
132
|
+
# endif
|
133
133
|
#endif
|
134
134
|
|
135
135
|
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
|
@@ -174,28 +174,28 @@ template <typename T> T SwigValueInit() {
|
|
174
174
|
#ifndef SWIGUNUSED
|
175
175
|
# if defined(__GNUC__)
|
176
176
|
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
177
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
177
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
178
178
|
# else
|
179
179
|
# define SWIGUNUSED
|
180
180
|
# endif
|
181
181
|
# elif defined(__ICC)
|
182
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
182
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
183
183
|
# else
|
184
|
-
# define SWIGUNUSED
|
184
|
+
# define SWIGUNUSED
|
185
185
|
# endif
|
186
186
|
#endif
|
187
187
|
|
188
188
|
#ifndef SWIG_MSC_UNSUPPRESS_4505
|
189
189
|
# if defined(_MSC_VER)
|
190
190
|
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
191
|
-
# endif
|
191
|
+
# endif
|
192
192
|
#endif
|
193
193
|
|
194
194
|
#ifndef SWIGUNUSEDPARM
|
195
195
|
# ifdef __cplusplus
|
196
196
|
# define SWIGUNUSEDPARM(p)
|
197
197
|
# else
|
198
|
-
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
198
|
+
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
199
199
|
# endif
|
200
200
|
#endif
|
201
201
|
|
@@ -238,7 +238,7 @@ template <typename T> T SwigValueInit() {
|
|
238
238
|
# define SWIGSTDCALL __stdcall
|
239
239
|
# else
|
240
240
|
# define SWIGSTDCALL
|
241
|
-
# endif
|
241
|
+
# endif
|
242
242
|
#endif
|
243
243
|
|
244
244
|
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
|
@@ -276,7 +276,7 @@ template <typename T> T SwigValueInit() {
|
|
276
276
|
You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
|
277
277
|
creating a static or dynamic library from the SWIG runtime code.
|
278
278
|
In 99.9% of the cases, SWIG just needs to declare them as 'static'.
|
279
|
-
|
279
|
+
|
280
280
|
But only do this if strictly necessary, ie, if you have problems
|
281
281
|
with your compiler or suchlike.
|
282
282
|
*/
|
@@ -302,16 +302,16 @@ template <typename T> T SwigValueInit() {
|
|
302
302
|
#define SWIG_POINTER_OWN 0x1
|
303
303
|
|
304
304
|
|
305
|
-
/*
|
305
|
+
/*
|
306
306
|
Flags/methods for returning states.
|
307
|
-
|
308
|
-
The SWIG conversion methods, as ConvertPtr, return an integer
|
307
|
+
|
308
|
+
The SWIG conversion methods, as ConvertPtr, return an integer
|
309
309
|
that tells if the conversion was successful or not. And if not,
|
310
310
|
an error code can be returned (see swigerrors.swg for the codes).
|
311
|
-
|
311
|
+
|
312
312
|
Use the following macros/flags to set or process the returning
|
313
313
|
states.
|
314
|
-
|
314
|
+
|
315
315
|
In old versions of SWIG, code such as the following was usually written:
|
316
316
|
|
317
317
|
if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
|
@@ -344,23 +344,23 @@ template <typename T> T SwigValueInit() {
|
|
344
344
|
} else {
|
345
345
|
// fail code
|
346
346
|
}
|
347
|
-
|
347
|
+
|
348
348
|
I.e., now SWIG_ConvertPtr can return new objects and you can
|
349
349
|
identify the case and take care of the deallocation. Of course that
|
350
350
|
also requires SWIG_ConvertPtr to return new result values, such as
|
351
351
|
|
352
|
-
int SWIG_ConvertPtr(obj, ptr,...) {
|
353
|
-
if (<obj is ok>) {
|
354
|
-
if (<need new object>) {
|
355
|
-
*ptr = <ptr to new allocated object>;
|
356
|
-
return SWIG_NEWOBJ;
|
357
|
-
} else {
|
358
|
-
*ptr = <ptr to old object>;
|
359
|
-
return SWIG_OLDOBJ;
|
360
|
-
}
|
361
|
-
} else {
|
362
|
-
return SWIG_BADOBJ;
|
363
|
-
}
|
352
|
+
int SWIG_ConvertPtr(obj, ptr,...) {
|
353
|
+
if (<obj is ok>) {
|
354
|
+
if (<need new object>) {
|
355
|
+
*ptr = <ptr to new allocated object>;
|
356
|
+
return SWIG_NEWOBJ;
|
357
|
+
} else {
|
358
|
+
*ptr = <ptr to old object>;
|
359
|
+
return SWIG_OLDOBJ;
|
360
|
+
}
|
361
|
+
} else {
|
362
|
+
return SWIG_BADOBJ;
|
363
|
+
}
|
364
364
|
}
|
365
365
|
|
366
366
|
Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
|
@@ -374,17 +374,17 @@ template <typename T> T SwigValueInit() {
|
|
374
374
|
int fooi(int);
|
375
375
|
|
376
376
|
and you call
|
377
|
-
|
377
|
+
|
378
378
|
food(1) // cast rank '1' (1 -> 1.0)
|
379
379
|
fooi(1) // cast rank '0'
|
380
380
|
|
381
381
|
just use the SWIG_AddCast()/SWIG_CheckState()
|
382
382
|
*/
|
383
383
|
|
384
|
-
#define SWIG_OK (0)
|
384
|
+
#define SWIG_OK (0)
|
385
385
|
#define SWIG_ERROR (-1)
|
386
386
|
#define SWIG_IsOK(r) (r >= 0)
|
387
|
-
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
387
|
+
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
388
388
|
|
389
389
|
/* The CastRankLimit says how many bits are used for the cast rank */
|
390
390
|
#define SWIG_CASTRANKLIMIT (1 << 8)
|
@@ -415,14 +415,14 @@ template <typename T> T SwigValueInit() {
|
|
415
415
|
# endif
|
416
416
|
# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
|
417
417
|
# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
|
418
|
-
SWIGINTERNINLINE int SWIG_AddCast(int r) {
|
418
|
+
SWIGINTERNINLINE int SWIG_AddCast(int r) {
|
419
419
|
return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
|
420
420
|
}
|
421
|
-
SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
422
|
-
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
421
|
+
SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
422
|
+
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
423
423
|
}
|
424
424
|
#else /* no cast-rank mode */
|
425
|
-
# define SWIG_AddCast
|
425
|
+
# define SWIG_AddCast(r) (r)
|
426
426
|
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
|
427
427
|
#endif
|
428
428
|
|
@@ -466,7 +466,7 @@ typedef struct swig_module_info {
|
|
466
466
|
void *clientdata; /* Language specific module data */
|
467
467
|
} swig_module_info;
|
468
468
|
|
469
|
-
/*
|
469
|
+
/*
|
470
470
|
Compare two type names skipping the space characters, therefore
|
471
471
|
"char*" == "char *" and "Class<int>" == "Class<int >", etc.
|
472
472
|
|
@@ -486,18 +486,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
|
|
486
486
|
|
487
487
|
/*
|
488
488
|
Check type equivalence in a name list like <name1>|<name2>|...
|
489
|
-
Return 0 if
|
489
|
+
Return 0 if equal, -1 if nb < tb, 1 if nb > tb
|
490
490
|
*/
|
491
491
|
SWIGRUNTIME int
|
492
|
-
|
493
|
-
int equiv =
|
492
|
+
SWIG_TypeCmp(const char *nb, const char *tb) {
|
493
|
+
int equiv = 1;
|
494
494
|
const char* te = tb + strlen(tb);
|
495
495
|
const char* ne = nb;
|
496
|
-
while (
|
496
|
+
while (equiv != 0 && *ne) {
|
497
497
|
for (nb = ne; *ne; ++ne) {
|
498
498
|
if (*ne == '|') break;
|
499
499
|
}
|
500
|
-
equiv =
|
500
|
+
equiv = SWIG_TypeNameComp(nb, ne, tb, te);
|
501
501
|
if (*ne) ++ne;
|
502
502
|
}
|
503
503
|
return equiv;
|
@@ -505,24 +505,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
|
|
505
505
|
|
506
506
|
/*
|
507
507
|
Check type equivalence in a name list like <name1>|<name2>|...
|
508
|
-
Return 0 if equal,
|
508
|
+
Return 0 if not equal, 1 if equal
|
509
509
|
*/
|
510
510
|
SWIGRUNTIME int
|
511
|
-
|
512
|
-
|
513
|
-
const char* te = tb + strlen(tb);
|
514
|
-
const char* ne = nb;
|
515
|
-
while (!equiv && *ne) {
|
516
|
-
for (nb = ne; *ne; ++ne) {
|
517
|
-
if (*ne == '|') break;
|
518
|
-
}
|
519
|
-
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
|
520
|
-
if (*ne) ++ne;
|
521
|
-
}
|
522
|
-
return equiv;
|
511
|
+
SWIG_TypeEquiv(const char *nb, const char *tb) {
|
512
|
+
return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
|
523
513
|
}
|
524
514
|
|
525
|
-
|
526
515
|
/*
|
527
516
|
Check the typename
|
528
517
|
*/
|
@@ -550,7 +539,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
|
|
550
539
|
return 0;
|
551
540
|
}
|
552
541
|
|
553
|
-
/*
|
542
|
+
/*
|
554
543
|
Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
|
555
544
|
*/
|
556
545
|
SWIGRUNTIME swig_cast_info *
|
@@ -585,7 +574,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
|
|
585
574
|
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
|
586
575
|
}
|
587
576
|
|
588
|
-
/*
|
577
|
+
/*
|
589
578
|
Dynamic pointer casting. Down an inheritance hierarchy
|
590
579
|
*/
|
591
580
|
SWIGRUNTIME swig_type_info *
|
@@ -629,7 +618,7 @@ SWIG_TypePrettyName(const swig_type_info *type) {
|
|
629
618
|
return type->name;
|
630
619
|
}
|
631
620
|
|
632
|
-
/*
|
621
|
+
/*
|
633
622
|
Set the clientdata field for a type
|
634
623
|
*/
|
635
624
|
SWIGRUNTIME void
|
@@ -637,14 +626,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
|
|
637
626
|
swig_cast_info *cast = ti->cast;
|
638
627
|
/* if (ti->clientdata == clientdata) return; */
|
639
628
|
ti->clientdata = clientdata;
|
640
|
-
|
629
|
+
|
641
630
|
while (cast) {
|
642
631
|
if (!cast->converter) {
|
643
632
|
swig_type_info *tc = cast->type;
|
644
633
|
if (!tc->clientdata) {
|
645
634
|
SWIG_TypeClientData(tc, clientdata);
|
646
635
|
}
|
647
|
-
}
|
636
|
+
}
|
648
637
|
cast = cast->next;
|
649
638
|
}
|
650
639
|
}
|
@@ -653,18 +642,18 @@ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
|
|
653
642
|
SWIG_TypeClientData(ti, clientdata);
|
654
643
|
ti->owndata = 1;
|
655
644
|
}
|
656
|
-
|
645
|
+
|
657
646
|
/*
|
658
647
|
Search for a swig_type_info structure only by mangled name
|
659
648
|
Search is a O(log #types)
|
660
|
-
|
661
|
-
We start searching at module start, and finish searching when start == end.
|
649
|
+
|
650
|
+
We start searching at module start, and finish searching when start == end.
|
662
651
|
Note: if start == end at the beginning of the function, we go all the way around
|
663
652
|
the circular list.
|
664
653
|
*/
|
665
654
|
SWIGRUNTIME swig_type_info *
|
666
|
-
SWIG_MangledTypeQueryModule(swig_module_info *start,
|
667
|
-
swig_module_info *end,
|
655
|
+
SWIG_MangledTypeQueryModule(swig_module_info *start,
|
656
|
+
swig_module_info *end,
|
668
657
|
const char *name) {
|
669
658
|
swig_module_info *iter = start;
|
670
659
|
do {
|
@@ -673,11 +662,11 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
|
|
673
662
|
register size_t r = iter->size - 1;
|
674
663
|
do {
|
675
664
|
/* since l+r >= 0, we can (>> 1) instead (/ 2) */
|
676
|
-
register size_t i = (l + r) >> 1;
|
665
|
+
register size_t i = (l + r) >> 1;
|
677
666
|
const char *iname = iter->types[i]->name;
|
678
667
|
if (iname) {
|
679
668
|
register int compare = strcmp(name, iname);
|
680
|
-
if (compare == 0) {
|
669
|
+
if (compare == 0) {
|
681
670
|
return iter->types[i];
|
682
671
|
} else if (compare < 0) {
|
683
672
|
if (i) {
|
@@ -702,14 +691,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
|
|
702
691
|
Search for a swig_type_info structure for either a mangled name or a human readable name.
|
703
692
|
It first searches the mangled names of the types, which is a O(log #types)
|
704
693
|
If a type is not found it then searches the human readable names, which is O(#types).
|
705
|
-
|
706
|
-
We start searching at module start, and finish searching when start == end.
|
694
|
+
|
695
|
+
We start searching at module start, and finish searching when start == end.
|
707
696
|
Note: if start == end at the beginning of the function, we go all the way around
|
708
697
|
the circular list.
|
709
698
|
*/
|
710
699
|
SWIGRUNTIME swig_type_info *
|
711
|
-
SWIG_TypeQueryModule(swig_module_info *start,
|
712
|
-
swig_module_info *end,
|
700
|
+
SWIG_TypeQueryModule(swig_module_info *start,
|
701
|
+
swig_module_info *end,
|
713
702
|
const char *name) {
|
714
703
|
/* STEP 1: Search the name field using binary search */
|
715
704
|
swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
|
@@ -728,12 +717,12 @@ SWIG_TypeQueryModule(swig_module_info *start,
|
|
728
717
|
iter = iter->next;
|
729
718
|
} while (iter != end);
|
730
719
|
}
|
731
|
-
|
720
|
+
|
732
721
|
/* neither found a match */
|
733
722
|
return 0;
|
734
723
|
}
|
735
724
|
|
736
|
-
/*
|
725
|
+
/*
|
737
726
|
Pack binary data into a string
|
738
727
|
*/
|
739
728
|
SWIGRUNTIME char *
|
@@ -749,7 +738,7 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
|
|
749
738
|
return c;
|
750
739
|
}
|
751
740
|
|
752
|
-
/*
|
741
|
+
/*
|
753
742
|
Unpack binary data from a string
|
754
743
|
*/
|
755
744
|
SWIGRUNTIME const char *
|
@@ -763,21 +752,21 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|
763
752
|
uu = ((d - '0') << 4);
|
764
753
|
else if ((d >= 'a') && (d <= 'f'))
|
765
754
|
uu = ((d - ('a'-10)) << 4);
|
766
|
-
else
|
755
|
+
else
|
767
756
|
return (char *) 0;
|
768
757
|
d = *(c++);
|
769
758
|
if ((d >= '0') && (d <= '9'))
|
770
759
|
uu |= (d - '0');
|
771
760
|
else if ((d >= 'a') && (d <= 'f'))
|
772
761
|
uu |= (d - ('a'-10));
|
773
|
-
else
|
762
|
+
else
|
774
763
|
return (char *) 0;
|
775
764
|
*u = uu;
|
776
765
|
}
|
777
766
|
return c;
|
778
767
|
}
|
779
768
|
|
780
|
-
/*
|
769
|
+
/*
|
781
770
|
Pack 'void *' into a string buffer.
|
782
771
|
*/
|
783
772
|
SWIGRUNTIME char *
|
@@ -837,18 +826,18 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
837
826
|
#endif
|
838
827
|
|
839
828
|
/* Errors in SWIG */
|
840
|
-
#define SWIG_UnknownError -1
|
841
|
-
#define SWIG_IOError -2
|
842
|
-
#define SWIG_RuntimeError -3
|
843
|
-
#define SWIG_IndexError -4
|
844
|
-
#define SWIG_TypeError -5
|
845
|
-
#define SWIG_DivisionByZero -6
|
846
|
-
#define SWIG_OverflowError -7
|
847
|
-
#define SWIG_SyntaxError -8
|
848
|
-
#define SWIG_ValueError -9
|
829
|
+
#define SWIG_UnknownError -1
|
830
|
+
#define SWIG_IOError -2
|
831
|
+
#define SWIG_RuntimeError -3
|
832
|
+
#define SWIG_IndexError -4
|
833
|
+
#define SWIG_TypeError -5
|
834
|
+
#define SWIG_DivisionByZero -6
|
835
|
+
#define SWIG_OverflowError -7
|
836
|
+
#define SWIG_SyntaxError -8
|
837
|
+
#define SWIG_ValueError -9
|
849
838
|
#define SWIG_SystemError -10
|
850
839
|
#define SWIG_AttributeError -11
|
851
|
-
#define SWIG_MemoryError -12
|
840
|
+
#define SWIG_MemoryError -12
|
852
841
|
#define SWIG_NullReferenceError -13
|
853
842
|
|
854
843
|
|
@@ -1774,7 +1763,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
|
|
1774
1763
|
SWIGINTERN
|
1775
1764
|
int SWIG_Ruby_isCallable( VALUE proc )
|
1776
1765
|
{
|
1777
|
-
if ( rb_respond_to( proc, swig_call_id )
|
1766
|
+
if ( rb_respond_to( proc, swig_call_id ) )
|
1778
1767
|
return 1;
|
1779
1768
|
return 0;
|
1780
1769
|
}
|
@@ -1787,7 +1776,7 @@ int SWIG_Ruby_isCallable( VALUE proc )
|
|
1787
1776
|
SWIGINTERN
|
1788
1777
|
int SWIG_Ruby_arity( VALUE proc, int minimal )
|
1789
1778
|
{
|
1790
|
-
if ( rb_respond_to( proc, swig_arity_id )
|
1779
|
+
if ( rb_respond_to( proc, swig_arity_id ) )
|
1791
1780
|
{
|
1792
1781
|
VALUE num = rb_funcall( proc, swig_arity_id, 0 );
|
1793
1782
|
int arity = NUM2INT(num);
|
@@ -1838,7 +1827,7 @@ static VALUE mID3v1;
|
|
1838
1827
|
#define SWIG_RUBY_THREAD_END_BLOCK
|
1839
1828
|
|
1840
1829
|
|
1841
|
-
#define SWIGVERSION
|
1830
|
+
#define SWIGVERSION 0x020012
|
1842
1831
|
#define SWIG_VERSION SWIGVERSION
|
1843
1832
|
|
1844
1833
|
|
@@ -1859,9 +1848,11 @@ static VALUE mID3v1;
|
|
1859
1848
|
#if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
|
1860
1849
|
# include <ruby/encoding.h>
|
1861
1850
|
# define ASSOCIATE_UTF8_ENCODING(value) rb_enc_associate(value, rb_utf8_encoding());
|
1851
|
+
# define ASSOCIATE_FILESYSTEM_ENCODING(value) rb_enc_associate(value, rb_filesystem_encoding());
|
1862
1852
|
# define CONVERT_TO_UTF8(value) rb_str_export_to_enc(value, rb_utf8_encoding())
|
1863
1853
|
#else
|
1864
1854
|
# define ASSOCIATE_UTF8_ENCODING(value) /* nothing */
|
1855
|
+
# define ASSOCIATE_FILESYSTEM_ENCODING(value)
|
1865
1856
|
# define CONVERT_TO_UTF8(value) value
|
1866
1857
|
#endif
|
1867
1858
|
|
@@ -1922,12 +1913,15 @@ TagLib::StringList ruby_array_to_taglib_string_list(VALUE ary) {
|
|
1922
1913
|
}
|
1923
1914
|
|
1924
1915
|
VALUE taglib_filename_to_ruby_string(TagLib::FileName filename) {
|
1916
|
+
VALUE result;
|
1925
1917
|
#ifdef _WIN32
|
1926
1918
|
const char *s = (const char *) filename;
|
1927
|
-
|
1919
|
+
result = rb_tainted_str_new2(s);
|
1928
1920
|
#else
|
1929
|
-
|
1921
|
+
result = rb_tainted_str_new2(filename);
|
1930
1922
|
#endif
|
1923
|
+
ASSOCIATE_FILESYSTEM_ENCODING(result);
|
1924
|
+
return result;
|
1931
1925
|
}
|
1932
1926
|
|
1933
1927
|
TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
|
@@ -2016,7 +2010,7 @@ SWIG_ruby_failed(void)
|
|
2016
2010
|
}
|
2017
2011
|
|
2018
2012
|
|
2019
|
-
/*@SWIG:/usr/local/share/swig/2.0.
|
2013
|
+
/*@SWIG:/usr/local/share/swig/2.0.12/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2020
2014
|
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
|
2021
2015
|
{
|
2022
2016
|
VALUE obj = args[0];
|
@@ -2072,7 +2066,7 @@ SWIG_From_unsigned_SS_int (unsigned int value)
|
|
2072
2066
|
}
|
2073
2067
|
|
2074
2068
|
|
2075
|
-
/*@SWIG:/usr/local/share/swig/2.0.
|
2069
|
+
/*@SWIG:/usr/local/share/swig/2.0.12/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2076
2070
|
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
|
2077
2071
|
{
|
2078
2072
|
VALUE obj = args[0];
|
@@ -2823,18 +2817,18 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
2823
2817
|
|
2824
2818
|
/* -----------------------------------------------------------------------------
|
2825
2819
|
* Type initialization:
|
2826
|
-
* This problem is tough by the requirement that no dynamic
|
2827
|
-
* memory is used. Also, since swig_type_info structures store pointers to
|
2820
|
+
* This problem is tough by the requirement that no dynamic
|
2821
|
+
* memory is used. Also, since swig_type_info structures store pointers to
|
2828
2822
|
* swig_cast_info structures and swig_cast_info structures store pointers back
|
2829
|
-
* to swig_type_info structures, we need some lookup code at initialization.
|
2830
|
-
* The idea is that swig generates all the structures that are needed.
|
2831
|
-
* The runtime then collects these partially filled structures.
|
2832
|
-
* The SWIG_InitializeModule function takes these initial arrays out of
|
2823
|
+
* to swig_type_info structures, we need some lookup code at initialization.
|
2824
|
+
* The idea is that swig generates all the structures that are needed.
|
2825
|
+
* The runtime then collects these partially filled structures.
|
2826
|
+
* The SWIG_InitializeModule function takes these initial arrays out of
|
2833
2827
|
* swig_module, and does all the lookup, filling in the swig_module.types
|
2834
2828
|
* array with the correct data and linking the correct swig_cast_info
|
2835
2829
|
* structures together.
|
2836
2830
|
*
|
2837
|
-
* The generated swig_type_info structures are assigned staticly to an initial
|
2831
|
+
* The generated swig_type_info structures are assigned staticly to an initial
|
2838
2832
|
* array. We just loop through that array, and handle each type individually.
|
2839
2833
|
* First we lookup if this type has been already loaded, and if so, use the
|
2840
2834
|
* loaded structure instead of the generated one. Then we have to fill in the
|
@@ -2844,17 +2838,17 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
2844
2838
|
* a column is one of the swig_cast_info structures for that type.
|
2845
2839
|
* The cast_initial array is actually an array of arrays, because each row has
|
2846
2840
|
* a variable number of columns. So to actually build the cast linked list,
|
2847
|
-
* we find the array of casts associated with the type, and loop through it
|
2841
|
+
* we find the array of casts associated with the type, and loop through it
|
2848
2842
|
* adding the casts to the list. The one last trick we need to do is making
|
2849
2843
|
* sure the type pointer in the swig_cast_info struct is correct.
|
2850
2844
|
*
|
2851
|
-
* First off, we lookup the cast->type name to see if it is already loaded.
|
2845
|
+
* First off, we lookup the cast->type name to see if it is already loaded.
|
2852
2846
|
* There are three cases to handle:
|
2853
2847
|
* 1) If the cast->type has already been loaded AND the type we are adding
|
2854
2848
|
* casting info to has not been loaded (it is in this module), THEN we
|
2855
2849
|
* replace the cast->type pointer with the type pointer that has already
|
2856
2850
|
* been loaded.
|
2857
|
-
* 2) If BOTH types (the one we are adding casting info to, and the
|
2851
|
+
* 2) If BOTH types (the one we are adding casting info to, and the
|
2858
2852
|
* cast->type) are loaded, THEN the cast info has already been loaded by
|
2859
2853
|
* the previous module so we just ignore it.
|
2860
2854
|
* 3) Finally, if cast->type has not already been loaded, then we add that
|
@@ -2917,7 +2911,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
2917
2911
|
module_head->next = &swig_module;
|
2918
2912
|
}
|
2919
2913
|
|
2920
|
-
/* When multiple
|
2914
|
+
/* When multiple interpreters are used, a module could have already been initialized in
|
2921
2915
|
a different interpreter, but not yet have a pointer in this interpreter.
|
2922
2916
|
In this case, we do not want to continue adding types... everything should be
|
2923
2917
|
set up already */
|
@@ -2931,7 +2925,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
2931
2925
|
swig_type_info *type = 0;
|
2932
2926
|
swig_type_info *ret;
|
2933
2927
|
swig_cast_info *cast;
|
2934
|
-
|
2928
|
+
|
2935
2929
|
#ifdef SWIGRUNTIME_DEBUG
|
2936
2930
|
printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
|
2937
2931
|
#endif
|
@@ -2958,7 +2952,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
2958
2952
|
/* Insert casting types */
|
2959
2953
|
cast = swig_module.cast_initial[i];
|
2960
2954
|
while (cast->type) {
|
2961
|
-
|
2955
|
+
|
2962
2956
|
/* Don't need to add information already in the list */
|
2963
2957
|
ret = 0;
|
2964
2958
|
#ifdef SWIGRUNTIME_DEBUG
|