global: Rename unsigned char to uint8, DynamicUCharArray to DynamicUInt8Array and DynamicUCharVector to DynamicUInt8Vector.
diff --git a/ndn-cpp/c/transport/socket-transport.c b/ndn-cpp/c/transport/socket-transport.c
index 53987b0..aef13ac 100644
--- a/ndn-cpp/c/transport/socket-transport.c
+++ b/ndn-cpp/c/transport/socket-transport.c
@@ -25,7 +25,7 @@
}
struct addrinfo hints;
- ndn_memset((unsigned char *)&hints, 0, sizeof(hints));
+ ndn_memset((uint8_t *)&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
if (socketType == SOCKET_TCP)
hints.ai_socktype = SOCK_STREAM;
@@ -67,7 +67,7 @@
return NDN_ERROR_success;
}
-ndn_Error ndn_SocketTransport_send(struct ndn_SocketTransport *self, unsigned char *data, unsigned int dataLength)
+ndn_Error ndn_SocketTransport_send(struct ndn_SocketTransport *self, uint8_t *data, unsigned int dataLength)
{
if (self->socketDescriptor < 0)
return NDN_ERROR_SocketTransport_socket_is_not_open;
@@ -115,7 +115,7 @@
}
ndn_Error ndn_SocketTransport_receive
- (struct ndn_SocketTransport *self, unsigned char *buffer, unsigned int bufferLength, unsigned int *nBytesOut)
+ (struct ndn_SocketTransport *self, uint8_t *buffer, unsigned int bufferLength, unsigned int *nBytesOut)
{
if (self->socketDescriptor < 0)
return NDN_ERROR_SocketTransport_socket_is_not_open;
diff --git a/ndn-cpp/c/transport/socket-transport.h b/ndn-cpp/c/transport/socket-transport.h
index 750cc56..e1388c3 100644
--- a/ndn-cpp/c/transport/socket-transport.h
+++ b/ndn-cpp/c/transport/socket-transport.h
@@ -8,6 +8,7 @@
#define NDN_SOCKETTRANSPORT_H
#include <sys/socket.h>
+#include "../common.h"
#include "../errors.h"
#ifdef __cplusplus
@@ -49,7 +50,7 @@
* @param dataLength The number of bytes in data.
* @return 0 for success, else an error code.
*/
-ndn_Error ndn_SocketTransport_send(struct ndn_SocketTransport *self, unsigned char *data, unsigned int dataLength);
+ndn_Error ndn_SocketTransport_send(struct ndn_SocketTransport *self, uint8_t *data, unsigned int dataLength);
/**
* Check if there is data ready on the socket to be received with ndn_SocketTransport_receive.
@@ -70,7 +71,7 @@
* @return 0 for success, else an error code.
*/
ndn_Error ndn_SocketTransport_receive
- (struct ndn_SocketTransport *self, unsigned char *buffer, unsigned int bufferLength, unsigned int *nBytes);
+ (struct ndn_SocketTransport *self, uint8_t *buffer, unsigned int bufferLength, unsigned int *nBytes);
/**
* Close the socket.
diff --git a/ndn-cpp/c/transport/tcp-transport.h b/ndn-cpp/c/transport/tcp-transport.h
index e31e127..05902f9 100644
--- a/ndn-cpp/c/transport/tcp-transport.h
+++ b/ndn-cpp/c/transport/tcp-transport.h
@@ -45,7 +45,7 @@
* @param dataLength The number of bytes in data.
* @return 0 for success, else an error code.
*/
-static inline ndn_Error ndn_TcpTransport_send(struct ndn_TcpTransport *self, unsigned char *data, unsigned int dataLength)
+static inline ndn_Error ndn_TcpTransport_send(struct ndn_TcpTransport *self, uint8_t *data, unsigned int dataLength)
{
return ndn_SocketTransport_send(&self->base, data, dataLength);
}
@@ -72,7 +72,7 @@
* @return 0 for success, else an error code.
*/
static inline ndn_Error ndn_TcpTransport_receive
- (struct ndn_TcpTransport *self, unsigned char *buffer, unsigned int bufferLength, unsigned int *nBytes)
+ (struct ndn_TcpTransport *self, uint8_t *buffer, unsigned int bufferLength, unsigned int *nBytes)
{
return ndn_SocketTransport_receive(&self->base, buffer, bufferLength, nBytes);
}
diff --git a/ndn-cpp/c/transport/udp-transport.h b/ndn-cpp/c/transport/udp-transport.h
index a97af10..fc9a173 100644
--- a/ndn-cpp/c/transport/udp-transport.h
+++ b/ndn-cpp/c/transport/udp-transport.h
@@ -45,7 +45,7 @@
* @param dataLength The number of bytes in data.
* @return 0 for success, else an error code.
*/
-static inline ndn_Error ndn_UdpTransport_send(struct ndn_UdpTransport *self, unsigned char *data, unsigned int dataLength)
+static inline ndn_Error ndn_UdpTransport_send(struct ndn_UdpTransport *self, uint8_t *data, unsigned int dataLength)
{
return ndn_SocketTransport_send(&self->base, data, dataLength);
}
@@ -72,7 +72,7 @@
* @return 0 for success, else an error code.
*/
static inline ndn_Error ndn_UdpTransport_receive
- (struct ndn_UdpTransport *self, unsigned char *buffer, unsigned int bufferLength, unsigned int *nBytes)
+ (struct ndn_UdpTransport *self, uint8_t *buffer, unsigned int bufferLength, unsigned int *nBytes)
{
return ndn_SocketTransport_receive(&self->base, buffer, bufferLength, nBytes);
}