]> git.sesse.net Git - vlc/commitdiff
Mark VLC_PUBLIC_API as extern "C" when using C++.
authorPierre d'Herbemont <pdherbemont@free.fr>
Tue, 18 Mar 2008 22:15:30 +0000 (23:15 +0100)
committerPierre d'Herbemont <pdherbemont@free.fr>
Tue, 18 Mar 2008 23:03:29 +0000 (00:03 +0100)
include/vlc_common.h

index bc179a0f4b075ea753cd43ce0f1009c8f97733e1..79d6dd750d65556bab0d9631f1e508a444b9029f 100644 (file)
@@ -468,12 +468,12 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
 #else
 #  ifdef __cplusplus
 #    ifdef HAVE_ATTRIBUTE_VISIBILITY
-#      define VLC_PUBLIC_API __attribute__((visibility("default")))
-#      define VLC_PRIVATE_API __attribute__((visibility("default")))
+#      define VLC_PUBLIC_API extern "C" __attribute__((visibility("default")))
+#      define VLC_PRIVATE_API extern "C" __attribute__((visibility("default")))
 #      define   VLC_EXPORT( type, name, args ) extern "C" __attribute__((visibility("default"))) type name args
 #      define VLC_INTERNAL( type, name, args ) extern "C" __attribute__((visibility("hidden"))) type name args
 #    else
-#      define VLC_PUBLIC_API
+#      define VLC_PUBLIC_API extern "C"
 #      define   VLC_EXPORT( type, name, args ) extern "C" type name args
 #      define VLC_INTERNAL( type, name, args ) extern "C" type name args
 #    endif