aboutsummaryrefslogtreecommitdiff
path: root/src/netaddr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/netaddr.cpp')
-rw-r--r--src/netaddr.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/netaddr.cpp b/src/netaddr.cpp
index a3a54bf..1803629 100644
--- a/src/netaddr.cpp
+++ b/src/netaddr.cpp
@@ -1,22 +1,20 @@
+#include "salticidae/config.h"
+#ifdef SALTICIDAE_CBINDINGS
#include "salticidae/netaddr.h"
-using namespace salticidae;
-
-#ifdef __cplusplus
-
extern "C" {
-netaddr_t *netaddr_new() { return new NetAddr(); }
+netaddr_t *netaddr_new() { return new netaddr_t(); }
netaddr_t *netaddr_new_from_ip_port(uint32_t ip, uint16_t port) {
- return new NetAddr(ip, port);
+ return new netaddr_t(ip, port);
}
netaddr_t *netaddr_new_from_sip_port(const char *ip, uint16_t port) {
- return new NetAddr(ip, port);
+ return new netaddr_t(ip, port);
}
netaddr_t *netaddr_new_from_sipport(const char *ip_port_addr) {
- return new NetAddr(ip_port_addr);
+ return new netaddr_t(ip_port_addr);
}
bool netaddr_is_eq(const netaddr_t *a, const netaddr_t *b) {