All notable changes to the Sigmyne/xchange library will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
Upcoming feature release, possibly as early as 1 August 2026.
Fixed
- CMake
xchangeConfigto skip requiring math lib for non-Windows platforms in general, since it can fail if the math library is in the build path, but not in the search path, such as for some cross builds (see e.g. the vcpkg Android builds)
Added
-
#32: Added
XBooleanas the xchange-specific boolean type, replacingbooleanin prior versions. (Thebooleantype is still defined for compatibility, but can be disabled by defining_TYPEDEF_BOOLEANprior to includingxchange.hin your source code.). -
Added
xIsDebug()function to check onxDebug. While the global variable is fine in most cases, they are problematic for Windows DLLs. It’s better to use purely functional access instead. -
xvprintf()/xdprintf()macros to reference functions instead of global vars (see above comment on Windows DLLs).
Changed
- #32: Changed
booleanparameter and return types to the equivalentXBoolean, to disambiguate the xchange-specific boolean type from other definitions. (Other header may definebooleanalso, and so by choosing a more unique type name, we reduce the chance of namespace conflicts.)
[1.2.0] - 2026-06-08
High priority bug fixes and version bump.
Fixed
-
#26: Fixed space allocation in
xLookupPutAllAsync()/xLookupRemoveAllAsync(). -
#28:
xGetAsDoubleAtIndex()returned integer rounded values when the field storedfloatordoubletype data. Now, it returns the floating-point value directly. -
Fixed memleak in
xLookupRemove(). -
Fixed memleak in
xDestroyLookup(). -
xLookupPut()did not returnX_NO_INITas expected if lookup table was not initialized. -
Fix potential buffer overflow at build time in
docedit.c(sprintf()tosnprintf()). -
Fixed max string size for 8-byte signed integer (-> 20 bytes + termination).
-
Fixed insufficient checking in
xIsFieldValid(). -
Fixed botched read loop in
xjsonParseFile(). -
Removed the unwanted
fclose()inxjsonParseFile(). Caller is responsible for closing the file after the call, as appropriate. -
Extra comma when printing
X_FLOATvalue to JSON. -
Fixed JSON unicode processing.
-
Fixed
PrintPrimitive()return value forX_CHAR(n)types inxjson.c. -
xGetAsLongAtIndex()andxGetAsDoubleAtIndex()for string/raw types.
Added
- Now installing
xmutex.hcontaining portable mutex macros.
Changed
-
#29: Use
snprintf()instead ofsprintf()provided it’s available. (On older platforms prior to the C99 standard, it defaults tosprintf().) -
#29: Use
size_torlong(if needs to be signed) instead ofintfor string length parameters. -
Changed
xlookuphash algorithm to FNV-1a. -
Rounding instead of downcast from double in
xGetAsLongAtIndex(). -
CMake install to skip
.gitignoreinexamples/. -
Makefiledoc install to match CMake. -
CMake export targets from build-directory (for dependent builds)
-
examples/Makefileto work standalone, withoutconfig.mk.
[1.1.2] - 2026-04-27
Maintenance release with improved portability (esp. Windows, MacOS, and BSD). It also enables ports to vcpkg and Homebrew (coming very soon…).
Fixed
- #23: Removed unneeded includes of UNIX-specific
unistd.h(blocking portability).
Added
-
#23: Portability to Windows, MacOS, and BSD.
-
#23: CMake build configuration, alongside the GNU make config.
-
#23: New GitHub Actions workflows for multi-platform checks.
Changed
-
#23: Use portable mutexes in
xlookup.c. -
#23:
xjsonerror/warning reporting viastaticfunctions instead of niche macros that Windows does not support. -
#23:
xGetAsLongAtIndex()andxGetAsDoubleAtIndex()switch to setting errno toEINVALinstead ofENOSR, as the latter is not defined on BSD.
[1.1.1] - 2026-02-16
Maintenance release with minor code style improvements.
Changed
- #18: A few code style improvements, spotted by cppcheck.
[1.1.0] - 2025-11-10
Minor feature release with bug fixes.
Fixed
-
#15:
xPrintFloat()printed an extra digit, which would appear as a ‘rounding error’ in decimal representations. -
#16: Width detection of platform-specific built-in integer types (i.e.,
short,int,long, andlong long). The previous implementation includedstdint.hwith__STDC_LIMIT_MACROSdefined. However, if the application source, then includedstdint.hbeforexchange.h, then the fixed-width integer limits were left undefined. As a result, we no longer rely onstdint.hproviding these limits.
Added
xParseFloat()to parse floats without rounding errors that might result if parsing asdoubleand then casting asfloat.
[1.0.1] - 2025-07-01
Bug fix release.
Fixed
-
Handling of serialized strings in
xClearField()andxCopyOfField(). -
Handling of heterogeneous arrays (type
X_FIELD) inxCopyOfField().
Added
xDestroyLookupAndData()to destroy a lookup table including all the data that was referenced inside it.
Changed
xCreateField()to treatX_RAWtypes always as scalars, ignoring the dimensions provided.
[1.0.0] - 2025-03-31
Initial public release.