unix, windows: const-ify handle in uv_udp_getsockname
This commit is contained in:
parent
ff6a718dfc
commit
e72d48ddab
@ -976,7 +976,7 @@ UV_EXTERN int uv_udp_bind(uv_udp_t* handle,
|
||||
const struct sockaddr* addr,
|
||||
unsigned int flags);
|
||||
|
||||
UV_EXTERN int uv_udp_getsockname(uv_udp_t* handle,
|
||||
UV_EXTERN int uv_udp_getsockname(const uv_udp_t* handle,
|
||||
struct sockaddr* name,
|
||||
int* namelen);
|
||||
|
||||
|
||||
@ -703,7 +703,9 @@ int uv_udp_set_multicast_interface(uv_udp_t* handle, const char* interface_addr)
|
||||
}
|
||||
|
||||
|
||||
int uv_udp_getsockname(uv_udp_t* handle, struct sockaddr* name, int* namelen) {
|
||||
int uv_udp_getsockname(const uv_udp_t* handle,
|
||||
struct sockaddr* name,
|
||||
int* namelen) {
|
||||
socklen_t socklen;
|
||||
|
||||
if (handle->io_watcher.fd == -1)
|
||||
|
||||
@ -37,7 +37,8 @@ const unsigned int uv_active_udp_streams_threshold = 0;
|
||||
/* A zero-size buffer for use by uv_udp_read */
|
||||
static char uv_zero_[] = "";
|
||||
|
||||
int uv_udp_getsockname(uv_udp_t* handle, struct sockaddr* name,
|
||||
int uv_udp_getsockname(const uv_udp_t* handle,
|
||||
struct sockaddr* name,
|
||||
int* namelen) {
|
||||
int result;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user