[vlc-devel] commit: Revert "Remove VLC_PRIVATE_API" (Pierre d'Herbemont )

git version control git at videolan.org
Mon May 26 13:51:51 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Mon May 26 13:33:03 2008 +0200| [eb01699c9b2b17b77e3a356f6b3380b4a4c94d51]

Revert "Remove VLC_PRIVATE_API"

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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eb01699c9b2b17b77e3a356f6b3380b4a4c94d51
---

 include/vlc_common.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/vlc_common.h b/include/vlc_common.h
index 33c9e63..bd81a06 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -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




More information about the vlc-devel mailing list