taglib-ruby 1.1.2 → 1.1.3

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.
@@ -1,42 +1,14 @@
1
1
  /* ----------------------------------------------------------------------------
2
- * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 4.0.2
2
+ * This file was automatically generated by SWIG (https://www.swig.org).
3
+ * Version 4.1.1
4
4
  *
5
- * This file is not intended to be easily readable and contains a number of
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.
5
+ * Do not make changes to this file unless you know what you are doing - modify
6
+ * the SWIG interface file instead.
9
7
  * ----------------------------------------------------------------------------- */
10
8
 
11
9
 
12
- #ifndef SWIGRUBY
10
+ #define SWIG_VERSION 0x040101
13
11
  #define SWIGRUBY
14
- #endif
15
-
16
-
17
-
18
- #ifdef __cplusplus
19
- /* SwigValueWrapper is described in swig.swg */
20
- template<typename T> class SwigValueWrapper {
21
- struct SwigMovePointer {
22
- T *ptr;
23
- SwigMovePointer(T *p) : ptr(p) { }
24
- ~SwigMovePointer() { delete ptr; }
25
- SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
26
- } pointer;
27
- SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
28
- SwigValueWrapper(const SwigValueWrapper<T>& rhs);
29
- public:
30
- SwigValueWrapper() : pointer(0) { }
31
- SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
32
- operator T&() const { return *pointer.ptr; }
33
- T *operator&() { return pointer.ptr; }
34
- };
35
-
36
- template <typename T> T SwigValueInit() {
37
- return T();
38
- }
39
- #endif
40
12
 
41
13
  /* -----------------------------------------------------------------------------
42
14
  * This section contains generic SWIG labels for method/variable
@@ -332,6 +304,8 @@ template <typename T> T SwigValueInit() {
332
304
  #define SWIG_POINTER_DISOWN 0x1
333
305
  #define SWIG_CAST_NEW_MEMORY 0x2
334
306
  #define SWIG_POINTER_NO_NULL 0x4
307
+ #define SWIG_POINTER_CLEAR 0x8
308
+ #define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)
335
309
 
336
310
  /* Flags for new pointer objects */
337
311
  #define SWIG_POINTER_OWN 0x1
