Commit e9ff3b34 authored by Diego Biurrun's avatar Diego Biurrun

error: const correctness

parent cfa35f30
......@@ -4,6 +4,7 @@ Changes since 1.3.0:
* Drop support for Windows 9x.
Windows NT 4.0 SP4 with IE 5.0 is now required.
* Replace BeOS support by Haiku support.
* dvdcss_error() now returns "const char *" instad of "char *".
* Miscellaneous cleanups to code, documentation, build system.
......
......@@ -85,7 +85,7 @@ LIBDVDCSS_EXPORT int dvdcss_readv ( dvdcss_t,
void *p_iovec,
int i_blocks,
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 );
......
......@@ -29,7 +29,7 @@
/*****************************************************************************
* 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 )
{
......
......@@ -562,7 +562,7 @@ error:
* Return a string with the last error message produced by \e libdvdcss.
* 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;
}
......
......@@ -70,7 +70,7 @@ struct dvdcss_s
char * psz_block;
/* Error management */
char * psz_error;
const char *psz_error;
int b_errors;
int b_debug;
......@@ -96,6 +96,6 @@ struct dvdcss_s
fprintf( stderr, "\n" ); \
}
void print_error ( dvdcss_t, char * );
void print_error ( dvdcss_t, const char * );
#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