diff --git a/include/xchange.h b/include/xchange.h index 16297bf..1a2db54 100644 --- a/include/xchange.h +++ b/include/xchange.h @@ -139,7 +139,7 @@ typedef int boolean; ///< boolean TRUE/FALSE data type. typedef struct XField { char *name; ///< Pointer to a designated local name buffer. It may not contain a separator (see X_SEP). ///< NOTE: it should normally be dynamically allocated, to work with xClearField() / xDestroyField(). - char *value; ///< Pointer to designated local string content (or structure)... + void *value; ///< Pointer to designated local string content (or structure)... ///< NOTE: it should normally be dynamically allocated, to work with xClearField() / xDestroyField(). XType type; ///< The underlyng data type char *subtype; ///< (optional) Descriptive subtype, such a a mime type or encoding (if any). It is diff --git a/src/xstruct.c b/src/xstruct.c index 533ed4a..9bbc2c2 100644 --- a/src/xstruct.c +++ b/src/xstruct.c @@ -826,7 +826,7 @@ void *xGetElementAtIndex(const XField *f, int idx) { eSize = xElementSizeOf(f->type); if(eSize < 0) return x_trace_null(fn, NULL); - return f->value + idx * eSize; + return (char *) f->value + idx * eSize; } /**