Ticket #255: Changed input param of convert() to const char*.

This commit is contained in:
James Muehlner 2013-03-10 16:38:56 -07:00
parent b1c13e1fa6
commit 83d8630f84
2 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@
* @return A newly allocated string that is the result of the conversion, or NULL
* if an error has occured.
*/
char* convert (const char* from_charset, const char* to_charset, char* input);
char* convert (const char* from_charset, const char* to_charset, const char* input);
#endif

View File

@ -40,7 +40,7 @@
#include <iconv.h>
#include <errno.h>
char* convert(const char* from_charset, const char* to_charset, char* input) {
char* convert(const char* from_charset, const char* to_charset, const char* input) {
size_t input_remaining;
size_t output_remaining;
size_t bytes_converted = 0;
@ -58,7 +58,7 @@ char* convert(const char* from_charset, const char* to_charset, char* input) {
return NULL;
input_remaining = strlen(input);
input_buffer = input;
input_buffer = (char*) input;
/* Start the output buffer the same size as the input buffer */
output_length = input_remaining;