@@ -403,7 +377,7 @@ template <typename T> T SwigValueInit() {
403
377
  SWIG errors code.
404
378
 
405
379
  Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
406
- allows to return the 'cast rank', for example, if you have this
380
+ allows returning the 'cast rank', for example, if you have this
407
381
 
408
382
  int food(double)
409
383
  int fooi(int);
@@ -417,7 +391,13 @@ template <typename T> T SwigValueInit() {
417
391
  */
418
392
 
419
393
  #define SWIG_OK (0)
394
+ /* Runtime errors are < 0 */
420
395
  #define SWIG_ERROR (-1)
396
+ /* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
397
+ /* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
398
+ /* Errors < -200 are generic runtime specific errors */
399
+ #define SWIG_ERROR_RELEASE_NOT_OWNED (-200)
400
+
421
401
  #define SWIG_IsOK(r) (r >= 0)
422
402
  #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
423
403
 
@@ -432,7 +412,7 @@ template <typename T> T SwigValueInit() {
432
412
  #define SWIG_OLDOBJ (SWIG_OK)
433
413
  #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
434
414
  #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
435
- /* Check, add and del mask methods */
415
+ /* Check, add and del object mask methods */
436
416
  #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
437
417
  #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
438
418
  #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
@@ -578,7 +558,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
578
558
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
579
559
  */
580
560
  SWIGRUNTIME swig_cast_info *
581
- SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
561
+ SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty) {
582
562
  if (ty) {
583
563
  swig_cast_info *iter = ty->cast;
584
564
  while (iter) {
@@ -638,9 +618,9 @@ SWIG_TypeName(const swig_type_info *ty) {
638
618
  SWIGRUNTIME const char *
639
619
  SWIG_TypePrettyName(const swig_type_info *type) {
640
620
  /* The "str" field contains the equivalent pretty names of the
641
- type, separated by vertical-bar characters. We choose
642
- to print the last name, as it is often (?) the most
643
- specific. */
621
+ type, separated by vertical-bar characters. Choose the last
622
+ name. It should be the most specific; a fully resolved name
623
+ but not necessarily with default template parameters expanded. */
644
624
  if (!type) return NULL;
645
625
  if (type->str != NULL) {
646
626
  const char *last_name = type->str;
@@ -860,7 +840,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
860
840
  }
861
841
  #endif
862
842
 
863
- /* Errors in SWIG */
843
+ /* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
864
844
  #define SWIG_UnknownError -1
865
845
  #define SWIG_IOError -2
866
846
  #define SWIG_RuntimeError -3
@@ -876,9 +856,25 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
876
856
  #define SWIG_NullReferenceError -13
877
857
 
878
858
 
859
+ #if __GNUC__ >= 7
860
+ #pragma GCC diagnostic push
861
+ #if defined(__cplusplus)
862
+ #pragma GCC diagnostic ignored "-Wregister"
863
+ #if __GNUC__ >= 10
864
+ #pragma GCC diagnostic ignored "-Wvolatile"
865
+ #if __GNUC__ >= 11
866
+ #pragma GCC diagnostic ignored "-Wdeprecated-enum-enum-conversion"
867
+ #endif
868
+ #endif
869
+ #endif
870
+ #endif
879
871
 
880
872
  #include <ruby.h>
881
873
 
874
+ #if __GNUC__ >= 7
875
+ #pragma GCC diagnostic pop
876
+ #endif
877
+
882
878
  /* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
883
879
  * breaks using rb_intern as an lvalue, as SWIG does. We work around this
884
880
  * issue for now by disabling this.
@@ -1658,6 +1654,11 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1658
1654
  own->own = 0;
1659
1655
  }
1660
1656
 
1657
+ if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE)) {
1658
+ if (!RDATA(obj)->dfree)
1659
+ return SWIG_ERROR_RELEASE_NOT_OWNED;
1660
+ }
1661
+
1661
1662
  /* Check to see if the input object is giving up ownership
1662
1663
  of the underlying C struct or C++ object. If so then we
1663
1664
  need to reset the destructor since the Ruby object no
@@ -1669,7 +1670,7 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1669
1670
  swig_class *sklass = (swig_class *) ty->clientdata;
1670
1671
  track = sklass->trackObjects;
1671
1672
  }
1672
-
1673
+
1673
1674
  if (track) {
1674
1675
  /* We are tracking objects for this class. Thus we change the destructor
1675
1676
  * to SWIG_RubyRemoveTracking. This allows us to
@@ -1683,6 +1684,10 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1683
1684
  }
1684
1685
  }
1685
1686
 
1687
+ if (flags & SWIG_POINTER_CLEAR) {
1688
+ DATA_PTR(obj) = 0;
1689
+ }
1690
+
1686
1691
  /* Do type-checking if type info was provided */
1687
1692
  if (ty) {
1688
1693
  if (ty->clientdata) {
@@ -1790,6 +1795,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
1790
1795
  {
1791
1796
  /* register a new class */
1792
1797
  VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
1798
+ rb_undef_alloc_func(cl);
1793
1799
  /* create and store the structure pointer to a global variable */
1794
1800
  swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
1795
1801
  rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
@@ -1820,7 +1826,7 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
1820
1826
  {
1821
1827
  if ( rb_respond_to( proc, swig_arity_id ) )
1822
1828
  {
1823
- VALUE num = rb_funcall( proc, swig_arity_id, 0 );
1829
+ VALUE num = rb_funcall2( proc, swig_arity_id, 0, 0 );
1824
1830
  int arity = NUM2INT(num);
1825
1831
  if ( arity < 0 && (arity+1) < -minimal ) return 1;
1826
1832
  if ( arity == minimal ) return 1;
@@ -1838,7 +1844,7 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
1838
1844
 
1839
1845
  #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1840
1846
 
1841
- #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1847
+ #define SWIG_contract_assert(expr, msg) do { if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } } while (0)
1842
1848
 
1843
1849
 
1844
1850
 
@@ -1864,12 +1870,56 @@ static swig_module_info swig_module = {swig_types, 8, 0, 0, 0, 0};
1864
1870
 
1865
1871
  static VALUE mFLAC;
1866
1872
 
1867
- #define SWIG_RUBY_THREAD_BEGIN_BLOCK
1868
- #define SWIG_RUBY_THREAD_END_BLOCK
1873
+ #ifdef __cplusplus
1874
+ #include <utility>
1875
+ /* SwigValueWrapper is described in swig.swg */
1876
+ template<typename T> class SwigValueWrapper {
1877
+ struct SwigSmartPointer {
1878
+ T *ptr;
1879
+ SwigSmartPointer(T *p) : ptr(p) { }
1880
+ ~SwigSmartPointer() { delete ptr; }
1881
+ SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
1882
+ void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; }
1883
+ } pointer;
1884
+ SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
1885
+ SwigValueWrapper(const SwigValueWrapper<T>& rhs);
1886
+ public:
1887
+ SwigValueWrapper() : pointer(0) { }
1888
+ SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; }
1889
+ #if __cplusplus >=201103L
1890
+ SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; }
1891
+ operator T&&() const { return std::move(*pointer.ptr); }
1892
+ #else
1893
+ operator T&() const { return *pointer.ptr; }
1894
+ #endif
1895
+ T *operator&() const { return pointer.ptr; }
1896
+ static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); }
1897
+ };
1869
1898
 
1899
+ /*
1900
+ * SwigValueInit() is a generic initialisation solution as the following approach:
1901
+ *
1902
+ * T c_result = T();
1903
+ *
1904
+ * doesn't compile for all types for example:
1905
+ *
1906
+ * unsigned int c_result = unsigned int();
1907
+ */
1908
+ template <typename T> T SwigValueInit() {
1909
+ return T();
1910
+ }
1870
1911
 
1871
- #define SWIGVERSION 0x040002
1872
- #define SWIG_VERSION SWIGVERSION
1912
+ #if __cplusplus >=201103L
1913
+ # define SWIG_STD_MOVE(OBJ) std::move(OBJ)
1914
+ #else
1915
+ # define SWIG_STD_MOVE(OBJ) OBJ
1916
+ #endif
1917
+
1918
+ #endif
1919
+
1920
+
1921
+ #define SWIG_RUBY_THREAD_BEGIN_BLOCK
1922
+ #define SWIG_RUBY_THREAD_END_BLOCK
1873
1923
 
1874
1924
 
1875
1925
  #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
@@ -2107,7 +2157,7 @@ SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2))
2107
2157
  }
2108
2158
 
2109
2159
 
2110
- /*@SWIG:/usr/local/Cellar/swig/4.0.2/share/swig/4.0.2/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2160
+ /*@SWIG:/usr/local/Cellar/swig/4.1.1/share/swig/4.1.1/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2111
2161
  SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg)
2112
2162
  {
2113
2163
  VALUE *args = (VALUE *)arg;
@@ -2261,7 +2311,7 @@ SWIGINTERN VALUE _wrap_new_Picture(int nargs, VALUE *args, VALUE self) {
2261
2311
  return _wrap_new_Picture__SWIG_0(nargs, args, self);
2262
2312
  }
2263
2313
  if (argc == 1) {
2264
- int _v;
2314
+ int _v = 0;
2265
2315
  int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
2266
2316
  _v = SWIG_CheckState(res);
2267
2317
  if (_v) {
@@ -2771,10 +2821,10 @@ static void *_p_TagLib__FLAC__PictureTo_p_TagLib__FLAC__MetadataBlock(void *x, i
2771
2821
  }
2772
2822
  static swig_type_info _swigt__p_TagLib__FLAC__MetadataBlock = {"_p_TagLib__FLAC__MetadataBlock", "TagLib::FLAC::MetadataBlock *", 0, 0, (void*)0, 0};
2773
2823
  static swig_type_info _swigt__p_TagLib__FLAC__Picture = {"_p_TagLib__FLAC__Picture", "TagLib::FLAC::Picture *", 0, 0, (void*)0, 0};
2774
- static swig_type_info _swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t = {"_p_TagLib__ListT_TagLib__FLAC__Picture_t", "TagLib::List< TagLib::FLAC::Picture > *|TagLib::FLAC::PictureList *", 0, 0, (void*)0, 0};
2824
+ static swig_type_info _swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t = {"_p_TagLib__ListT_TagLib__FLAC__Picture_t", "TagLib::FLAC::PictureList *|TagLib::List< TagLib::FLAC::Picture > *", 0, 0, (void*)0, 0};
2775
2825
  static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
2776
2826
  static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0};
2777
- static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|TagLib::uint *", 0, 0, (void*)0, 0};
2827
+ static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0};
2778
2828
  static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0};
2779
2829
  static swig_type_info _swigt__p_wchar_t = {"_p_wchar_t", "TagLib::wchar *|wchar_t *", 0, 0, (void*)0, 0};
2780
2830
 
@@ -2864,9 +2914,12 @@ extern "C" {
2864
2914
  #define SWIGRUNTIME_DEBUG
2865
2915
  #endif
2866
2916
 
2917
+ #ifndef SWIG_INIT_CLIENT_DATA_TYPE
2918
+ #define SWIG_INIT_CLIENT_DATA_TYPE void *
2919
+ #endif
2867
2920
 
2868
2921
  SWIGRUNTIME void
2869
- SWIG_InitializeModule(void *clientdata) {
2922
+ SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata) {
2870
2923
  size_t i;
2871
2924
  swig_module_info *module_head, *iter;
2872
2925
  int init;
@@ -1,42 +1,14 @@
1
1
  /* ----------------------------------------------------------------------------
2
- * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 4.0.2
2
+ * This file was automatically generated by SWIG (https://www.swig.org).
3
+ * Version 4.1.1
4
4
  *
5
- * This file is not intended to be easily readable and contains a number of
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.
5
+ * Do not make changes to this file unless you know what you are doing - modify
6
+ * the SWIG interface file instead.
9
7
  * ----------------------------------------------------------------------------- */
10
8
 
11
9
 
12
- #ifndef SWIGRUBY
10
+ #define SWIG_VERSION 0x040101
13
11
  #define SWIGRUBY
14
- #endif
15
-
16
-
17
-
18
- #ifdef __cplusplus
19
- /* SwigValueWrapper is described in swig.swg */
20
- template<typename T> class SwigValueWrapper {
21
- struct SwigMovePointer {
22
- T *ptr;
23
- SwigMovePointer(T *p) : ptr(p) { }
24
- ~SwigMovePointer() { delete ptr; }
25
- SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
26
- } pointer;
27
- SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
28
- SwigValueWrapper(const SwigValueWrapper<T>& rhs);
29
- public:
30
- SwigValueWrapper() : pointer(0) { }
31
- SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
32
- operator T&() const { return *pointer.ptr; }
33
- T *operator&() { return pointer.ptr; }
34
- };
35
-
36
- template <typename T> T SwigValueInit() {
37
- return T();
38
- }
39
- #endif
40
12
 
41
13
  /* -----------------------------------------------------------------------------
42
14
  * This section contains generic SWIG labels for method/variable
@@ -332,6 +304,8 @@ template <typename T> T SwigValueInit() {
332
304
  #define SWIG_POINTER_DISOWN 0x1
333
305
  #define SWIG_CAST_NEW_MEMORY 0x2
334
306
  #define SWIG_POINTER_NO_NULL 0x4
307
+ #define SWIG_POINTER_CLEAR 0x8
308
+ #define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)
335
309
 
336
310
  /* Flags for new pointer objects */
337
311
  #define SWIG_POINTER_OWN 0x1
@@ -403,7 +377,7 @@ template <typename T> T SwigValueInit() {
403
377
  SWIG errors code.
404
378
 
405
379
  Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
406
- allows to return the 'cast rank', for example, if you have this
380
+ allows returning the 'cast rank', for example, if you have this
407
381
 
408
382
  int food(double)
409
383
  int fooi(int);
@@ -417,7 +391,13 @@ template <typename T> T SwigValueInit() {
417
391
  */
418
392
 
419
393
  #define SWIG_OK (0)
394
+ /* Runtime errors are < 0 */
420
395
  #define SWIG_ERROR (-1)
396
+ /* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
397
+ /* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
398
+ /* Errors < -200 are generic runtime specific errors */
399
+ #define SWIG_ERROR_RELEASE_NOT_OWNED (-200)
400
+
421
401
  #define SWIG_IsOK(r) (r >= 0)
422
402
  #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
423
403
 
@@ -432,7 +412,7 @@ template <typename T> T SwigValueInit() {
432
412
  #define SWIG_OLDOBJ (SWIG_OK)
433
413
  #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
434
414
  #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
435
- /* Check, add and del mask methods */
415
+ /* Check, add and del object mask methods */
436
416
  #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
437
417
  #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
438
418
  #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
@@ -578,7 +558,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
578
558
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
579
559
  */
580
560
  SWIGRUNTIME swig_cast_info *
581
- SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
561
+ SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty) {
582
562
  if (ty) {
583
563
  swig_cast_info *iter = ty->cast;
584
564
  while (iter) {
@@ -638,9 +618,9 @@ SWIG_TypeName(const swig_type_info *ty) {
638
618
  SWIGRUNTIME const char *
639
619
  SWIG_TypePrettyName(const swig_type_info *type) {
640
620
  /* The "str" field contains the equivalent pretty names of the
641
- type, separated by vertical-bar characters. We choose
642
- to print the last name, as it is often (?) the most
643
- specific. */
621
+ type, separated by vertical-bar characters. Choose the last
622
+ name. It should be the most specific; a fully resolved name
623
+ but not necessarily with default template parameters expanded. */
644
624
  if (!type) return NULL;
645
625
  if (type->str != NULL) {
646
626
  const char *last_name = type->str;
@@ -860,7 +840,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
860
840
  }
861
841
  #endif
862
842
 
863
- /* Errors in SWIG */
843
+ /* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
864
844
  #define SWIG_UnknownError -1
865
845
  #define SWIG_IOError -2
866
846
  #define SWIG_RuntimeError -3
@@ -876,9 +856,25 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
876
856
  #define SWIG_NullReferenceError -13
877
857
 
878
858
 
859
+ #if __GNUC__ >= 7
860
+ #pragma GCC diagnostic push
861
+ #if defined(__cplusplus)
862
+ #pragma GCC diagnostic ignored "-Wregister"
863
+ #if __GNUC__ >= 10
864
+ #pragma GCC diagnostic ignored "-Wvolatile"
865
+ #if __GNUC__ >= 11
866
+ #pragma GCC diagnostic ignored "-Wdeprecated-enum-enum-conversion"
867
+ #endif
868
+ #endif
869
+ #endif
870
+ #endif
879
871
 
880
872
  #include <ruby.h>
881
873
 
874
+ #if __GNUC__ >= 7
875
+ #pragma GCC diagnostic pop
876
+ #endif
877
+
882
878
  /* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
883
879
  * breaks using rb_intern as an lvalue, as SWIG does. We work around this
884
880
  * issue for now by disabling this.
@@ -1658,6 +1654,11 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1658
1654
  own->own = 0;
1659
1655
  }
1660
1656
 
1657
+ if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE)) {
1658
+ if (!RDATA(obj)->dfree)
1659
+ return SWIG_ERROR_RELEASE_NOT_OWNED;
1660
+ }
1661
+
1661
1662
  /* Check to see if the input object is giving up ownership
1662
1663
  of the underlying C struct or C++ object. If so then we
1663
1664
  need to reset the destructor since the Ruby object no
@@ -1669,7 +1670,7 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1669
1670
  swig_class *sklass = (swig_class *) ty->clientdata;
1670
1671
  track = sklass->trackObjects;
1671
1672
  }
1672
-
1673
+
1673
1674
  if (track) {
1674
1675
  /* We are tracking objects for this class. Thus we change the destructor
1675
1676
  * to SWIG_RubyRemoveTracking. This allows us to
@@ -1683,6 +1684,10 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1683
1684
  }
1684
1685
  }
1685
1686
 
1687
+ if (flags & SWIG_POINTER_CLEAR) {
1688
+ DATA_PTR(obj) = 0;
1689
+ }
1690
+
1686
1691
  /* Do type-checking if type info was provided */
1687
1692
  if (ty) {
1688
1693
  if (ty->clientdata) {
@@ -1790,6 +1795,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
1790
1795
  {
1791
1796
  /* register a new class */
1792
1797
  VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
1798
+ rb_undef_alloc_func(cl);
1793
1799
  /* create and store the structure pointer to a global variable */
1794
1800
  swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
1795
1801
  rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
@@ -1820,7 +1826,7 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
1820
1826
  {
1821
1827
  if ( rb_respond_to( proc, swig_arity_id ) )
1822
1828
  {
1823
- VALUE num = rb_funcall( proc, swig_arity_id, 0 );
1829
+ VALUE num = rb_funcall2( proc, swig_arity_id, 0, 0 );
1824
1830
  int arity = NUM2INT(num);
1825
1831
  if ( arity < 0 && (arity+1) < -minimal ) return 1;
1826
1832
  if ( arity == minimal ) return 1;
@@ -1838,7 +1844,7 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
1838
1844
 
1839
1845
  #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1840
1846
 
1841
- #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1847
+ #define SWIG_contract_assert(expr, msg) do { if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } } while (0)
1842
1848
 
1843
1849
 
1844
1850
 
@@ -1866,12 +1872,56 @@ static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0};
1866
1872
 
1867
1873
  static VALUE mID3v1;
1868
1874
 
1869
- #define SWIG_RUBY_THREAD_BEGIN_BLOCK
1870
- #define SWIG_RUBY_THREAD_END_BLOCK
1875
+ #ifdef __cplusplus
1876
+ #include <utility>
1877
+ /* SwigValueWrapper is described in swig.swg */
1878
+ template<typename T> class SwigValueWrapper {
1879
+ struct SwigSmartPointer {
1880
+ T *ptr;
1881
+ SwigSmartPointer(T *p) : ptr(p) { }
1882
+ ~SwigSmartPointer() { delete ptr; }
1883
+ SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
1884
+ void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; }
1885
+ } pointer;
1886
+ SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
1887
+ SwigValueWrapper(const SwigValueWrapper<T>& rhs);
1888
+ public:
1889
+ SwigValueWrapper() : pointer(0) { }
1890
+ SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; }
1891
+ #if __cplusplus >=201103L
1892
+ SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; }
1893
+ operator T&&() const { return std::move(*pointer.ptr); }
1894
+ #else
1895
+ operator T&() const { return *pointer.ptr; }
1896
+ #endif
1897
+ T *operator&() const { return pointer.ptr; }
1898
+ static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); }
1899
+ };
1871
1900
 
1901
+ /*
1902
+ * SwigValueInit() is a generic initialisation solution as the following approach:
1903
+ *
1904
+ * T c_result = T();
1905
+ *
1906
+ * doesn't compile for all types for example:
1907
+ *
1908
+ * unsigned int c_result = unsigned int();
1909
+ */
1910
+ template <typename T> T SwigValueInit() {
1911
+ return T();
1912
+ }
1872
1913
 
1873
- #define SWIGVERSION 0x040002
1874
- #define SWIG_VERSION SWIGVERSION
1914
+ #if __cplusplus >=201103L
1915
+ # define SWIG_STD_MOVE(OBJ) std::move(OBJ)
1916
+ #else
1917
+ # define SWIG_STD_MOVE(OBJ) OBJ
1918
+ #endif
1919
+
1920
+ #endif
1921
+
1922
+
1923
+ #define SWIG_RUBY_THREAD_BEGIN_BLOCK
1924
+ #define SWIG_RUBY_THREAD_END_BLOCK
1875
1925
 
1876
1926
 
1877
1927
  #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
@@ -2078,7 +2128,7 @@ SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2))
2078
2128
  }
2079
2129
 
2080
2130
 
2081
- /*@SWIG:/usr/local/Cellar/swig/4.0.2/share/swig/4.0.2/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2131
+ /*@SWIG:/usr/local/Cellar/swig/4.1.1/share/swig/4.1.1/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2082
2132
  SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg)
2083
2133
  {
2084
2134
  VALUE *args = (VALUE *)arg;
@@ -2135,7 +2185,7 @@ SWIG_From_unsigned_SS_int (unsigned int value)
2135
2185
  }
2136
2186
 
2137
2187
 
2138
- /*@SWIG:/usr/local/Cellar/swig/4.0.2/share/swig/4.0.2/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2188
+ /*@SWIG:/usr/local/Cellar/swig/4.1.1/share/swig/4.1.1/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2139
2189
  SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE arg)
2140
2190
  {
2141
2191
  VALUE *args = (VALUE *)arg;
@@ -2397,7 +2447,7 @@ SWIGINTERN VALUE _wrap_new_Tag(int nargs, VALUE *args, VALUE self) {
2397
2447
  return _wrap_new_Tag__SWIG_0(nargs, args, self);
2398
2448
  }
2399
2449
  if (argc == 2) {
2400
- int _v;
2450
+ int _v = 0;
2401
2451
  void *vptr = 0;
2402
2452
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__File, 0);
2403
2453
  _v = SWIG_CheckState(res);
@@ -3014,7 +3064,7 @@ static swig_type_info _swigt__p_TagLib__ID3v1__Tag = {"_p_TagLib__ID3v1__Tag", "
3014
3064
  static swig_type_info _swigt__p_TagLib__Tag = {"_p_TagLib__Tag", "TagLib::Tag *", 0, 0, (void*)0, 0};
3015
3065
  static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
3016
3066
  static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0};
3017
- static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|TagLib::uint *", 0, 0, (void*)0, 0};
3067
+ static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0};
3018
3068
  static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0};
3019
3069
  static swig_type_info _swigt__p_wchar_t = {"_p_wchar_t", "TagLib::wchar *|wchar_t *", 0, 0, (void*)0, 0};
3020
3070
 
@@ -3035,7 +3085,7 @@ static swig_cast_info _swigc__p_MapT_TagLib__String_int_t[] = { {&_swigt__p_Map
3035
3085
  static swig_cast_info _swigc__p_TagLib__File[] = { {&_swigt__p_TagLib__File, 0, 0, 0},{0, 0, 0, 0}};
3036
3086
  static swig_cast_info _swigc__p_TagLib__ID3v1__StringHandler[] = { {&_swigt__p_TagLib__ID3v1__StringHandler, 0, 0, 0},{0, 0, 0, 0}};
3037
3087
  static swig_cast_info _swigc__p_TagLib__ID3v1__Tag[] = { {&_swigt__p_TagLib__ID3v1__Tag, 0, 0, 0},{0, 0, 0, 0}};
3038
- static swig_cast_info _swigc__p_TagLib__Tag[] = { {&_swigt__p_TagLib__ID3v1__Tag, _p_TagLib__ID3v1__TagTo_p_TagLib__Tag, 0, 0}, {&_swigt__p_TagLib__Tag, 0, 0, 0},{0, 0, 0, 0}};
3088
+ static swig_cast_info _swigc__p_TagLib__Tag[] = { {&_swigt__p_TagLib__Tag, 0, 0, 0}, {&_swigt__p_TagLib__ID3v1__Tag, _p_TagLib__ID3v1__TagTo_p_TagLib__Tag, 0, 0},{0, 0, 0, 0}};
3039
3089
  static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
3040
3090
  static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
3041
3091
  static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
@@ -3110,9 +3160,12 @@ extern "C" {
3110
3160
  #define SWIGRUNTIME_DEBUG
3111
3161
  #endif
3112
3162
 
3163
+ #ifndef SWIG_INIT_CLIENT_DATA_TYPE
3164
+ #define SWIG_INIT_CLIENT_DATA_TYPE void *
3165
+ #endif
3113
3166
 
3114
3167
  SWIGRUNTIME void
3115
- SWIG_InitializeModule(void *clientdata) {
3168
+ SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata) {
3116
3169
  size_t i;
3117
3170
  swig_module_info *module_head, *iter;
3118
3171
  int init;