Use attributes for native module ABI and link name

This patch changes how to specify ABI and link name of a native module.

Before:
  native "cdecl" mod llvm = "rustllvm" {...}

After:
  #[abi = "cdecl"]
  #[link_name = "rustllvm"]
  native mod llvm {...}

The old optional syntax for ABI and link name is no longer supported.

Fixes issue #547
This commit is contained in:
Haitao Li 2011-11-16 22:49:38 -06:00 committed by Brian Anderson
parent 2b34e240c1
commit a19c0560ec

View File

@ -3,7 +3,8 @@ Module: rand
Random number generation
*/
native "cdecl" mod rustrt {
#[abi = "cdecl"]
native mod rustrt {
type rctx;
fn rand_new() -> rctx;
fn rand_next(c: rctx) -> u32;