ref: e9ff3b341c2da792cac1c502faefe7adc17a2514
parent: cfa35f3035f5b090711e2b1115c031c7668855ca
author: Diego Biurrun <diego@biurrun.de>
date: Thu Oct 30 09:16:38 EDT 2014
error: const correctness
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@
* 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.
--- a/src/dvdcss/dvdcss.h
+++ b/src/dvdcss/dvdcss.h
@@ -85,7 +85,7 @@
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 );
--- a/src/error.c
+++ b/src/error.c
@@ -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 )
{
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -562,7 +562,7 @@
* 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;
}
--- a/src/libdvdcss.h
+++ b/src/libdvdcss.h
@@ -70,7 +70,7 @@
char * psz_block;
/* Error management */
- char * psz_error;
+ const char *psz_error;
int b_errors;
int b_debug;
@@ -96,6 +96,6 @@
fprintf( stderr, "\n" ); \
}
-void print_error ( dvdcss_t, char * );
+void print_error ( dvdcss_t, const char * );
#endif /* DVDCSS_LIBDVDCSS_H */