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
|
static void free_taglib_vorbis_file(void *ptr);
|
@@ -68,28 +68,28 @@ template <typename T> T SwigValueInit() {
|
|
68
68
|
#ifndef SWIGUNUSED
|
69
69
|
# if defined(__GNUC__)
|
70
70
|
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
71
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
71
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
72
72
|
# else
|
73
73
|
# define SWIGUNUSED
|
74
74
|
# endif
|
75
75
|
# elif defined(__ICC)
|
76
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
76
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
77
77
|
# else
|
78
|
-
# define SWIGUNUSED
|
78
|
+
# define SWIGUNUSED
|
79
79
|
# endif
|
80
80
|
#endif
|
81
81
|
|
82
82
|
#ifndef SWIG_MSC_UNSUPPRESS_4505
|
83
83
|
# if defined(_MSC_VER)
|
84
84
|
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
85
|
-
# endif
|
85
|
+
# endif
|
86
86
|
#endif
|
87
87
|
|
88
88
|
#ifndef SWIGUNUSEDPARM
|
89
89
|
# ifdef __cplusplus
|
90
90
|
# define SWIGUNUSEDPARM(p)
|
91
91
|
# else
|
92
|
-
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
92
|
+
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
93
93
|
# endif
|
94
94
|
#endif
|
95
95
|
|
@@ -132,7 +132,7 @@ template <typename T> T SwigValueInit() {
|
|
132
132
|
# define SWIGSTDCALL __stdcall
|
133
133
|
# else
|
134
134
|
# define SWIGSTDCALL
|
135
|
-
# endif
|
135
|
+
# endif
|
136
136
|
#endif
|
137
137
|
|
138
138
|
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
|
@@ -177,28 +177,28 @@ template <typename T> T SwigValueInit() {
|
|
177
177
|
#ifndef SWIGUNUSED
|
178
178
|
# if defined(__GNUC__)
|
179
179
|
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
180
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
180
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
181
181
|
# else
|
182
182
|
# define SWIGUNUSED
|
183
183
|
# endif
|
184
184
|
# elif defined(__ICC)
|
185
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
185
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
186
186
|
# else
|
187
|
-
# define SWIGUNUSED
|
187
|
+
# define SWIGUNUSED
|
188
188
|
# endif
|
189
189
|
#endif
|
190
190
|
|
191
191
|
#ifndef SWIG_MSC_UNSUPPRESS_4505
|
192
192
|
# if defined(_MSC_VER)
|
193
193
|
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
194
|
-
# endif
|
194
|
+
# endif
|
195
195
|
#endif
|
196
196
|
|
197
197
|
#ifndef SWIGUNUSEDPARM
|
198
198
|
# ifdef __cplusplus
|
199
199
|
# define SWIGUNUSEDPARM(p)
|
200
200
|
# else
|
201
|
-
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
201
|
+
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
202
202
|
# endif
|
203
203
|
#endif
|
204
204
|
|
@@ -241,7 +241,7 @@ template <typename T> T SwigValueInit() {
|
|
241
241
|
# define SWIGSTDCALL __stdcall
|
242
242
|
# else
|
243
243
|
# define SWIGSTDCALL
|
244
|
-
# endif
|
244
|
+
# endif
|
245
245
|
#endif
|
246
246
|
|
247
247
|
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
|
@@ -279,7 +279,7 @@ template <typename T> T SwigValueInit() {
|
|
279
279
|
You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
|
280
280
|
creating a static or dynamic library from the SWIG runtime code.
|
281
281
|
In 99.9% of the cases, SWIG just needs to declare them as 'static'.
|
282
|
-
|
282
|
+
|
283
283
|
But only do this if strictly necessary, ie, if you have problems
|
284
284
|
with your compiler or suchlike.
|
285
285
|
*/
|
@@ -305,16 +305,16 @@ template <typename T> T SwigValueInit() {
|
|
305
305
|
#define SWIG_POINTER_OWN 0x1
|
306
306
|
|
307
307
|
|
308
|
-
/*
|
308
|
+
/*
|
309
309
|
Flags/methods for returning states.
|
310
|
-
|
311
|
-
The SWIG conversion methods, as ConvertPtr, return an integer
|
310
|
+
|
311
|
+
The SWIG conversion methods, as ConvertPtr, return an integer
|
312
312
|
that tells if the conversion was successful or not. And if not,
|
313
313
|
an error code can be returned (see swigerrors.swg for the codes).
|
314
|
-
|
314
|
+
|
315
315
|
Use the following macros/flags to set or process the returning
|
316
316
|
states.
|
317
|
-
|
317
|
+
|
318
318
|
In old versions of SWIG, code such as the following was usually written:
|
319
319
|
|
320
320
|
if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
|
@@ -347,23 +347,23 @@ template <typename T> T SwigValueInit() {
|
|
347
347
|
} else {
|
348
348
|
// fail code
|
349
349
|
}
|
350
|
-
|
350
|
+
|
351
351
|
I.e., now SWIG_ConvertPtr can return new objects and you can
|
352
352
|
identify the case and take care of the deallocation. Of course that
|
353
353
|
also requires SWIG_ConvertPtr to return new result values, such as
|
354
354
|
|
355
|
-
int SWIG_ConvertPtr(obj, ptr,...) {
|
356
|
-
if (<obj is ok>) {
|
357
|
-
if (<need new object>) {
|
358
|
-
*ptr = <ptr to new allocated object>;
|
359
|
-
return SWIG_NEWOBJ;
|
360
|
-
} else {
|
361
|
-
*ptr = <ptr to old object>;
|
362
|
-
return SWIG_OLDOBJ;
|
363
|
-
}
|
364
|
-
} else {
|
365
|
-
return SWIG_BADOBJ;
|
366
|
-
}
|
355
|
+
int SWIG_ConvertPtr(obj, ptr,...) {
|
356
|
+
if (<obj is ok>) {
|
357
|
+
if (<need new object>) {
|
358
|
+
*ptr = <ptr to new allocated object>;
|
359
|
+
return SWIG_NEWOBJ;
|
360
|
+
} else {
|
361
|
+
*ptr = <ptr to old object>;
|
362
|
+
return SWIG_OLDOBJ;
|
363
|
+
}
|
364
|
+
} else {
|
365
|
+
return SWIG_BADOBJ;
|
366
|
+
}
|
367
367
|
}
|
368
368
|
|
369
369
|
Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
|
@@ -377,17 +377,17 @@ template <typename T> T SwigValueInit() {
|
|
377
377
|
int fooi(int);
|
378
378
|
|
379
379
|
and you call
|
380
|
-
|
380
|
+
|
381
381
|
food(1) // cast rank '1' (1 -> 1.0)
|
382
382
|
fooi(1) // cast rank '0'
|
383
383
|
|
384
384
|
just use the SWIG_AddCast()/SWIG_CheckState()
|
385
385
|
*/
|
386
386
|
|
387
|
-
#define SWIG_OK (0)
|
387
|
+
#define SWIG_OK (0)
|
388
388
|
#define SWIG_ERROR (-1)
|
389
389
|
#define SWIG_IsOK(r) (r >= 0)
|
390
|
-
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
390
|
+
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
391
391
|
|
392
392
|
/* The CastRankLimit says how many bits are used for the cast rank */
|
393
393
|
#define SWIG_CASTRANKLIMIT (1 << 8)
|
@@ -418,14 +418,14 @@ template <typename T> T SwigValueInit() {
|
|
418
418
|
# endif
|
419
419
|
# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
|
420
420
|
# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
|
421
|
-
SWIGINTERNINLINE int SWIG_AddCast(int r) {
|
421
|
+
SWIGINTERNINLINE int SWIG_AddCast(int r) {
|
422
422
|
return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
|
423
423
|
}
|
424
|
-
SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
425
|
-
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
424
|
+
SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
425
|
+
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
426
426
|
}
|
427
427
|
#else /* no cast-rank mode */
|
428
|
-
# define SWIG_AddCast
|
428
|
+
# define SWIG_AddCast(r) (r)
|
429
429
|
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
|
430
430
|
#endif
|
431
431
|
|
@@ -469,7 +469,7 @@ typedef struct swig_module_info {
|
|
469
469
|
void *clientdata; /* Language specific module data */
|
470
470
|
} swig_module_info;
|
471
471
|
|
472
|
-
/*
|
472
|
+
/*
|
473
473
|
Compare two type names skipping the space characters, therefore
|
474
474
|
"char*" == "char *" and "Class<int>" == "Class<int >", etc.
|
475
475
|
|
@@ -489,18 +489,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
|
|
489
489
|
|
490
490
|
/*
|
491
491
|
Check type equivalence in a name list like <name1>|<name2>|...
|
492
|
-
Return 0 if
|
492
|
+
Return 0 if equal, -1 if nb < tb, 1 if nb > tb
|
493
493
|
*/
|
494
494
|
SWIGRUNTIME int
|
495
|
-
|
496
|
-
int equiv =
|
495
|
+
SWIG_TypeCmp(const char *nb, const char *tb) {
|
496
|
+
int equiv = 1;
|
497
497
|
const char* te = tb + strlen(tb);
|
498
498
|
const char* ne = nb;
|
499
|
-
while (
|
499
|
+
while (equiv != 0 && *ne) {
|
500
500
|
for (nb = ne; *ne; ++ne) {
|
501
501
|
if (*ne == '|') break;
|
502
502
|
}
|
503
|
-
equiv =
|
503
|
+
equiv = SWIG_TypeNameComp(nb, ne, tb, te);
|
504
504
|
if (*ne) ++ne;
|
505
505
|
}
|
506
506
|
return equiv;
|
@@ -508,24 +508,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
|
|
508
508
|
|
509
509
|
/*
|
510
510
|
Check type equivalence in a name list like <name1>|<name2>|...
|
511
|
-
Return 0 if equal,
|
511
|
+
Return 0 if not equal, 1 if equal
|
512
512
|
*/
|
513
513
|
SWIGRUNTIME int
|
514
|
-
|
515
|
-
|
516
|
-
const char* te = tb + strlen(tb);
|
517
|
-
const char* ne = nb;
|
518
|
-
while (!equiv && *ne) {
|
519
|
-
for (nb = ne; *ne; ++ne) {
|
520
|
-
if (*ne == '|') break;
|
521
|
-
}
|
522
|
-
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
|
523
|
-
if (*ne) ++ne;
|
524
|
-
}
|
525
|
-
return equiv;
|
514
|
+
SWIG_TypeEquiv(const char *nb, const char *tb) {
|
515
|
+
return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
|
526
516
|
}
|
527
517
|
|
528
|
-
|
529
518
|
/*
|
530
519
|
Check the typename
|
531
520
|
*/
|
@@ -553,7 +542,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
|
|
553
542
|
return 0;
|
554
543
|
}
|
555
544
|
|
556
|
-
/*
|
545
|
+
/*
|
557
546
|
Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
|
558
547
|
*/
|
559
548
|
SWIGRUNTIME swig_cast_info *
|
@@ -588,7 +577,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
|
|
588
577
|
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
|
589
578
|
}
|
590
579
|
|
591
|
-
/*
|
580
|
+
/*
|
592
581
|
Dynamic pointer casting. Down an inheritance hierarchy
|
593
582
|
*/
|
594
583
|
SWIGRUNTIME swig_type_info *
|
@@ -632,7 +621,7 @@ SWIG_TypePrettyName(const swig_type_info *type) {
|
|
632
621
|
return type->name;
|
633
622
|
}
|
634
623
|
|
635
|
-
/*
|
624
|
+
/*
|
636
625
|
Set the clientdata field for a type
|
637
626
|
*/
|
638
627
|
SWIGRUNTIME void
|
@@ -640,14 +629,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
|
|
640
629
|
swig_cast_info *cast = ti->cast;
|
641
630
|
/* if (ti->clientdata == clientdata) return; */
|
642
631
|
ti->clientdata = clientdata;
|
643
|
-
|
632
|
+
|
644
633
|
while (cast) {
|
645
634
|
if (!cast->converter) {
|
646
635
|
swig_type_info *tc = cast->type;
|
647
636
|
if (!tc->clientdata) {
|
648
637
|
SWIG_TypeClientData(tc, clientdata);
|
649
638
|
}
|
650
|
-
}
|
639
|
+
}
|
651
640
|
cast = cast->next;
|
652
641
|
}
|
653
642
|
}
|
@@ -656,18 +645,18 @@ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
|
|
656
645
|
SWIG_TypeClientData(ti, clientdata);
|
657
646
|
ti->owndata = 1;
|
658
647
|
}
|
659
|
-
|
648
|
+
|
660
649
|
/*
|
661
650
|
Search for a swig_type_info structure only by mangled name
|
662
651
|
Search is a O(log #types)
|
663
|
-
|
664
|
-
We start searching at module start, and finish searching when start == end.
|
652
|
+
|
653
|
+
We start searching at module start, and finish searching when start == end.
|
665
654
|
Note: if start == end at the beginning of the function, we go all the way around
|
666
655
|
the circular list.
|
667
656
|
*/
|
668
657
|
SWIGRUNTIME swig_type_info *
|
669
|
-
SWIG_MangledTypeQueryModule(swig_module_info *start,
|
670
|
-
swig_module_info *end,
|
658
|
+
SWIG_MangledTypeQueryModule(swig_module_info *start,
|
659
|
+
swig_module_info *end,
|
671
660
|
const char *name) {
|
672
661
|
swig_module_info *iter = start;
|
673
662
|
do {
|
@@ -676,11 +665,11 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
|
|
676
665
|
register size_t r = iter->size - 1;
|
677
666
|
do {
|
678
667
|
/* since l+r >= 0, we can (>> 1) instead (/ 2) */
|
679
|
-
register size_t i = (l + r) >> 1;
|
668
|
+
register size_t i = (l + r) >> 1;
|
680
669
|
const char *iname = iter->types[i]->name;
|
681
670
|
if (iname) {
|
682
671
|
register int compare = strcmp(name, iname);
|
683
|
-
if (compare == 0) {
|
672
|
+
if (compare == 0) {
|
684
673
|
return iter->types[i];
|
685
674
|
} else if (compare < 0) {
|
686
675
|
if (i) {
|
@@ -705,14 +694,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
|
|
705
694
|
Search for a swig_type_info structure for either a mangled name or a human readable name.
|
706
695
|
It first searches the mangled names of the types, which is a O(log #types)
|
707
696
|
If a type is not found it then searches the human readable names, which is O(#types).
|
708
|
-
|
709
|
-
We start searching at module start, and finish searching when start == end.
|
697
|
+
|
698
|
+
We start searching at module start, and finish searching when start == end.
|
710
699
|
Note: if start == end at the beginning of the function, we go all the way around
|
711
700
|
the circular list.
|
712
701
|
*/
|
713
702
|
SWIGRUNTIME swig_type_info *
|
714
|
-
SWIG_TypeQueryModule(swig_module_info *start,
|
715
|
-
swig_module_info *end,
|
703
|
+
SWIG_TypeQueryModule(swig_module_info *start,
|
704
|
+
swig_module_info *end,
|
716
705
|
const char *name) {
|
717
706
|
/* STEP 1: Search the name field using binary search */
|
718
707
|
swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
|
@@ -731,12 +720,12 @@ SWIG_TypeQueryModule(swig_module_info *start,
|
|
731
720
|
iter = iter->next;
|
732
721
|
} while (iter != end);
|
733
722
|
}
|
734
|
-
|
723
|
+
|
735
724
|
/* neither found a match */
|
736
725
|
return 0;
|
737
726
|
}
|
738
727
|
|
739
|
-
/*
|
728
|
+
/*
|
740
729
|
Pack binary data into a string
|
741
730
|
*/
|
742
731
|
SWIGRUNTIME char *
|
@@ -752,7 +741,7 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
|
|
752
741
|
return c;
|
753
742
|
}
|
754
743
|
|
755
|
-
/*
|
744
|
+
/*
|
756
745
|
Unpack binary data from a string
|
757
746
|
*/
|
758
747
|
SWIGRUNTIME const char *
|
@@ -766,21 +755,21 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|
766
755
|
uu = ((d - '0') << 4);
|
767
756
|
else if ((d >= 'a') && (d <= 'f'))
|
768
757
|
uu = ((d - ('a'-10)) << 4);
|
769
|
-
else
|
758
|
+
else
|
770
759
|
return (char *) 0;
|
771
760
|
d = *(c++);
|
772
761
|
if ((d >= '0') && (d <= '9'))
|
773
762
|
uu |= (d - '0');
|
774
763
|
else if ((d >= 'a') && (d <= 'f'))
|
775
764
|
uu |= (d - ('a'-10));
|
776
|
-
else
|
765
|
+
else
|
777
766
|
return (char *) 0;
|
778
767
|
*u = uu;
|
779
768
|
}
|
780
769
|
return c;
|
781
770
|
}
|
782
771
|
|
783
|
-
/*
|
772
|
+
/*
|
784
773
|
Pack 'void *' into a string buffer.
|
785
774
|
*/
|
786
775
|
SWIGRUNTIME char *
|
@@ -840,18 +829,18 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
840
829
|
#endif
|
841
830
|
|
842
831
|
/* Errors in SWIG */
|
843
|
-
#define SWIG_UnknownError -1
|
844
|
-
#define SWIG_IOError -2
|
845
|
-
#define SWIG_RuntimeError -3
|
846
|
-
#define SWIG_IndexError -4
|
847
|
-
#define SWIG_TypeError -5
|
848
|
-
#define SWIG_DivisionByZero -6
|
849
|
-
#define SWIG_OverflowError -7
|
850
|
-
#define SWIG_SyntaxError -8
|
851
|
-
#define SWIG_ValueError -9
|
832
|
+
#define SWIG_UnknownError -1
|
833
|
+
#define SWIG_IOError -2
|
834
|
+
#define SWIG_RuntimeError -3
|
835
|
+
#define SWIG_IndexError -4
|
836
|
+
#define SWIG_TypeError -5
|
837
|
+
#define SWIG_DivisionByZero -6
|
838
|
+
#define SWIG_OverflowError -7
|
839
|
+
#define SWIG_SyntaxError -8
|
840
|
+
#define SWIG_ValueError -9
|
852
841
|
#define SWIG_SystemError -10
|
853
842
|
#define SWIG_AttributeError -11
|
854
|
-
#define SWIG_MemoryError -12
|
843
|
+
#define SWIG_MemoryError -12
|
855
844
|
#define SWIG_NullReferenceError -13
|
856
845
|
|
857
846
|
|
@@ -1777,7 +1766,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
|
|
1777
1766
|
SWIGINTERN
|
1778
1767
|
int SWIG_Ruby_isCallable( VALUE proc )
|
1779
1768
|
{
|
1780
|
-
if ( rb_respond_to( proc, swig_call_id )
|
1769
|
+
if ( rb_respond_to( proc, swig_call_id ) )
|
1781
1770
|
return 1;
|
1782
1771
|
return 0;
|
1783
1772
|
}
|
@@ -1790,7 +1779,7 @@ int SWIG_Ruby_isCallable( VALUE proc )
|
|
1790
1779
|
SWIGINTERN
|
1791
1780
|
int SWIG_Ruby_arity( VALUE proc, int minimal )
|
1792
1781
|
{
|
1793
|
-
if ( rb_respond_to( proc, swig_arity_id )
|
1782
|
+
if ( rb_respond_to( proc, swig_arity_id ) )
|
1794
1783
|
{
|
1795
1784
|
VALUE num = rb_funcall( proc, swig_arity_id, 0 );
|
1796
1785
|
int arity = NUM2INT(num);
|
@@ -1844,7 +1833,7 @@ static VALUE mVorbis;
|
|
1844
1833
|
#define SWIG_RUBY_THREAD_END_BLOCK
|
1845
1834
|
|
1846
1835
|
|
1847
|
-
#define SWIGVERSION
|
1836
|
+
#define SWIGVERSION 0x020012
|
1848
1837
|
#define SWIG_VERSION SWIGVERSION
|
1849
1838
|
|
1850
1839
|
|
@@ -1867,9 +1856,11 @@ static VALUE mVorbis;
|
|
1867
1856
|
#if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
|
1868
1857
|
# include <ruby/encoding.h>
|
1869
1858
|
# define ASSOCIATE_UTF8_ENCODING(value) rb_enc_associate(value, rb_utf8_encoding());
|
1859
|
+
# define ASSOCIATE_FILESYSTEM_ENCODING(value) rb_enc_associate(value, rb_filesystem_encoding());
|
1870
1860
|
# define CONVERT_TO_UTF8(value) rb_str_export_to_enc(value, rb_utf8_encoding())
|
1871
1861
|
#else
|
1872
1862
|
# define ASSOCIATE_UTF8_ENCODING(value) /* nothing */
|
1863
|
+
# define ASSOCIATE_FILESYSTEM_ENCODING(value)
|
1873
1864
|
# define CONVERT_TO_UTF8(value) value
|
1874
1865
|
#endif
|
1875
1866
|
|
@@ -1930,12 +1921,15 @@ TagLib::StringList ruby_array_to_taglib_string_list(VALUE ary) {
|
|
1930
1921
|
}
|
1931
1922
|
|
1932
1923
|
VALUE taglib_filename_to_ruby_string(TagLib::FileName filename) {
|
1924
|
+
VALUE result;
|
1933
1925
|
#ifdef _WIN32
|
1934
1926
|
const char *s = (const char *) filename;
|
1935
|
-
|
1927
|
+
result = rb_tainted_str_new2(s);
|
1936
1928
|
#else
|
1937
|
-
|
1929
|
+
result = rb_tainted_str_new2(filename);
|
1938
1930
|
#endif
|
1931
|
+
ASSOCIATE_FILESYSTEM_ENCODING(result);
|
1932
|
+
return result;
|
1939
1933
|
}
|
1940
1934
|
|
1941
1935
|
TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
|
@@ -1984,7 +1978,7 @@ SWIG_ruby_failed(void)
|
|
1984
1978
|
}
|
1985
1979
|
|
1986
1980
|
|
1987
|
-
/*@SWIG:/usr/local/share/swig/2.0.
|
1981
|
+
/*@SWIG:/usr/local/share/swig/2.0.12/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
1988
1982
|
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
|
1989
1983
|
{
|
1990
1984
|
VALUE obj = args[0];
|
@@ -2801,18 +2795,18 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
2801
2795
|
|
2802
2796
|
/* -----------------------------------------------------------------------------
|
2803
2797
|
* Type initialization:
|
2804
|
-
* This problem is tough by the requirement that no dynamic
|
2805
|
-
* memory is used. Also, since swig_type_info structures store pointers to
|
2798
|
+
* This problem is tough by the requirement that no dynamic
|
2799
|
+
* memory is used. Also, since swig_type_info structures store pointers to
|
2806
2800
|
* swig_cast_info structures and swig_cast_info structures store pointers back
|
2807
|
-
* to swig_type_info structures, we need some lookup code at initialization.
|
2808
|
-
* The idea is that swig generates all the structures that are needed.
|
2809
|
-
* The runtime then collects these partially filled structures.
|
2810
|
-
* The SWIG_InitializeModule function takes these initial arrays out of
|
2801
|
+
* to swig_type_info structures, we need some lookup code at initialization.
|
2802
|
+
* The idea is that swig generates all the structures that are needed.
|
2803
|
+
* The runtime then collects these partially filled structures.
|
2804
|
+
* The SWIG_InitializeModule function takes these initial arrays out of
|
2811
2805
|
* swig_module, and does all the lookup, filling in the swig_module.types
|
2812
2806
|
* array with the correct data and linking the correct swig_cast_info
|
2813
2807
|
* structures together.
|
2814
2808
|
*
|
2815
|
-
* The generated swig_type_info structures are assigned staticly to an initial
|
2809
|
+
* The generated swig_type_info structures are assigned staticly to an initial
|
2816
2810
|
* array. We just loop through that array, and handle each type individually.
|
2817
2811
|
* First we lookup if this type has been already loaded, and if so, use the
|
2818
2812
|
* loaded structure instead of the generated one. Then we have to fill in the
|
@@ -2822,17 +2816,17 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
2822
2816
|
* a column is one of the swig_cast_info structures for that type.
|
2823
2817
|
* The cast_initial array is actually an array of arrays, because each row has
|
2824
2818
|
* a variable number of columns. So to actually build the cast linked list,
|
2825
|
-
* we find the array of casts associated with the type, and loop through it
|
2819
|
+
* we find the array of casts associated with the type, and loop through it
|
2826
2820
|
* adding the casts to the list. The one last trick we need to do is making
|
2827
2821
|
* sure the type pointer in the swig_cast_info struct is correct.
|
2828
2822
|
*
|
2829
|
-
* First off, we lookup the cast->type name to see if it is already loaded.
|
2823
|
+
* First off, we lookup the cast->type name to see if it is already loaded.
|
2830
2824
|
* There are three cases to handle:
|
2831
2825
|
* 1) If the cast->type has already been loaded AND the type we are adding
|
2832
2826
|
* casting info to has not been loaded (it is in this module), THEN we
|
2833
2827
|
* replace the cast->type pointer with the type pointer that has already
|
2834
2828
|
* been loaded.
|
2835
|
-
* 2) If BOTH types (the one we are adding casting info to, and the
|
2829
|
+
* 2) If BOTH types (the one we are adding casting info to, and the
|
2836
2830
|
* cast->type) are loaded, THEN the cast info has already been loaded by
|
2837
2831
|
* the previous module so we just ignore it.
|
2838
2832
|
* 3) Finally, if cast->type has not already been loaded, then we add that
|
@@ -2895,7 +2889,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
2895
2889
|
module_head->next = &swig_module;
|
2896
2890
|
}
|
2897
2891
|
|
2898
|
-
/* When multiple
|
2892
|
+
/* When multiple interpreters are used, a module could have already been initialized in
|
2899
2893
|
a different interpreter, but not yet have a pointer in this interpreter.
|
2900
2894
|
In this case, we do not want to continue adding types... everything should be
|
2901
2895
|
set up already */
|
@@ -2909,7 +2903,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
2909
2903
|
swig_type_info *type = 0;
|
2910
2904
|
swig_type_info *ret;
|
2911
2905
|
swig_cast_info *cast;
|
2912
|
-
|
2906
|
+
|
2913
2907
|
#ifdef SWIGRUNTIME_DEBUG
|
2914
2908
|
printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
|
2915
2909
|
#endif
|
@@ -2936,7 +2930,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
2936
2930
|
/* Insert casting types */
|
2937
2931
|
cast = swig_module.cast_initial[i];
|
2938
2932
|
while (cast->type) {
|
2939
|
-
|
2933
|
+
|
2940
2934
|
/* Don't need to add information already in the list */
|
2941
2935
|
ret = 0;
|
2942
2936
|
#ifdef SWIGRUNTIME_DEBUG
|