]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec docs: ComboAddress has no == operator, don't suggest it has
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 17 Sep 2025 09:24:59 +0000 (11:24 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 17 Sep 2025 09:24:59 +0000 (11:24 +0200)
Fixes #16128
Plus some general improvements.
One day we should make the Lua classes docs for all three products (more) consistent.

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/recursordist/docs/lua-scripting/comboaddress.rst

index 0b1a4bbd4f8dcd76214ed87fdf74ee1bd51fa282..e60ae9526b541c0f45cdc3fdaa90aeff248eb741 100644 (file)
@@ -10,16 +10,17 @@ Make a :class:`ComboAddress` with:
 
     newCA("::1")
 
-A :class:`ComboAddress` can be compared against a NetmaskGroup with the :meth:`NetMaskGroup:match` function.
+A :class:`ComboAddress` object can be compared against a :class:`NetMaskGroup` object with the :meth:`NetMaskGroup:match` function.
 
-To compare the address (so not the port) of two ComboAddresses, use :meth:`:equal <ComboAddress:equal>`:
+To compare the address (so not the port) of two :class:`ComboAddresses` instances, use :meth:`:equal <ComboAddress:equal>`:
 
 .. code-block:: Lua
 
     a = newCA("[::1]:56")
     b = newCA("[::1]:53")
-    a == b     -- false, port mismatch
-    a:equal(b) -- true
+    a == b                       -- false, reference mismatch
+    a:toString() == b:toString() -- false, port mismatch
+    a:equal(b)                   -- true
 
 To convert an address to human-friendly representation, use :meth:`:toString <ComboAddress:toString>` or :meth:`:toStringWithPort <ComboAddress:toStringWithPort()>`.
 To get only the port number, use :meth:`:getPort() <ComboAddress:getPort>`.
@@ -34,6 +35,10 @@ To get only the port number, use :meth:`:getPort() <ComboAddress:getPort>`.
 
   An object representing an IP address and port tuple.
 
+  .. method:: ComboAddress:equal(comboaddress) -> bool
+
+      Compare the address to another :class:`ComboAddress` object. The port numbers are *not* relevant.
+
   .. method:: ComboAddress:getPort() -> int
 
       The portnumber.