diff --git a/bindings/c/foundationdb/fdb_c.h b/bindings/c/foundationdb/fdb_c.h index 5459952cf7..4e19c0b1cf 100644 --- a/bindings/c/foundationdb/fdb_c.h +++ b/bindings/c/foundationdb/fdb_c.h @@ -91,12 +91,21 @@ extern "C" { DLLEXPORT WARN_UNUSED_RESULT fdb_error_t fdb_add_network_thread_completion_hook(void (*hook)(void*), void *hook_parameter); #pragma pack(push, 4) +#if FDB_API_VERSION >= 700 + typedef struct keyvalue { + const uint8_t* key; + int key_length; + const uint8_t* value; + int value_length; + } FDBKeyValue; +#else typedef struct keyvalue { const void* key; int key_length; const void* value; int value_length; } FDBKeyValue; +#endif #pragma pack(pop) DLLEXPORT void fdb_future_cancel( FDBFuture* f ); diff --git a/documentation/sphinx/source/api-version-upgrade-guide.rst b/documentation/sphinx/source/api-version-upgrade-guide.rst index eab7f8b6a2..dc666e7e04 100644 --- a/documentation/sphinx/source/api-version-upgrade-guide.rst +++ b/documentation/sphinx/source/api-version-upgrade-guide.rst @@ -9,6 +9,16 @@ This document provides an overview of changes that an application developer may For more details about API versions, see :ref:`api-versions`. +.. _api-version-upgrade-guide-700: + +API version 700 +=============== + +C bindings +---------- + +* The ``FDBKeyValue`` struct's ``key`` and ``value`` members have changed type from ``void*`` to ``uint8_t*``. + .. _api-version-upgrade-guide-620: API version 620 diff --git a/documentation/sphinx/source/release-notes.rst b/documentation/sphinx/source/release-notes.rst index e09e8c7308..926025fec0 100644 --- a/documentation/sphinx/source/release-notes.rst +++ b/documentation/sphinx/source/release-notes.rst @@ -18,6 +18,7 @@ Status Bindings -------- * Java: Introduced ``keyAfter`` utility function that can be used to create the immediate next key for a given byte array. `(PR #2458) <https://github.com/apple/foundationdb/pull/2458>`_ +* C: The ``FDBKeyValue`` struct's ``key`` and ``value`` members have changed type from ``void*`` to ``uint8_t*``. `(PR #) <https://github.com/apple/foundationdb/pull/>`_ Other Changes -------------