slackware-current/source/l/id3lib/patches/id3lib.c_wrapper.patch
Patrick J Volkerding 646a5c1cbf Mon May 28 19:12:29 UTC 2018
a/pkgtools-15.0-noarch-13.txz:  Rebuilt.
  installpkg: default line length for --terselength is the number of columns.
  removepkg: added --terse mode.
  upgradepkg: default line length for --terselength is the number of columns.
  upgradepkg: accept -option in addition to --option.
ap/vim-8.1.0026-x86_64-1.txz:  Upgraded.
d/bison-3.0.5-x86_64-1.txz:  Upgraded.
e/emacs-26.1-x86_64-1.txz:  Upgraded.
kde/kopete-4.14.3-x86_64-8.txz:  Rebuilt.
  Recompiled against libidn-1.35.
n/conntrack-tools-1.4.5-x86_64-1.txz:  Upgraded.
n/libnetfilter_conntrack-1.0.7-x86_64-1.txz:  Upgraded.
n/libnftnl-1.1.0-x86_64-1.txz:  Upgraded.
n/links-2.16-x86_64-2.txz:  Rebuilt.
  Rebuilt to enable X driver for -g mode.
n/lynx-2.8.9dev.19-x86_64-1.txz:  Upgraded.
n/nftables-0.8.5-x86_64-1.txz:  Upgraded.
n/p11-kit-0.23.11-x86_64-1.txz:  Upgraded.
n/ulogd-2.0.7-x86_64-1.txz:  Upgraded.
n/whois-5.3.1-x86_64-1.txz:  Upgraded.
xap/network-manager-applet-1.8.12-x86_64-1.txz:  Upgraded.
xap/vim-gvim-8.1.0026-x86_64-1.txz:  Upgraded.
2018-05-31 23:39:35 +02:00

58 lines
1.9 KiB
Diff

This patch adds C wrapper functions for field encoding.
It was first introduced in version 3.8.3-8 and fixes
http://bugs.debian.org/281292
--- a/include/id3.h
+++ b/include/id3.h
@@ -104,6 +104,9 @@
ID3_C_EXPORT void CCONV ID3Field_GetBINARY (const ID3Field *field, uchar *buffer, size_t buffLength);
ID3_C_EXPORT void CCONV ID3Field_FromFile (ID3Field *field, const char *fileName);
ID3_C_EXPORT void CCONV ID3Field_ToFile (const ID3Field *field, const char *fileName);
+ ID3_C_EXPORT bool CCONV ID3Field_SetEncoding (ID3Field *field, ID3_TextEnc enc);
+ ID3_C_EXPORT ID3_TextEnc CCONV ID3Field_GetEncoding (const ID3Field *field);
+ ID3_C_EXPORT bool CCONV ID3Field_IsEncodable (const ID3Field *field);
/* field-info wrappers */
ID3_C_EXPORT char* CCONV ID3FrameInfo_ShortName (ID3_FrameID frameid);
--- a/src/c_wrapper.cpp
+++ b/src/c_wrapper.cpp
@@ -681,6 +681,39 @@
}
}
+ ID3_C_EXPORT bool CCONV
+ ID3Field_SetEncoding(ID3Field *field, ID3_TextEnc enc)
+ {
+ bool changed = false;
+ if (field)
+ {
+ ID3_CATCH(changed = reinterpret_cast<ID3_Field *>(field)->SetEncoding(enc));
+ }
+ return changed;
+ }
+
+ ID3_C_EXPORT ID3_TextEnc CCONV
+ ID3Field_GetEncoding(const ID3Field *field)
+ {
+ ID3_TextEnc enc = ID3TE_NONE;
+ if (field)
+ {
+ ID3_CATCH(enc = reinterpret_cast<const ID3_Field *>(field)->GetEncoding());
+ }
+ return enc;
+ }
+
+ ID3_C_EXPORT bool CCONV
+ ID3Field_IsEncodable(const ID3Field *field)
+ {
+ bool isEncodable = false;
+ if (field)
+ {
+ ID3_CATCH(isEncodable = reinterpret_cast<const ID3_Field *>(field)->IsEncodable());
+ }
+ return isEncodable;
+ }
+
#ifdef __cplusplus
}
#endif /* __cplusplus */