diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-09-29 14:27:57 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-09-29 16:04:20 +0200 |
commit | 0276c2e74a3212a806119bccb659ceb9dcc25a41 (patch) | |
tree | 62b5beb8bf2cc35b45e88057e8b81b000cbd098e | |
parent | d18cbdf5e4a1132bfc5f581195f6bf7c3b9bed79 (diff) |
Fix const pointers types in docs and extension API.
The GDVIRTUAL_NATIVE_PTR did not declare the correct GDNativeConstPtr
template, resulting in "void*" being used as it's type info in both the
documentation and the extension API dump.
-rw-r--r-- | core/variant/native_ptr.h | 2 | ||||
-rw-r--r-- | doc/classes/MultiplayerPeerExtension.xml | 4 | ||||
-rw-r--r-- | doc/classes/PacketPeerExtension.xml | 4 | ||||
-rw-r--r-- | doc/classes/StreamPeerExtension.xml | 4 | ||||
-rw-r--r-- | modules/webrtc/doc_classes/WebRTCDataChannelExtension.xml | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/core/variant/native_ptr.h b/core/variant/native_ptr.h index b7e8d92f62..913d4d8f7c 100644 --- a/core/variant/native_ptr.h +++ b/core/variant/native_ptr.h @@ -55,7 +55,7 @@ struct GDNativePtr { #define GDVIRTUAL_NATIVE_PTR(m_type) \ template <> \ - struct GDNativeConstPtr<m_type> { \ + struct GDNativeConstPtr<const m_type> { \ const m_type *data = nullptr; \ GDNativeConstPtr(const m_type *p_assign) { data = p_assign; } \ static const char *get_name() { return "const " #m_type; } \ diff --git a/doc/classes/MultiplayerPeerExtension.xml b/doc/classes/MultiplayerPeerExtension.xml index d9c173a4a1..46f9b22758 100644 --- a/doc/classes/MultiplayerPeerExtension.xml +++ b/doc/classes/MultiplayerPeerExtension.xml @@ -24,7 +24,7 @@ </method> <method name="_get_packet" qualifiers="virtual"> <return type="int" /> - <argument index="0" name="r_buffer" type="const void*" /> + <argument index="0" name="r_buffer" type="const uint8_t **" /> <argument index="1" name="r_buffer_size" type="int32_t*" /> <description> </description> @@ -66,7 +66,7 @@ </method> <method name="_put_packet" qualifiers="virtual"> <return type="int" /> - <argument index="0" name="p_buffer" type="const void*" /> + <argument index="0" name="p_buffer" type="const uint8_t*" /> <argument index="1" name="p_buffer_size" type="int" /> <description> </description> diff --git a/doc/classes/PacketPeerExtension.xml b/doc/classes/PacketPeerExtension.xml index 6804053484..f6b925eb30 100644 --- a/doc/classes/PacketPeerExtension.xml +++ b/doc/classes/PacketPeerExtension.xml @@ -19,14 +19,14 @@ </method> <method name="_get_packet" qualifiers="virtual"> <return type="int" /> - <argument index="0" name="r_buffer" type="const void*" /> + <argument index="0" name="r_buffer" type="const uint8_t **" /> <argument index="1" name="r_buffer_size" type="int32_t*" /> <description> </description> </method> <method name="_put_packet" qualifiers="virtual"> <return type="int" /> - <argument index="0" name="p_buffer" type="const void*" /> + <argument index="0" name="p_buffer" type="const uint8_t*" /> <argument index="1" name="p_buffer_size" type="int" /> <description> </description> diff --git a/doc/classes/StreamPeerExtension.xml b/doc/classes/StreamPeerExtension.xml index 93fda8cf5d..ceb9486a33 100644 --- a/doc/classes/StreamPeerExtension.xml +++ b/doc/classes/StreamPeerExtension.xml @@ -30,7 +30,7 @@ </method> <method name="_put_data" qualifiers="virtual"> <return type="int" /> - <argument index="0" name="p_data" type="const void*" /> + <argument index="0" name="p_data" type="const uint8_t*" /> <argument index="1" name="p_bytes" type="int" /> <argument index="2" name="r_sent" type="int32_t*" /> <description> @@ -38,7 +38,7 @@ </method> <method name="_put_partial_data" qualifiers="virtual"> <return type="int" /> - <argument index="0" name="p_data" type="const void*" /> + <argument index="0" name="p_data" type="const uint8_t*" /> <argument index="1" name="p_bytes" type="int" /> <argument index="2" name="r_sent" type="int32_t*" /> <description> diff --git a/modules/webrtc/doc_classes/WebRTCDataChannelExtension.xml b/modules/webrtc/doc_classes/WebRTCDataChannelExtension.xml index 26a4391b83..746fabd6e5 100644 --- a/modules/webrtc/doc_classes/WebRTCDataChannelExtension.xml +++ b/modules/webrtc/doc_classes/WebRTCDataChannelExtension.xml @@ -49,7 +49,7 @@ </method> <method name="_get_packet" qualifiers="virtual"> <return type="int" /> - <argument index="0" name="r_buffer" type="const void*" /> + <argument index="0" name="r_buffer" type="const uint8_t **" /> <argument index="1" name="r_buffer_size" type="int32_t*" /> <description> </description> @@ -86,7 +86,7 @@ </method> <method name="_put_packet" qualifiers="virtual"> <return type="int" /> - <argument index="0" name="p_buffer" type="const void*" /> + <argument index="0" name="p_buffer" type="const uint8_t*" /> <argument index="1" name="p_buffer_size" type="int" /> <description> </description> |