Skip to content

Commit

Permalink
XField.value pointer type (char *) -> (void *)
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Jan 2, 2025
1 parent dd642c9 commit 27c1427
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/xchange.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/xstruct.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 27c1427

Please sign in to comment.