From 0f40a16d9198a4cc790549abcd9a9d1e2868dba5 Mon Sep 17 00:00:00 2001 From: "Jeroen F.J. Laros" Date: Sat, 19 Oct 2024 21:12:40 +0200 Subject: [PATCH] Removed deprecated references to pack(). --- docs/plugins.rst | 4 ++-- docs/usage.rst | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/plugins.rst b/docs/plugins.rst index 19b02eb..5bc4b58 100644 --- a/docs/plugins.rst +++ b/docs/plugins.rst @@ -90,13 +90,13 @@ Example Suppose we have set up two I/O interfaces named ``Serial`` and ``SerialUSB``, we serve the same methods on both interfaces by grouping -pointers to these interfaces with the ``pack()`` function as follows. +pointers to these interfaces with the ``makeTuple()`` function as follows. .. code-block:: cpp void loop() { interface( - pack(&Serial, &SerialUSB), + makeTuple(&Serial, &SerialUSB), inc, F("inc: Increment a value. @a: Value. @return: a + 1.")); } diff --git a/docs/usage.rst b/docs/usage.rst index 2323aad..4dfbe18 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -125,15 +125,15 @@ Exporting class methods Class methods are different from ordinary functions in the sense that they always operate on an object. This is why both a function pointer and a class instance need to be provided to the ``interface()`` function. To facilitate -this, the ``pack()`` function can be used to combine a class instance and a -function pointer before passing them to ``interface()``. +this, the ``makeTuple()`` function can be used to combine a class instance and +a function pointer before passing them to ``interface()``. For a class instance ``c`` of class ``C``, the class method ``f()`` can be packed as follows: .. code-block:: cpp - pack(&c, &C::f) + makeTuple(&c, &C::f) The result can be passed to ``interface()``. @@ -157,7 +157,7 @@ Exporting this class method goes as follows: void loop() { interface( Serial, - pack(&led, &LED::setBrightness), + makeTuple(&led, &LED::setBrightness), "set_led: Set LED brightness. @brightness: Brightness."); }