about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-06-25 20:29:06 -0700
committerbors <bors@rust-lang.org>2013-06-25 20:29:06 -0700
commit22408d9ad536975002b4d43f232033eca4482741 (patch)
treee40c4ceeb90cd3933f264ff4fa73fd88d52e3c0d /src/libstd/rt
parente9ac7194ff31792e2eca2c745fbef309a2daba86 (diff)
parentca2966c6d04958241f13e61310298a5ff69061e2 (diff)
downloadrust-22408d9ad536975002b4d43f232033eca4482741.tar.gz
rust-22408d9ad536975002b4d43f232033eca4482741.zip
auto merge of #7269 : luqmana/rust/drop, r=thestinger
Finally rename finalize to drop.
Closes #4332.
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/comm.rs4
-rw-r--r--src/libstd/rt/local_heap.rs2
-rw-r--r--src/libstd/rt/rc.rs2
-rw-r--r--src/libstd/rt/stack.rs2
-rw-r--r--src/libstd/rt/task.rs2
-rw-r--r--src/libstd/rt/thread.rs2
-rw-r--r--src/libstd/rt/uv/uvio.rs6
-rw-r--r--src/libstd/rt/uvio.rs6
8 files changed, 13 insertions, 13 deletions
diff --git a/src/libstd/rt/comm.rs b/src/libstd/rt/comm.rs
index 5d85e292861..75b1d8f3810 100644
--- a/src/libstd/rt/comm.rs
+++ b/src/libstd/rt/comm.rs
@@ -222,7 +222,7 @@ impl<T> Peekable<T> for PortOne<T> {
 
 #[unsafe_destructor]
 impl<T> Drop for ChanOneHack<T> {
-    fn finalize(&self) {
+    fn drop(&self) {
         if self.suppress_finalize { return }
 
         unsafe {
@@ -249,7 +249,7 @@ impl<T> Drop for ChanOneHack<T> {
 
 #[unsafe_destructor]
 impl<T> Drop for PortOneHack<T> {
-    fn finalize(&self) {
+    fn drop(&self) {
         if self.suppress_finalize { return }
 
         unsafe {
diff --git a/src/libstd/rt/local_heap.rs b/src/libstd/rt/local_heap.rs
index 6bf228a1b22..c5c22f45159 100644
--- a/src/libstd/rt/local_heap.rs
+++ b/src/libstd/rt/local_heap.rs
@@ -57,7 +57,7 @@ impl LocalHeap {
 }
 
 impl Drop for LocalHeap {
-    fn finalize(&self) {
+    fn drop(&self) {
         unsafe {
             rust_delete_boxed_region(self.boxed_region);
             rust_delete_memory_region(self.memory_region);
diff --git a/src/libstd/rt/rc.rs b/src/libstd/rt/rc.rs
index 2977d081508..18a5dd4a114 100644
--- a/src/libstd/rt/rc.rs
+++ b/src/libstd/rt/rc.rs
@@ -74,7 +74,7 @@ impl<T> RC<T> {
 
 #[unsafe_destructor]
 impl<T> Drop for RC<T> {
-    fn finalize(&self) {
+    fn drop(&self) {
         assert!(self.refcount() > 0);
 
         unsafe {
diff --git a/src/libstd/rt/stack.rs b/src/libstd/rt/stack.rs
index b0e87a62c8b..fbb516b2df4 100644
--- a/src/libstd/rt/stack.rs
+++ b/src/libstd/rt/stack.rs
@@ -49,7 +49,7 @@ impl StackSegment {
 }
 
 impl Drop for StackSegment {
-    fn finalize(&self) {
+    fn drop(&self) {
         unsafe {
             // XXX: Using the FFI to call a C macro. Slow
             rust_valgrind_stack_deregister(self.valgrind_id);
diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs
index 41390aec80c..f5f5aca71f5 100644
--- a/src/libstd/rt/task.rs
+++ b/src/libstd/rt/task.rs
@@ -103,7 +103,7 @@ impl Task {
 }
 
 impl Drop for Task {
-    fn finalize(&self) { assert!(self.destroyed) }
+    fn drop(&self) { assert!(self.destroyed) }
 }
 
 // Just a sanity check to make sure we are catching a Rust-thrown exception
diff --git a/src/libstd/rt/thread.rs b/src/libstd/rt/thread.rs
index bc290191310..98d08c060e0 100644
--- a/src/libstd/rt/thread.rs
+++ b/src/libstd/rt/thread.rs
@@ -33,7 +33,7 @@ impl Thread {
 }
 
 impl Drop for Thread {
-    fn finalize(&self) {
+    fn drop(&self) {
         unsafe { rust_raw_thread_join_delete(self.raw_thread) }
     }
 }
diff --git a/src/libstd/rt/uv/uvio.rs b/src/libstd/rt/uv/uvio.rs
index 964ee460c1d..15c405bae69 100644
--- a/src/libstd/rt/uv/uvio.rs
+++ b/src/libstd/rt/uv/uvio.rs
@@ -47,7 +47,7 @@ impl UvEventLoop {
 }
 
 impl Drop for UvEventLoop {
-    fn finalize(&self) {
+    fn drop(&self) {
         // XXX: Need mutable finalizer
         let this = unsafe {
             transmute::<&UvEventLoop, &mut UvEventLoop>(self)
@@ -200,7 +200,7 @@ impl UvTcpListener {
 }
 
 impl Drop for UvTcpListener {
-    fn finalize(&self) {
+    fn drop(&self) {
         let watcher = self.watcher();
         let scheduler = Local::take::<Scheduler>();
         do scheduler.deschedule_running_task_and_then |task| {
@@ -261,7 +261,7 @@ impl UvTcpStream {
 }
 
 impl Drop for UvTcpStream {
-    fn finalize(&self) {
+    fn drop(&self) {
         rtdebug!("closing tcp stream");
         let watcher = self.watcher();
         let scheduler = Local::take::<Scheduler>();
diff --git a/src/libstd/rt/uvio.rs b/src/libstd/rt/uvio.rs
index f4a79934e7e..0187ad3abf5 100644
--- a/src/libstd/rt/uvio.rs
+++ b/src/libstd/rt/uvio.rs
@@ -42,7 +42,7 @@ impl UvEventLoop {
 }
 
 impl Drop for UvEventLoop {
-    fn finalize(&self) {
+    fn drop(&self) {
         // XXX: Need mutable finalizer
         let this = unsafe {
             transmute::<&UvEventLoop, &mut UvEventLoop>(self)
@@ -164,7 +164,7 @@ impl UvTcpListener {
 }
 
 impl Drop for UvTcpListener {
-    fn finalize(&self) {
+    fn drop(&self) {
         // XXX: Again, this never gets called. Use .close() instead
         //self.watcher().as_stream().close(||());
     }
@@ -230,7 +230,7 @@ impl UvStream {
 }
 
 impl Drop for UvStream {
-    fn finalize(&self) {
+    fn drop(&self) {
         rtdebug!("closing stream");
         //self.watcher().close(||());
     }