4 #include "jansson_private.h"
6 void jsonp_error_init(json_error_t *error, const char *source)
10 error->text[0] = '\0';
14 strncpy(error->source, source, JSON_ERROR_SOURCE_LENGTH);
15 error->source[JSON_ERROR_SOURCE_LENGTH - 1] = '\0';
19 void jsonp_error_set(json_error_t *error, int line, int column,
27 if(error->text[0] != '\0') {
28 /* error already set */
33 error->column = column;
36 vsnprintf(error->text, JSON_ERROR_TEXT_LENGTH, msg, ap);