std: Remove struct ctors

This commit is contained in:
Brian Anderson
2012-09-04 17:22:09 -07:00
parent 268850f67b
commit eb0cf3a715
4 changed files with 64 additions and 10 deletions

View File

@@ -40,7 +40,6 @@ extern mod rustrt {
*/
struct TcpSocket {
let socket_data: @TcpSocketData;
new(socket_data: @TcpSocketData) { self.socket_data = socket_data; }
drop {
unsafe {
tear_down_socket_data(self.socket_data)
@@ -48,6 +47,12 @@ struct TcpSocket {
}
}
fn TcpSocket(socket_data: @TcpSocketData) -> TcpSocket {
TcpSocket {
socket_data: socket_data
}
}
/**
* A buffered wrapper for `net::tcp::tcp_socket`
*
@@ -56,7 +61,12 @@ struct TcpSocket {
*/
struct TcpSocketBuf {
let data: @TcpBufferedSocketData;
new(data: @TcpBufferedSocketData) { self.data = data; }
}
fn TcpSocketBuf(data: @TcpBufferedSocketData) -> TcpSocketBuf {
TcpSocketBuf {
data: data
}
}
/// Contains raw, string-based, error information returned from libuv