2012-07-20 22:40:47 -05:00
|
|
|
#[link(name = "issue_2526",
|
2012-06-13 13:20:21 -05:00
|
|
|
vers = "0.2",
|
|
|
|
uuid = "54cc1bc9-02b8-447c-a227-75ebc923bc29")];
|
|
|
|
#[crate_type = "lib"];
|
|
|
|
|
|
|
|
use std;
|
|
|
|
|
|
|
|
export context;
|
|
|
|
|
2012-06-22 15:11:29 -05:00
|
|
|
class arc_destruct<T:const> {
|
|
|
|
let _data: int;
|
|
|
|
new(data: int) { self._data = data; }
|
|
|
|
drop {}
|
|
|
|
}
|
2012-06-13 13:20:21 -05:00
|
|
|
|
|
|
|
fn arc<T: const>(_data: T) -> arc_destruct<T> {
|
|
|
|
arc_destruct(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn init() -> arc_destruct<context_res> unsafe {
|
|
|
|
arc(context_res())
|
|
|
|
}
|
|
|
|
|
|
|
|
class context_res {
|
|
|
|
let ctx : int;
|
|
|
|
|
|
|
|
new() { self.ctx = 0; }
|
|
|
|
|
|
|
|
drop { }
|
|
|
|
}
|
|
|
|
|
|
|
|
type context = arc_destruct<context_res>;
|
|
|
|
|
2012-08-07 20:10:06 -05:00
|
|
|
impl context {
|
2012-06-13 13:20:21 -05:00
|
|
|
fn socket() { }
|
|
|
|
}
|