From 7491fc66ebd7a58b05e549265783920e4b24b8ca Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Mon, 22 Dec 2003 15:47:05 +0000 Subject: [PATCH] c++ compatability git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@8 d19143bc-622f-0410-bfdd-b5b2a6649095 --- mlt/src/framework/mlt.h | 9 +++++++++ mlt/src/framework/mlt_repository.c | 4 ++-- src/framework/mlt.h | 9 +++++++++ src/framework/mlt_repository.c | 4 ++-- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/mlt/src/framework/mlt.h b/mlt/src/framework/mlt.h index e38419c..1725205 100644 --- a/mlt/src/framework/mlt.h +++ b/mlt/src/framework/mlt.h @@ -21,6 +21,11 @@ #ifndef _MLT_H_ #define _MLT_H_ +#ifdef __cplusplus +extern "C" +{ +#endif + #include "mlt_factory.h" #include "mlt_frame.h" #include "mlt_multitrack.h" @@ -33,5 +38,9 @@ #include "mlt_properties.h" #include "mlt_tractor.h" +#ifdef __cplusplus +} +#endif + #endif diff --git a/mlt/src/framework/mlt_repository.c b/mlt/src/framework/mlt_repository.c index 0928b37..dcb2c25 100644 --- a/mlt/src/framework/mlt_repository.c +++ b/mlt/src/framework/mlt_repository.c @@ -66,7 +66,7 @@ static mlt_properties construct_service( mlt_properties object, char *id ) return output; } -void *construct_instance( mlt_properties service_properties, char *symbol, void *input ) +static void *construct_instance( mlt_properties service_properties, char *symbol, void *input ) { // Extract the service char *service = mlt_properties_get( service_properties, "id" ); @@ -126,7 +126,7 @@ mlt_repository mlt_repository_init( mlt_properties object_list, char *prefix, ch // Construct the repository mlt_repository this = calloc( sizeof( struct mlt_repository_s ), 1 ); - mlt_properties_init( &this->parent, NULL ); + mlt_properties_init( &this->parent, this ); // Add the symbol to THIS repository properties. mlt_properties_set( &this->parent, "_symbol", symbol ); diff --git a/src/framework/mlt.h b/src/framework/mlt.h index e38419c..1725205 100644 --- a/src/framework/mlt.h +++ b/src/framework/mlt.h @@ -21,6 +21,11 @@ #ifndef _MLT_H_ #define _MLT_H_ +#ifdef __cplusplus +extern "C" +{ +#endif + #include "mlt_factory.h" #include "mlt_frame.h" #include "mlt_multitrack.h" @@ -33,5 +38,9 @@ #include "mlt_properties.h" #include "mlt_tractor.h" +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/framework/mlt_repository.c b/src/framework/mlt_repository.c index 0928b37..dcb2c25 100644 --- a/src/framework/mlt_repository.c +++ b/src/framework/mlt_repository.c @@ -66,7 +66,7 @@ static mlt_properties construct_service( mlt_properties object, char *id ) return output; } -void *construct_instance( mlt_properties service_properties, char *symbol, void *input ) +static void *construct_instance( mlt_properties service_properties, char *symbol, void *input ) { // Extract the service char *service = mlt_properties_get( service_properties, "id" ); @@ -126,7 +126,7 @@ mlt_repository mlt_repository_init( mlt_properties object_list, char *prefix, ch // Construct the repository mlt_repository this = calloc( sizeof( struct mlt_repository_s ), 1 ); - mlt_properties_init( &this->parent, NULL ); + mlt_properties_init( &this->parent, this ); // Add the symbol to THIS repository properties. mlt_properties_set( &this->parent, "_symbol", symbol ); -- 1.7.4.4