taglib-ruby 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- 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);
|
@@ -1840,7 +1829,7 @@ static VALUE mOgg;
|
|
1840
1829
|
#define SWIG_RUBY_THREAD_END_BLOCK
|
1841
1830
|
|
1842
1831
|
|
1843
|
-
#define SWIGVERSION
|
1832
|
+
#define SWIGVERSION 0x020012
|
1844
1833
|
#define SWIG_VERSION SWIGVERSION
|
1845
1834
|
|
1846
1835
|
|
@@ -1863,9 +1852,11 @@ static VALUE mOgg;
|
|
1863
1852
|
#if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
|
1864
1853
|
# include <ruby/encoding.h>
|
1865
1854
|
# define ASSOCIATE_UTF8_ENCODING(value) rb_enc_associate(value, rb_utf8_encoding());
|
1855
|
+
# define ASSOCIATE_FILESYSTEM_ENCODING(value) rb_enc_associate(value, rb_filesystem_encoding());
|
1866
1856
|
# define CONVERT_TO_UTF8(value) rb_str_export_to_enc(value, rb_utf8_encoding())
|
1867
1857
|
#else
|
1868
1858
|
# define ASSOCIATE_UTF8_ENCODING(value) /* nothing */
|
1859
|
+
# define ASSOCIATE_FILESYSTEM_ENCODING(value)
|
1869
1860
|
# define CONVERT_TO_UTF8(value) value
|
1870
1861
|
#endif
|
1871
1862
|
|
@@ -1926,12 +1917,15 @@ TagLib::StringList ruby_array_to_taglib_string_list(VALUE ary) {
|
|
1926
1917
|
}
|
1927
1918
|
|
1928
1919
|
VALUE taglib_filename_to_ruby_string(TagLib::FileName filename) {
|
1920
|
+
VALUE result;
|
1929
1921
|
#ifdef _WIN32
|
1930
1922
|
const char *s = (const char *) filename;
|
1931
|
-
|
1923
|
+
result = rb_tainted_str_new2(s);
|
1932
1924
|
#else
|
1933
|
-
|
1925
|
+
result = rb_tainted_str_new2(filename);
|
1934
1926
|
#endif
|
1927
|
+
ASSOCIATE_FILESYSTEM_ENCODING(result);
|
1928
|
+
return result;
|
1935
1929
|
}
|
1936
1930
|
|
1937
1931
|
TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
|
@@ -1980,7 +1974,7 @@ SWIG_ruby_failed(void)
|
|
1980
1974
|
}
|
1981
1975
|
|
1982
1976
|
|
1983
|
-
/*@SWIG:/usr/local/share/swig/2.0.
|
1977
|
+
/*@SWIG:/usr/local/share/swig/2.0.12/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
1984
1978
|
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
|
1985
1979
|
{
|
1986
1980
|
VALUE obj = args[0];
|
@@ -2099,7 +2093,7 @@ SWIG_From_unsigned_SS_int (unsigned int value)
|
|
2099
2093
|
}
|
2100
2094
|
|
2101
2095
|
|
2102
|
-
/*@SWIG:/usr/local/share/swig/2.0.
|
2096
|
+
/*@SWIG:/usr/local/share/swig/2.0.12/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2103
2097
|
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
|
2104
2098
|
{
|
2105
2099
|
VALUE obj = args[0];
|
@@ -3337,18 +3331,18 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
3337
3331
|
|
3338
3332
|
/* -----------------------------------------------------------------------------
|
3339
3333
|
* Type initialization:
|
3340
|
-
* This problem is tough by the requirement that no dynamic
|
3341
|
-
* memory is used. Also, since swig_type_info structures store pointers to
|
3334
|
+
* This problem is tough by the requirement that no dynamic
|
3335
|
+
* memory is used. Also, since swig_type_info structures store pointers to
|
3342
3336
|
* swig_cast_info structures and swig_cast_info structures store pointers back
|
3343
|
-
* to swig_type_info structures, we need some lookup code at initialization.
|
3344
|
-
* The idea is that swig generates all the structures that are needed.
|
3345
|
-
* The runtime then collects these partially filled structures.
|
3346
|
-
* The SWIG_InitializeModule function takes these initial arrays out of
|
3337
|
+
* to swig_type_info structures, we need some lookup code at initialization.
|
3338
|
+
* The idea is that swig generates all the structures that are needed.
|
3339
|
+
* The runtime then collects these partially filled structures.
|
3340
|
+
* The SWIG_InitializeModule function takes these initial arrays out of
|
3347
3341
|
* swig_module, and does all the lookup, filling in the swig_module.types
|
3348
3342
|
* array with the correct data and linking the correct swig_cast_info
|
3349
3343
|
* structures together.
|
3350
3344
|
*
|
3351
|
-
* The generated swig_type_info structures are assigned staticly to an initial
|
3345
|
+
* The generated swig_type_info structures are assigned staticly to an initial
|
3352
3346
|
* array. We just loop through that array, and handle each type individually.
|
3353
3347
|
* First we lookup if this type has been already loaded, and if so, use the
|
3354
3348
|
* loaded structure instead of the generated one. Then we have to fill in the
|
@@ -3358,17 +3352,17 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
3358
3352
|
* a column is one of the swig_cast_info structures for that type.
|
3359
3353
|
* The cast_initial array is actually an array of arrays, because each row has
|
3360
3354
|
* a variable number of columns. So to actually build the cast linked list,
|
3361
|
-
* we find the array of casts associated with the type, and loop through it
|
3355
|
+
* we find the array of casts associated with the type, and loop through it
|
3362
3356
|
* adding the casts to the list. The one last trick we need to do is making
|
3363
3357
|
* sure the type pointer in the swig_cast_info struct is correct.
|
3364
3358
|
*
|
3365
|
-
* First off, we lookup the cast->type name to see if it is already loaded.
|
3359
|
+
* First off, we lookup the cast->type name to see if it is already loaded.
|
3366
3360
|
* There are three cases to handle:
|
3367
3361
|
* 1) If the cast->type has already been loaded AND the type we are adding
|
3368
3362
|
* casting info to has not been loaded (it is in this module), THEN we
|
3369
3363
|
* replace the cast->type pointer with the type pointer that has already
|
3370
3364
|
* been loaded.
|
3371
|
-
* 2) If BOTH types (the one we are adding casting info to, and the
|
3365
|
+
* 2) If BOTH types (the one we are adding casting info to, and the
|
3372
3366
|
* cast->type) are loaded, THEN the cast info has already been loaded by
|
3373
3367
|
* the previous module so we just ignore it.
|
3374
3368
|
* 3) Finally, if cast->type has not already been loaded, then we add that
|
@@ -3431,7 +3425,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
3431
3425
|
module_head->next = &swig_module;
|
3432
3426
|
}
|
3433
3427
|
|
3434
|
-
/* When multiple
|
3428
|
+
/* When multiple interpreters are used, a module could have already been initialized in
|
3435
3429
|
a different interpreter, but not yet have a pointer in this interpreter.
|
3436
3430
|
In this case, we do not want to continue adding types... everything should be
|
3437
3431
|
set up already */
|
@@ -3445,7 +3439,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
3445
3439
|
swig_type_info *type = 0;
|
3446
3440
|
swig_type_info *ret;
|
3447
3441
|
swig_cast_info *cast;
|
3448
|
-
|
3442
|
+
|
3449
3443
|
#ifdef SWIGRUNTIME_DEBUG
|
3450
3444
|
printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
|
3451
3445
|
#endif
|
@@ -3472,7 +3466,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
3472
3466
|
/* Insert casting types */
|
3473
3467
|
cast = swig_module.cast_initial[i];
|
3474
3468
|
while (cast->type) {
|
3475
|
-
|
3469
|
+
|
3476
3470
|
/* Don't need to add information already in the list */
|
3477
3471
|
ret = 0;
|
3478
3472
|
#ifdef SWIGRUNTIME_DEBUG
|