Ticket #255: Changed input param of convert() to const char*.
This commit is contained in:
parent
b1c13e1fa6
commit
83d8630f84
@ -47,7 +47,7 @@
|
|||||||
* @return A newly allocated string that is the result of the conversion, or NULL
|
* @return A newly allocated string that is the result of the conversion, or NULL
|
||||||
* if an error has occured.
|
* 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
|
#endif
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
#include <errno.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 input_remaining;
|
||||||
size_t output_remaining;
|
size_t output_remaining;
|
||||||
size_t bytes_converted = 0;
|
size_t bytes_converted = 0;
|
||||||
@ -58,7 +58,7 @@ char* convert(const char* from_charset, const char* to_charset, char* input) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
input_remaining = strlen(input);
|
input_remaining = strlen(input);
|
||||||
input_buffer = input;
|
input_buffer = (char*) input;
|
||||||
|
|
||||||
/* Start the output buffer the same size as the input buffer */
|
/* Start the output buffer the same size as the input buffer */
|
||||||
output_length = input_remaining;
|
output_length = input_remaining;
|
||||||
|
Loading…
Reference in New Issue
Block a user