]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
strsep does not need to be exported for now
[vlc] / include / vlc_common.h
index 1e7bbf16b622677f1cde6b7d65eede018a8b1594..65158d04126fd3ed7fb988df553c05f2ebb0782d 100644 (file)
@@ -106,6 +106,13 @@ typedef uint32_t vlc_fourcc_t;
 
 #endif
 
+/**
+ * Translate a vlc_fourcc into its string representation. This function
+ * assumes there is enough room in psz_fourcc to store 4 characters in.
+ *
+ * \param fcc a vlc_fourcc_t
+ * \param psz_fourcc string to store string representation of vlc_fourcc in
+ */
 static inline void __vlc_fourcc_to_char( vlc_fourcc_t fcc, char *psz_fourcc )
 {
     memcpy( psz_fourcc, &fcc, 4 );
@@ -532,8 +539,12 @@ typedef struct vlc_object_internals_t vlc_object_internals_t;
 /**@}*/                                                                     \
 
 /* VLC_OBJECT: attempt at doing a clever cast */
-#define VLC_OBJECT( x ) \
-    (((vlc_object_t *)(x))+0*(x)->be_sure_to_add_VLC_COMMON_MEMBERS_to_struct)
+#ifdef __GNUC__
+# define VLC_OBJECT( x ) \
+    (((vlc_object_t *)(x))+0*(((typeof(x))0)->be_sure_to_add_VLC_COMMON_MEMBERS_to_struct))
+#else
+# define VLC_OBJECT( x ) ((vlc_object_t *)(x))
+#endif
 
 #define VLC_GC_MEMBERS                                                       \
 /** \name VLC_GC_MEMBERS                                                     \
@@ -744,6 +755,7 @@ VLC_EXPORT( size_t, vlc_strlcpy, ( char *, const char *, size_t ) );
 VLC_EXPORT( long long, vlc_strtoll, ( const char *nptr, char **endptr, int base ) );
 
 VLC_EXPORT( char *, vlc_strcasestr, ( const char *s1, const char *s2 ) );
+char *vlc_strsep( char **, const char * );
 
 #if defined(WIN32) || defined(UNDER_CE)
 /* win32, cl and icl support */