diff --git a/include/xchange.h b/include/xchange.h index 597568a..385ef6a 100644 --- a/include/xchange.h +++ b/include/xchange.h @@ -243,8 +243,8 @@ XField *xCreateLongField(const char *name, long long value); XField *xCreateBooleanField(const char *name, boolean value); XField *xCreateStringField(const char *name, const char *value); XField *xCreate1DField(const char *name, XType type, int count, const void *values); -XField *xCreateFieldArray(const char *name, int ndim, const int *sizes); -XField *xCreate1DFieldArray(const char *name, int size); +XField *xCreateHeterogeneousArrayField(const char *name, int ndim, const int *sizes); +XField *xCreateHeterogeneous1DField(const char *name, int size); // Parsers / formatters boolean xParseBoolean(char *str, char **end); diff --git a/src/xstruct.c b/src/xstruct.c index a4b8a8c..d6fb6c7 100644 --- a/src/xstruct.c +++ b/src/xstruct.c @@ -44,8 +44,10 @@ XStructure *xCreateStruct() { * @return A field containing a heterogeneous array of entries, or NULL if there * was an error. The entries are initially empty, except for their names * bearing '.' followed by the 1-based array index, e.g. '.1', '.2'... + * + * @sa xCreateHeterogeneous1DField() */ -XField *xCreateFieldArray(const char *name, int ndim, const int *sizes) { +XField *xCreateHeterogeneousArrayField(const char *name, int ndim, const int *sizes) { static const char *fn = "xCreateFieldArray"; int count = xGetElementCount(ndim, sizes); @@ -82,10 +84,12 @@ XField *xCreateFieldArray(const char *name, int ndim, const int *sizes) { * @return A field containing a heterogeneous array of entries, or NULL if there * was an error. The entries are initially empty, except for their names * bearing '.' followed by the 1-based array index, e.g. '.1', '.2'... + * + * @sa xCreateHeterogeneousArrayField() */ -XField *xCreate1DFieldArray(const char *name, int size) { +XField *xCreateHeterogeneous1DField(const char *name, int size) { const int sizes[X_MAX_DIMS] = { size }; - return xCreateFieldArray(name, 1, sizes); + return xCreateHeterogeneousArrayField(name, 1, sizes); } /**