]> git.sesse.net Git - vlc/blobdiff - include/modules_inner.h
* modules/codec/ffmpeg/video.c: fixed the last direct rendering bug.
[vlc] / include / modules_inner.h
index e5bd723c0e7c7a21333577a40b68a4e72a6b2575..d7b5af1dccfd0d6827fe84513cd88974bc62e560 100644 (file)
@@ -2,7 +2,7 @@
  * modules_inner.h : Macros used from within a module.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules_inner.h,v 1.32 2002/09/30 11:05:33 sam Exp $
+ * $Id: modules_inner.h,v 1.37 2003/01/19 03:16:24 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -10,7 +10,7 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 #   define STORE_SYMBOLS           p_symbols = p_module->p_symbols
 #endif
 
+#if defined( __PLUGIN__ ) && ( defined( WIN32 ) || defined( UNDER_CE ) )
+#   define DLL_SYMBOL              __declspec(dllexport)
+#   define CDECL_SYMBOL            __cdecl
+#else
+#   define DLL_SYMBOL
+#   define CDECL_SYMBOL
+#endif
+
 #if defined( __cplusplus )
 #   define EXTERN_SYMBOL           extern "C"
 #else
@@ -80,7 +88,8 @@
  */
 #define vlc_module_begin( )                                                   \
     DECLARE_SYMBOLS;                                                          \
-    EXTERN_SYMBOL int __VLC_SYMBOL(vlc_entry) ( module_t *p_module )          \
+    EXTERN_SYMBOL DLL_SYMBOL int CDECL_SYMBOL                                 \
+    __VLC_SYMBOL(vlc_entry) ( module_t *p_module )                            \
     {                                                                         \
         int i_shortcut = 1, i_config = 0;                                     \
         module_config_t p_config[ 100 ];                                      \
             p_submodule->pp_shortcuts[ i_shortcut ] = NULL;                   \
         }                                                                     \
         {                                                                     \
-           module_config_t tmp = { CONFIG_HINT_END, NULL, NULL, '\0' };      \
+            static module_config_t tmp = { CONFIG_HINT_END, NULL, NULL, '\0', \
+                                           NULL, NULL, NULL, 0, 0.0, 0, 0,    \
+                                           0.0, 0.0, NULL,NULL, NULL,         \
+                                           VLC_FALSE };                       \
             p_config[ i_config ] = tmp;                                       \
         }                                                                     \
         config_Duplicate( p_module, p_config );                               \
         if( p_module->p_config == NULL )                                      \
         {                                                                     \
-            return -1;                                                        \
+            return VLC_EGENERIC;                                              \
         }                                                                     \
-        return 0 && i_shortcut;                                               \
+        return VLC_SUCCESS && i_shortcut;                                     \
     }                                                                         \
-    int __VLC_SYMBOL(vlc_entry) ( module_t * ) /* the ; gets added */
+    struct _u_n_u_s_e_d_ /* the ; gets added */
 
 
 #define add_submodule( )                                                      \
     p_submodule->i_cpu = p_module->i_cpu;                                     \
     p_submodule->pf_activate = NULL;                                          \
     p_submodule->pf_deactivate = NULL
-    
+
 #define add_requirement( cap )                                                \
     p_module->i_cpu |= CPU_CAPABILITY_##cap