Commit e9ff3b34 authored by Diego Biurrun's avatar Diego Biurrun
Browse files

error: const correctness

parent cfa35f30
...@@ -4,6 +4,7 @@ Changes since 1.3.0: ...@@ -4,6 +4,7 @@ Changes since 1.3.0:
* Drop support for Windows 9x. * Drop support for Windows 9x.
Windows NT 4.0 SP4 with IE 5.0 is now required. Windows NT 4.0 SP4 with IE 5.0 is now required.
* Replace BeOS support by Haiku support. * Replace BeOS support by Haiku support.
* dvdcss_error() now returns "const char *" instad of "char *".
* Miscellaneous cleanups to code, documentation, build system. * Miscellaneous cleanups to code, documentation, build system.
......
...@@ -85,7 +85,7 @@ LIBDVDCSS_EXPORT int dvdcss_readv ( dvdcss_t, ...@@ -85,7 +85,7 @@ LIBDVDCSS_EXPORT int dvdcss_readv ( dvdcss_t,
void *p_iovec, void *p_iovec,
int i_blocks, int i_blocks,
int i_flags ); int i_flags );
LIBDVDCSS_EXPORT char * dvdcss_error ( dvdcss_t ); LIBDVDCSS_EXPORT const char *dvdcss_error ( const dvdcss_t );
LIBDVDCSS_EXPORT int dvdcss_is_scrambled ( dvdcss_t ); LIBDVDCSS_EXPORT int dvdcss_is_scrambled ( dvdcss_t );
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
/***************************************************************************** /*****************************************************************************
* Error messages * Error messages
*****************************************************************************/ *****************************************************************************/
void print_error( dvdcss_t dvdcss, char *psz_string ) void print_error( dvdcss_t dvdcss, const char *psz_string )
{ {
if( dvdcss->b_errors ) if( dvdcss->b_errors )
{ {
......
...@@ -562,7 +562,7 @@ error: ...@@ -562,7 +562,7 @@ error:
* Return a string with the last error message produced by \e libdvdcss. * Return a string with the last error message produced by \e libdvdcss.
* Useful to conveniently format error messages in external applications. * Useful to conveniently format error messages in external applications.
*/ */
LIBDVDCSS_EXPORT char * dvdcss_error ( dvdcss_t dvdcss ) LIBDVDCSS_EXPORT const char * dvdcss_error ( const dvdcss_t dvdcss )
{ {
return dvdcss->psz_error; return dvdcss->psz_error;
} }
......
...@@ -70,7 +70,7 @@ struct dvdcss_s ...@@ -70,7 +70,7 @@ struct dvdcss_s
char * psz_block; char * psz_block;
/* Error management */ /* Error management */
char * psz_error; const char *psz_error;
int b_errors; int b_errors;
int b_debug; int b_debug;
...@@ -96,6 +96,6 @@ struct dvdcss_s ...@@ -96,6 +96,6 @@ struct dvdcss_s
fprintf( stderr, "\n" ); \ fprintf( stderr, "\n" ); \
} }
void print_error ( dvdcss_t, char * ); void print_error ( dvdcss_t, const char * );
#endif /* DVDCSS_LIBDVDCSS_H */ #endif /* DVDCSS_LIBDVDCSS_H */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment