]> git.sesse.net Git - mlt/commitdiff
Constness changes
authorRay Lehtiniemi <rayl@mail.com>
Thu, 5 Mar 2009 05:33:04 +0000 (22:33 -0700)
committerRay Lehtiniemi <rayl@mail.com>
Tue, 7 Apr 2009 20:04:01 +0000 (14:04 -0600)
Signed-off-by: Ray Lehtiniemi <rayl@mail.com>
src/framework/mlt_events.c
src/framework/mlt_events.h
src/framework/mlt_factory.c
src/framework/mlt_factory.h
src/framework/mlt_repository.c
src/framework/mlt_repository.h
src/valerie/valerie_response.c
src/valerie/valerie_response.h

index 4a813fe6697cd31c584f4ac1f8801a4368045d10..c27a545f69242978e71370b8892f853aec6d29dc 100644 (file)
@@ -183,7 +183,7 @@ int mlt_events_register( mlt_properties this, char *id, mlt_transmitter transmit
  * \param id the name of an event
  */
 
-void mlt_events_fire( mlt_properties this, char *id, ... )
+void mlt_events_fire( mlt_properties this, const char *id, ... )
 {
        mlt_events events = mlt_events_fetch( this );
        if ( events != NULL )
@@ -231,7 +231,7 @@ void mlt_events_fire( mlt_properties this, char *id, ... )
  * \return
  */
 
-mlt_event mlt_events_listen( mlt_properties this, void *service, char *id, mlt_listener listener )
+mlt_event mlt_events_listen( mlt_properties this, void *service, const char *id, mlt_listener listener )
 {
        mlt_event event = NULL;
        mlt_events events = mlt_events_fetch( this );
@@ -413,7 +413,7 @@ static void mlt_events_listen_for( mlt_properties this, condition_pair *pair )
  * \return an event
  */
 
-mlt_event mlt_events_setup_wait_for( mlt_properties this, char *id )
+mlt_event mlt_events_setup_wait_for( mlt_properties this, const char *id )
 {
        condition_pair *pair = malloc( sizeof( condition_pair ) );
        pair->done = 0;
index 850016091164c54b5c8d73f530b6953ad7245cc6..2fe597d62331c50e22f06b6d07645f65c427e775 100644 (file)
@@ -44,13 +44,13 @@ typedef void ( *mlt_listener )( );
 
 extern void mlt_events_init( mlt_properties self );
 extern int mlt_events_register( mlt_properties self, char *id, mlt_transmitter transmitter );
-extern void mlt_events_fire( mlt_properties self, char *id, ... );
-extern mlt_event mlt_events_listen( mlt_properties self, void *service, char *id, mlt_listener listener );
+extern void mlt_events_fire( mlt_properties self, const char *id, ... );
+extern mlt_event mlt_events_listen( mlt_properties self, void *service, const char *id, mlt_listener listener );
 extern void mlt_events_block( mlt_properties self, void *service );
 extern void mlt_events_unblock( mlt_properties self, void *service );
 extern void mlt_events_disconnect( mlt_properties self, void *service );
 
-extern mlt_event mlt_events_setup_wait_for( mlt_properties self, char *id );
+extern mlt_event mlt_events_setup_wait_for( mlt_properties self, const char *id );
 extern void mlt_events_wait_for( mlt_properties self, mlt_event event );
 extern void mlt_events_close_wait_for( mlt_properties self, mlt_event event );
 
index c9bdb11c7fc2dd63bb83617739682ea66a86ea1a..552b8ce30304ce78715f211b1ec6008b8cc6a35e 100644 (file)
@@ -226,7 +226,7 @@ static void set_common_properties( mlt_properties properties, mlt_profile profil
  * \return a new producer
  */
 
-mlt_producer mlt_factory_producer( mlt_profile profile, const char *service, void *input )
+mlt_producer mlt_factory_producer( mlt_profile profile, const char *service, const void *input )
 {
        mlt_producer obj = NULL;
 
@@ -259,7 +259,7 @@ mlt_producer mlt_factory_producer( mlt_profile profile, const char *service, voi
  * \return a new filter
  */
 
-mlt_filter mlt_factory_filter( mlt_profile profile, const char *service, void *input )
+mlt_filter mlt_factory_filter( mlt_profile profile, const char *service, const void *input )
 {
        mlt_filter obj = NULL;
 
@@ -288,7 +288,7 @@ mlt_filter mlt_factory_filter( mlt_profile profile, const char *service, void *i
  * \return a new transition
  */
 
-mlt_transition mlt_factory_transition( mlt_profile profile, const char *service, void *input )
+mlt_transition mlt_factory_transition( mlt_profile profile, const char *service, const void *input )
 {
        mlt_transition obj = NULL;
 
@@ -317,7 +317,7 @@ mlt_transition mlt_factory_transition( mlt_profile profile, const char *service,
  * \return a new consumer
  */
 
-mlt_consumer mlt_factory_consumer( mlt_profile profile, const char *service, void *input )
+mlt_consumer mlt_factory_consumer( mlt_profile profile, const char *service, const void *input )
 {
        mlt_consumer obj = NULL;
 
index cd0dc7fb98ee9dbe1e6ae053e97b0742dd8bd650..29dc62a9fef1b3e41bbc49c57a0c326090a67069 100644 (file)
@@ -43,10 +43,10 @@ extern const char *mlt_factory_directory( );
 extern char *mlt_environment( const char *name );
 extern int mlt_environment_set( const char *name, const char *value );
 extern mlt_properties mlt_factory_event_object( );
-extern mlt_producer mlt_factory_producer( mlt_profile profile, const char *name, void *input );
-extern mlt_filter mlt_factory_filter( mlt_profile profile, const char *name, void *input );
-extern mlt_transition mlt_factory_transition( mlt_profile profile, const char *name, void *input );
-extern mlt_consumer mlt_factory_consumer( mlt_profile profile, const char *name, void *input );
+extern mlt_producer mlt_factory_producer( mlt_profile profile, const char *name, const void *input );
+extern mlt_filter mlt_factory_filter( mlt_profile profile, const char *name, const void *input );
+extern mlt_transition mlt_factory_transition( mlt_profile profile, const char *name, const void *input );
+extern mlt_consumer mlt_factory_consumer( mlt_profile profile, const char *name, const void *input );
 extern void mlt_factory_register_for_clean_up( void *ptr, mlt_destructor destructor );
 extern void mlt_factory_close( );
 extern mlt_properties mlt_global_properties( );
index d4241e2bacfab8976fcb5cdef4bbf20a4fa73b0c..c843ecb2f4d9cfeadd10006e81b573c347180c58 100644 (file)
@@ -208,7 +208,7 @@ static mlt_properties get_service_properties( mlt_repository this, mlt_service_t
  * \param input an optional argument to the service constructor
  */
 
-void *mlt_repository_create( mlt_repository this, mlt_profile profile, mlt_service_type type, const char *service, void *input )
+void *mlt_repository_create( mlt_repository this, mlt_profile profile, mlt_service_type type, const char *service, const void *input )
 {
        mlt_properties properties = get_service_properties( this, type, service );
        if ( properties != NULL )
index 428efc87422602237927420428fbb8cbde25a4bd..a653b490cb0e8727b2b82f62b2ec028ba04c04e6 100644 (file)
@@ -39,7 +39,7 @@ typedef void ( *mlt_repository_callback )( mlt_repository );
 /** The callback function that modules implement to construct a service.
  */
 
-typedef void *( *mlt_register_callback )( mlt_profile, mlt_service_type, const char * /* service name */, void * /* arg */ );
+typedef void *( *mlt_register_callback )( mlt_profile, mlt_service_type, const char * /* service name */, const void * /* arg */ );
 
 /** The callback function that modules implement to supply metadata as a properties list.
  */
@@ -57,7 +57,7 @@ typedef mlt_properties ( *mlt_metadata_callback )( mlt_service_type, const char
 
 extern mlt_repository mlt_repository_init( const char *directory );
 extern void mlt_repository_register( mlt_repository self, mlt_service_type service_type, const char *service, mlt_register_callback );
-extern void *mlt_repository_create( mlt_repository self, mlt_profile profile, mlt_service_type type, const char *service, void *arg );
+extern void *mlt_repository_create( mlt_repository self, mlt_profile profile, mlt_service_type type, const char *service, const void *arg );
 extern void mlt_repository_close( mlt_repository self );
 extern mlt_properties mlt_repository_consumers( mlt_repository self );
 extern mlt_properties mlt_repository_filters( mlt_repository self );
index 5b9491ca4c3b266db74b173b3aa9028b3a854da2..9b6a96467ea46c723d192e4be5d23035f10b6707 100644 (file)
@@ -119,7 +119,7 @@ int valerie_response_count( valerie_response response )
 /** Set the error and description associated to the response.
 */
 
-void valerie_response_set_error( valerie_response response, int error_code, char *error_string )
+void valerie_response_set_error( valerie_response response, int error_code, const char *error_string )
 {
        if ( response->count == 0 )
        {
@@ -157,15 +157,15 @@ int valerie_response_printf( valerie_response response, size_t size, char *forma
 /** Write text to the reponse.
 */
 
-int valerie_response_write( valerie_response response, char *text, int size )
+int valerie_response_write( valerie_response response, const char *text, int size )
 {
        int ret = 0;
-       char *ptr = text;
+       const char *ptr = text;
 
        while ( size > 0 )
        {
                int index = response->count - 1;
-               char *lf = strchr( ptr, '\n' );
+               const char *lf = strchr( ptr, '\n' );
                int length_of_string = 0;
 
                /* Make sure we have space in the dynamic array. */
index b59ac880a71c6ad9e8bf4b009a9ce30a2fd18b5e..f44eae6580cadb3c0eb57435100b930fb869610e 100644 (file)
@@ -49,9 +49,9 @@ extern int valerie_response_get_error_code( valerie_response );
 extern char *valerie_response_get_error_string( valerie_response );
 extern char *valerie_response_get_line( valerie_response, int );
 extern int valerie_response_count( valerie_response );
-extern void valerie_response_set_error( valerie_response, int, char * );
+extern void valerie_response_set_error( valerie_response, int, const char * );
 extern int valerie_response_printf( valerie_response, size_t, char *, ... );
-extern int valerie_response_write( valerie_response, char *, int );
+extern int valerie_response_write( valerie_response, const char *, int );
 extern void valerie_response_close( valerie_response );
 
 #ifdef __cplusplus