On Thu, Feb 06, 2014 at 02:19:06PM +0100, Magnus Holm wrote:
> Hi,
>
> Idea:
>
> #[prefix="http_parser_"]
> extern {
> pub fn init(parser: *http_parser, _type: enum_http_parser_type);
> …
> }
>
> This have a few niceties:
>
> * You don't have repeat the prefix in every function
> * You can now write http_parser::init(…) to call the function
This could also be achieved with a macro, I think.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev