diff --git a/src/librustuv/access.rs b/src/librustuv/access.rs index 9d06593a6ea..0d2550d4ebd 100644 --- a/src/librustuv/access.rs +++ b/src/librustuv/access.rs @@ -22,12 +22,12 @@ use std::rt::local::Local; use homing::HomingMissile; pub struct Access { - priv inner: UnsafeArc, + inner: UnsafeArc, } pub struct Guard<'a> { - priv access: &'a mut Access, - priv missile: Option, + access: &'a mut Access, + missile: Option, } struct Inner { diff --git a/src/librustuv/file.rs b/src/librustuv/file.rs index d5235a9fe56..93cc1d8d54f 100644 --- a/src/librustuv/file.rs +++ b/src/librustuv/file.rs @@ -26,14 +26,14 @@ use uvll; pub struct FsRequest { req: *uvll::uv_fs_t, - priv fired: bool, + fired: bool, } pub struct FileWatcher { - priv loop_: Loop, - priv fd: c_int, - priv close: rtio::CloseBehavior, - priv home: HomeHandle, + loop_: Loop, + fd: c_int, + close: rtio::CloseBehavior, + home: HomeHandle, } impl FsRequest { diff --git a/src/librustuv/homing.rs b/src/librustuv/homing.rs index aa345ca32aa..89b68917c94 100644 --- a/src/librustuv/homing.rs +++ b/src/librustuv/homing.rs @@ -48,8 +48,8 @@ use queue::{Queue, QueuePool}; /// Handles are clone-able in order to derive new handles from existing handles /// (very useful for when accepting a socket from a server). pub struct HomeHandle { - priv queue: Queue, - priv id: uint, + queue: Queue, + id: uint, } impl HomeHandle { @@ -126,7 +126,7 @@ pub trait HomingIO { /// task back to its appropriate home (if applicable). The field is used to /// assert that we are where we think we are. pub struct HomingMissile { - priv io_home: uint, + io_home: uint, } impl HomingMissile { diff --git a/src/librustuv/lib.rs b/src/librustuv/lib.rs index 427dd87a0a1..01067cb699b 100644 --- a/src/librustuv/lib.rs +++ b/src/librustuv/lib.rs @@ -197,8 +197,8 @@ pub trait UvHandle { } pub struct ForbidSwitch { - priv msg: &'static str, - priv io: uint, + msg: &'static str, + io: uint, } impl ForbidSwitch { @@ -261,8 +261,8 @@ fn wakeup(slot: &mut Option) { } pub struct Request { - handle: *uvll::uv_req_t, - priv defused: bool, + pub handle: *uvll::uv_req_t, + defused: bool, } impl Request { @@ -313,7 +313,7 @@ impl Drop for Request { /// with dtors may not be destructured, but tuple structs can, /// but the results are not correct. pub struct Loop { - priv handle: *uvll::uv_loop_t + handle: *uvll::uv_loop_t } impl Loop { diff --git a/src/librustuv/net.rs b/src/librustuv/net.rs index cfecdd929f3..0514975cc7b 100644 --- a/src/librustuv/net.rs +++ b/src/librustuv/net.rs @@ -153,22 +153,22 @@ pub struct TcpWatcher { handle: *uvll::uv_tcp_t, stream: StreamWatcher, home: HomeHandle, - priv refcount: Refcount, + refcount: Refcount, // libuv can't support concurrent reads and concurrent writes of the same // stream object, so we use these access guards in order to arbitrate among // multiple concurrent reads and writes. Note that libuv *can* read and // write simultaneously, it just can't read and read simultaneously. - priv read_access: Access, - priv write_access: Access, + read_access: Access, + write_access: Access, } pub struct TcpListener { home: HomeHandle, handle: *uvll::uv_pipe_t, - priv closing_task: Option, - priv outgoing: Sender>, - priv incoming: Receiver>, + closing_task: Option, + outgoing: Sender>, + incoming: Receiver>, } pub struct TcpAcceptor { @@ -476,9 +476,9 @@ pub struct UdpWatcher { home: HomeHandle, // See above for what these fields are - priv refcount: Refcount, - priv read_access: Access, - priv write_access: Access, + refcount: Refcount, + read_access: Access, + write_access: Access, } impl UdpWatcher { diff --git a/src/librustuv/pipe.rs b/src/librustuv/pipe.rs index e1226f0b3a9..ea46c3a1296 100644 --- a/src/librustuv/pipe.rs +++ b/src/librustuv/pipe.rs @@ -26,19 +26,19 @@ use uvll; pub struct PipeWatcher { stream: StreamWatcher, home: HomeHandle, - priv defused: bool, - priv refcount: Refcount, + defused: bool, + refcount: Refcount, // see comments in TcpWatcher for why these exist - priv write_access: Access, - priv read_access: Access, + write_access: Access, + read_access: Access, } pub struct PipeListener { home: HomeHandle, pipe: *uvll::uv_pipe_t, - priv outgoing: Sender>, - priv incoming: Receiver>, + outgoing: Sender>, + incoming: Receiver>, } pub struct PipeAcceptor { diff --git a/src/librustuv/queue.rs b/src/librustuv/queue.rs index ad0de0b46c9..f5643e80f4a 100644 --- a/src/librustuv/queue.rs +++ b/src/librustuv/queue.rs @@ -46,13 +46,13 @@ struct State { /// This structure is intended to be stored next to the event loop, and it is /// used to create new `Queue` structures. pub struct QueuePool { - priv queue: UnsafeArc, - priv refcnt: uint, + queue: UnsafeArc, + refcnt: uint, } /// This type is used to send messages back to the original event loop. pub struct Queue { - priv queue: UnsafeArc, + queue: UnsafeArc, } extern fn async_cb(handle: *uvll::uv_async_t, status: c_int) { diff --git a/src/librustuv/rc.rs b/src/librustuv/rc.rs index f43cf722361..86c6c44238c 100644 --- a/src/librustuv/rc.rs +++ b/src/librustuv/rc.rs @@ -19,7 +19,7 @@ use std::sync::arc::UnsafeArc; pub struct Refcount { - priv rc: UnsafeArc, + rc: UnsafeArc, } impl Refcount { diff --git a/src/librustuv/stream.rs b/src/librustuv/stream.rs index f7bf2f051eb..10d62a5aeae 100644 --- a/src/librustuv/stream.rs +++ b/src/librustuv/stream.rs @@ -23,13 +23,13 @@ use uvll; // uv_stream_t instance, and all I/O operations assume that it's already located // on the appropriate scheduler. pub struct StreamWatcher { - handle: *uvll::uv_stream_t, + pub handle: *uvll::uv_stream_t, // Cache the last used uv_write_t so we don't have to allocate a new one on // every call to uv_write(). Ideally this would be a stack-allocated // structure, but currently we don't have mappings for all the structures // defined in libuv, so we're foced to malloc this. - priv last_write_req: Option, + last_write_req: Option, } struct ReadContext { diff --git a/src/librustuv/uvio.rs b/src/librustuv/uvio.rs index 1621ccfbf45..d8365cf677c 100644 --- a/src/librustuv/uvio.rs +++ b/src/librustuv/uvio.rs @@ -46,7 +46,7 @@ use uvll; // Obviously an Event Loop is always home. pub struct UvEventLoop { - priv uvio: UvIoFactory + uvio: UvIoFactory } impl UvEventLoop { @@ -124,8 +124,8 @@ fn test_callback_run_once() { } pub struct UvIoFactory { - loop_: Loop, - priv handle_pool: Option<~QueuePool>, + pub loop_: Loop, + handle_pool: Option<~QueuePool>, } impl UvIoFactory { diff --git a/src/librustuv/uvll.rs b/src/librustuv/uvll.rs index 578f90dee9a..62f1dbd73e3 100644 --- a/src/librustuv/uvll.rs +++ b/src/librustuv/uvll.rs @@ -100,15 +100,15 @@ pub type uv_buf_len_t = libc::c_ulong; // see libuv/include/uv-unix.h #[cfg(unix)] pub struct uv_buf_t { - base: *u8, - len: uv_buf_len_t, + pub base: *u8, + pub len: uv_buf_len_t, } // see libuv/include/uv-win.h #[cfg(windows)] pub struct uv_buf_t { - len: uv_buf_len_t, - base: *u8, + pub len: uv_buf_len_t, + pub base: *u8, } #[repr(C)] @@ -119,23 +119,23 @@ pub enum uv_run_mode { } pub struct uv_process_options_t { - exit_cb: uv_exit_cb, - file: *libc::c_char, - args: **libc::c_char, - env: **libc::c_char, - cwd: *libc::c_char, - flags: libc::c_uint, - stdio_count: libc::c_int, - stdio: *uv_stdio_container_t, - uid: uv_uid_t, - gid: uv_gid_t, + pub exit_cb: uv_exit_cb, + pub file: *libc::c_char, + pub args: **libc::c_char, + pub env: **libc::c_char, + pub cwd: *libc::c_char, + pub flags: libc::c_uint, + pub stdio_count: libc::c_int, + pub stdio: *uv_stdio_container_t, + pub uid: uv_uid_t, + pub gid: uv_gid_t, } // These fields are private because they must be interfaced with through the // functions below. pub struct uv_stdio_container_t { - priv flags: libc::c_int, - priv stream: *uv_stream_t, + flags: libc::c_int, + stream: *uv_stream_t, } pub type uv_handle_t = c_void; @@ -160,27 +160,27 @@ pub type uv_signal_t = c_void; pub type uv_shutdown_t = c_void; pub struct uv_timespec_t { - tv_sec: libc::c_long, - tv_nsec: libc::c_long + pub tv_sec: libc::c_long, + pub tv_nsec: libc::c_long } pub struct uv_stat_t { - st_dev: libc::uint64_t, - st_mode: libc::uint64_t, - st_nlink: libc::uint64_t, - st_uid: libc::uint64_t, - st_gid: libc::uint64_t, - st_rdev: libc::uint64_t, - st_ino: libc::uint64_t, - st_size: libc::uint64_t, - st_blksize: libc::uint64_t, - st_blocks: libc::uint64_t, - st_flags: libc::uint64_t, - st_gen: libc::uint64_t, - st_atim: uv_timespec_t, - st_mtim: uv_timespec_t, - st_ctim: uv_timespec_t, - st_birthtim: uv_timespec_t + pub st_dev: libc::uint64_t, + pub st_mode: libc::uint64_t, + pub st_nlink: libc::uint64_t, + pub st_uid: libc::uint64_t, + pub st_gid: libc::uint64_t, + pub st_rdev: libc::uint64_t, + pub st_ino: libc::uint64_t, + pub st_size: libc::uint64_t, + pub st_blksize: libc::uint64_t, + pub st_blocks: libc::uint64_t, + pub st_flags: libc::uint64_t, + pub st_gen: libc::uint64_t, + pub st_atim: uv_timespec_t, + pub st_mtim: uv_timespec_t, + pub st_ctim: uv_timespec_t, + pub st_birthtim: uv_timespec_t } impl uv_stat_t {