]> git.sesse.net Git - vlc/commitdiff
Revert "Remove VLC_PRIVATE_API"
authorPierre d'Herbemont <pdherbemont@videolan.org>
Mon, 26 May 2008 11:33:03 +0000 (13:33 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Mon, 26 May 2008 11:52:50 +0000 (13:52 +0200)
This reverts commit 96cc9c261db1c616efa2fbc0aea21bc70b1e46fc.

This commit is reverted because we are using a regexp to determine the list of exported symbols in libvlc. However some private symbols start with libvlc_, this produces (here on Mac OS X) a nmedit error about symbols not being found while exported. A solution is to externalize those private symbols, hence using VLC_PUBLIC_API.

Feel free to come up with a better solution.

include/vlc_common.h

index 33c9e63bbb2afab5ccd9abaafa5a7e52e5822897..bd81a06f8f9c83c52833ad57ab5a0352334565b1 100644 (file)
@@ -390,15 +390,18 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
 #if defined (WIN32) && defined (DLL_EXPORT)
 #  ifdef __cplusplus
 #    define VLC_PUBLIC_API extern "C" __declspec(dllexport)
+#    define VLC_PRIVATE_API extern "C" __declspec(dllexport)
 #    define   VLC_EXPORT( type, name, args ) extern "C" __declspec(dllexport) type name args
 #  else
 #    define VLC_PUBLIC_API extern __declspec(dllexport)
+#    define VLC_PRIVATE_API extern __declspec(dllexport)
 #    define   VLC_EXPORT( type, name, args ) __declspec(dllexport) type name args
 #  endif
 #else
 #  ifdef __cplusplus
 #    ifdef HAVE_ATTRIBUTE_VISIBILITY
 #      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
 #    else
 #      define VLC_PUBLIC_API extern "C"
@@ -407,9 +410,11 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
 #  else
 #    ifdef HAVE_ATTRIBUTE_VISIBILITY
 #      define VLC_PUBLIC_API extern __attribute__((visibility("default")))
+#      define VLC_PRIVATE_API extern __attribute__((visibility("default")))
 #      define   VLC_EXPORT( type, name, args ) __attribute__((visibility("default"))) type name args
 #    else
 #      define VLC_PUBLIC_API extern
+#      define VLC_PRIVATE_API extern
 #      define   VLC_EXPORT( type, name, args ) extern type name args
 #    endif
 #  endif