]> granicus.if.org Git - libass/commitdiff
Add extern "C" guard to public header
authorOleg Oshmyan <chortos@inbox.lv>
Fri, 16 Jan 2015 11:26:13 +0000 (13:26 +0200)
committerOleg Oshmyan <chortos@inbox.lv>
Fri, 16 Jan 2015 12:16:59 +0000 (14:16 +0200)
Our public headers can be #included from C++. Hence, ass.h needs
an extern "C" guard to declare the correct linkage for functions.
ass_types.h only defines types, so it does not need a guard.

libass/ass.h

index 4673032fe44578f216aa57c4e72ab9853cc3c199..ca9d8afb55cc7eb6bc208ce8223591b083a765f8 100644 (file)
 
 #define LIBASS_VERSION 0x01201000
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * A linked list of images produced by an ass renderer.
  *
@@ -536,4 +540,8 @@ void ass_clear_fonts(ASS_Library *library);
  */
 long long ass_step_sub(ASS_Track *track, long long now, int movement);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LIBASS_ASS_H */