2012-08-15 18:46:55 -07:00
|
|
|
struct cat {
|
2012-09-06 19:40:15 -07:00
|
|
|
done : extern fn(uint),
|
|
|
|
meows : uint,
|
2012-11-14 01:22:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
impl cat : Drop {
|
|
|
|
fn finalize() {
|
|
|
|
self.done(self.meows);
|
|
|
|
}
|
2012-05-14 14:13:32 -07:00
|
|
|
}
|
|
|
|
|
2012-09-05 15:58:43 -07:00
|
|
|
fn cat(done: extern fn(uint)) -> cat {
|
|
|
|
cat {
|
|
|
|
meows: 0u,
|
|
|
|
done: done
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-05-14 14:13:32 -07:00
|
|
|
fn main() {}
|