summaryrefslogtreecommitdiff
path: root/modules/gdnative/net/stream_peer_gdnative.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdnative/net/stream_peer_gdnative.cpp')
-rw-r--r--modules/gdnative/net/stream_peer_gdnative.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/gdnative/net/stream_peer_gdnative.cpp b/modules/gdnative/net/stream_peer_gdnative.cpp
index 1b141fa2e6..8a4ea35f95 100644
--- a/modules/gdnative/net/stream_peer_gdnative.cpp
+++ b/modules/gdnative/net/stream_peer_gdnative.cpp
@@ -37,7 +37,7 @@ StreamPeerGDNative::StreamPeerGDNative() {
StreamPeerGDNative::~StreamPeerGDNative() {
}
-void StreamPeerGDNative::set_native_stream_peer(godot_net_stream_peer *p_interface) {
+void StreamPeerGDNative::set_native_stream_peer(const godot_net_stream_peer *p_interface) {
interface = p_interface;
}
@@ -51,7 +51,7 @@ Error StreamPeerGDNative::put_data(const uint8_t *p_data, int p_bytes) {
Error StreamPeerGDNative::put_partial_data(const uint8_t *p_data, int p_bytes, int &r_sent) {
ERR_FAIL_COND_V(interface == NULL, ERR_UNCONFIGURED);
- return (Error)(interface->put_partial_data(interface->data, p_data, p_bytes, r_sent));
+ return (Error)(interface->put_partial_data(interface->data, p_data, p_bytes, &r_sent));
}
Error StreamPeerGDNative::get_data(uint8_t *p_buffer, int p_bytes) {
@@ -61,7 +61,7 @@ Error StreamPeerGDNative::get_data(uint8_t *p_buffer, int p_bytes) {
Error StreamPeerGDNative::get_partial_data(uint8_t *p_buffer, int p_bytes, int &r_received) {
ERR_FAIL_COND_V(interface == NULL, ERR_UNCONFIGURED);
- return (Error)(interface->get_partial_data(interface->data, p_buffer, p_bytes, r_received));
+ return (Error)(interface->get_partial_data(interface->data, p_buffer, p_bytes, &r_received));
}
int StreamPeerGDNative::get_available_bytes() const {
@@ -71,7 +71,7 @@ int StreamPeerGDNative::get_available_bytes() const {
extern "C" {
-void GDAPI godot_net_bind_stream_peer(godot_object *p_obj, godot_net_stream_peer *p_interface) {
+void GDAPI godot_net_bind_stream_peer(godot_object *p_obj, const godot_net_stream_peer *p_interface) {
((StreamPeerGDNative *)p_obj)->set_native_stream_peer(p_interface);
}
}