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
|
static void free_taglib_mpeg_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);
|
@@ -1848,7 +1837,7 @@ static VALUE mMPEG;
|
|
1848
1837
|
#define SWIG_RUBY_THREAD_END_BLOCK
|
1849
1838
|
|
1850
1839
|
|
1851
|
-
#define SWIGVERSION
|
1840
|
+
#define SWIGVERSION 0x020012
|
1852
1841
|
#define SWIG_VERSION SWIGVERSION
|
1853
1842
|
|
1854
1843
|
|
@@ -1876,9 +1865,11 @@ static bool taglib_ruby_mpeg_file_save(TagLib::MPEG::File *file, int tags, bool
|
|
1876
1865
|
#if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
|
1877
1866
|
# include <ruby/encoding.h>
|
1878
1867
|
# define ASSOCIATE_UTF8_ENCODING(value) rb_enc_associate(value, rb_utf8_encoding());
|
1868
|
+
# define ASSOCIATE_FILESYSTEM_ENCODING(value) rb_enc_associate(value, rb_filesystem_encoding());
|
1879
1869
|
# define CONVERT_TO_UTF8(value) rb_str_export_to_enc(value, rb_utf8_encoding())
|
1880
1870
|
#else
|
1881
1871
|
# define ASSOCIATE_UTF8_ENCODING(value) /* nothing */
|
1872
|
+
# define ASSOCIATE_FILESYSTEM_ENCODING(value)
|
1882
1873
|
# define CONVERT_TO_UTF8(value) value
|
1883
1874
|
#endif
|
1884
1875
|
|
@@ -1939,12 +1930,15 @@ TagLib::StringList ruby_array_to_taglib_string_list(VALUE ary) {
|
|
1939
1930
|
}
|
1940
1931
|
|
1941
1932
|
VALUE taglib_filename_to_ruby_string(TagLib::FileName filename) {
|
1933
|
+
VALUE result;
|
1942
1934
|
#ifdef _WIN32
|
1943
1935
|
const char *s = (const char *) filename;
|
1944
|
-
|
1936
|
+
result = rb_tainted_str_new2(s);
|
1945
1937
|
#else
|
1946
|
-
|
1938
|
+
result = rb_tainted_str_new2(filename);
|
1947
1939
|
#endif
|
1940
|
+
ASSOCIATE_FILESYSTEM_ENCODING(result);
|
1941
|
+
return result;
|
1948
1942
|
}
|
1949
1943
|
|
1950
1944
|
TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
|
@@ -2067,7 +2061,7 @@ SWIG_ruby_failed(void)
|
|
2067
2061
|
}
|
2068
2062
|
|
2069
2063
|
|
2070
|
-
/*@SWIG:/usr/local/share/swig/2.0.
|
2064
|
+
/*@SWIG:/usr/local/share/swig/2.0.12/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2071
2065
|
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
|
2072
2066
|
{
|
2073
2067
|
VALUE obj = args[0];
|
@@ -4486,18 +4480,18 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
4486
4480
|
|
4487
4481
|
/* -----------------------------------------------------------------------------
|
4488
4482
|
* Type initialization:
|
4489
|
-
* This problem is tough by the requirement that no dynamic
|
4490
|
-
* memory is used. Also, since swig_type_info structures store pointers to
|
4483
|
+
* This problem is tough by the requirement that no dynamic
|
4484
|
+
* memory is used. Also, since swig_type_info structures store pointers to
|
4491
4485
|
* swig_cast_info structures and swig_cast_info structures store pointers back
|
4492
|
-
* to swig_type_info structures, we need some lookup code at initialization.
|
4493
|
-
* The idea is that swig generates all the structures that are needed.
|
4494
|
-
* The runtime then collects these partially filled structures.
|
4495
|
-
* The SWIG_InitializeModule function takes these initial arrays out of
|
4486
|
+
* to swig_type_info structures, we need some lookup code at initialization.
|
4487
|
+
* The idea is that swig generates all the structures that are needed.
|
4488
|
+
* The runtime then collects these partially filled structures.
|
4489
|
+
* The SWIG_InitializeModule function takes these initial arrays out of
|
4496
4490
|
* swig_module, and does all the lookup, filling in the swig_module.types
|
4497
4491
|
* array with the correct data and linking the correct swig_cast_info
|
4498
4492
|
* structures together.
|
4499
4493
|
*
|
4500
|
-
* The generated swig_type_info structures are assigned staticly to an initial
|
4494
|
+
* The generated swig_type_info structures are assigned staticly to an initial
|
4501
4495
|
* array. We just loop through that array, and handle each type individually.
|
4502
4496
|
* First we lookup if this type has been already loaded, and if so, use the
|
4503
4497
|
* loaded structure instead of the generated one. Then we have to fill in the
|
@@ -4507,17 +4501,17 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
4507
4501
|
* a column is one of the swig_cast_info structures for that type.
|
4508
4502
|
* The cast_initial array is actually an array of arrays, because each row has
|
4509
4503
|
* a variable number of columns. So to actually build the cast linked list,
|
4510
|
-
* we find the array of casts associated with the type, and loop through it
|
4504
|
+
* we find the array of casts associated with the type, and loop through it
|
4511
4505
|
* adding the casts to the list. The one last trick we need to do is making
|
4512
4506
|
* sure the type pointer in the swig_cast_info struct is correct.
|
4513
4507
|
*
|
4514
|
-
* First off, we lookup the cast->type name to see if it is already loaded.
|
4508
|
+
* First off, we lookup the cast->type name to see if it is already loaded.
|
4515
4509
|
* There are three cases to handle:
|
4516
4510
|
* 1) If the cast->type has already been loaded AND the type we are adding
|
4517
4511
|
* casting info to has not been loaded (it is in this module), THEN we
|
4518
4512
|
* replace the cast->type pointer with the type pointer that has already
|
4519
4513
|
* been loaded.
|
4520
|
-
* 2) If BOTH types (the one we are adding casting info to, and the
|
4514
|
+
* 2) If BOTH types (the one we are adding casting info to, and the
|
4521
4515
|
* cast->type) are loaded, THEN the cast info has already been loaded by
|
4522
4516
|
* the previous module so we just ignore it.
|
4523
4517
|
* 3) Finally, if cast->type has not already been loaded, then we add that
|
@@ -4580,7 +4574,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
4580
4574
|
module_head->next = &swig_module;
|
4581
4575
|
}
|
4582
4576
|
|
4583
|
-
/* When multiple
|
4577
|
+
/* When multiple interpreters are used, a module could have already been initialized in
|
4584
4578
|
a different interpreter, but not yet have a pointer in this interpreter.
|
4585
4579
|
In this case, we do not want to continue adding types... everything should be
|
4586
4580
|
set up already */
|
@@ -4594,7 +4588,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
4594
4588
|
swig_type_info *type = 0;
|
4595
4589
|
swig_type_info *ret;
|
4596
4590
|
swig_cast_info *cast;
|
4597
|
-
|
4591
|
+
|
4598
4592
|
#ifdef SWIGRUNTIME_DEBUG
|
4599
4593
|
printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
|
4600
4594
|
#endif
|
@@ -4621,7 +4615,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
4621
4615
|
/* Insert casting types */
|
4622
4616
|
cast = swig_module.cast_initial[i];
|
4623
4617
|
while (cast->type) {
|
4624
|
-
|
4618
|
+
|
4625
4619
|
/* Don't need to add information already in the list */
|
4626
4620
|
ret = 0;
|
4627
4621
|
#ifdef SWIGRUNTIME_DEBUG
|