diff -r 11f3bb408051 -r 62921b370c60 ucx/ucx.h --- a/ucx/ucx.h Wed Nov 22 12:59:13 2017 +0100 +++ b/ucx/ucx.h Sun Jan 21 12:13:09 2018 +0100 @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright 2015 Olaf Wintermann. All rights reserved. + * Copyright 2016 Olaf Wintermann. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -40,12 +40,10 @@ #define UCX_VERSION_MAJOR 0 /** Minor UCX version as integer constant. */ -#define UCX_VERSION_MINOR 9 - -/** The UCX version in format [major].[minor] */ -#define UCX_VERSION UCX_VERSION_MAJOR.UCX_VERSION_MINOR +#define UCX_VERSION_MINOR 12 #include +#include #ifdef _WIN32 #if !(defined __ssize_t_defined || defined _SSIZE_T_) @@ -89,7 +87,16 @@ * and 0 if both arguments are equal. If the third argument is * NULL, it shall be ignored. */ -typedef int(*cmp_func)(void*,void*,void*); +typedef int(*cmp_func)(const void*,const void*,void*); + +/** + * Function pointer to a distance function. + * + * The distance function shall take three arguments: the two values for which + * the distance shall be computed and optional additional data. + * The function shall then return the signed distance as integer value. + */ +typedef intmax_t(*distance_func)(const void*,const void*,void*); /** * Function pointer to a copy function. @@ -102,7 +109,7 @@ * passed to free() depends on the implementation of the * respective copy_func. */ -typedef void*(*copy_func)(void*,void*); +typedef void*(*copy_func)(const void*,void*); /** * Function pointer to a write function.