Skip to content

Commit

Permalink
auto merge of #7896 : pcwalton/rust/pub-extern, r=pcwalton
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Jul 21, 2013
2 parents 75b4b1b + 06594ed commit 8476419
Show file tree
Hide file tree
Showing 85 changed files with 825 additions and 701 deletions.
2 changes: 1 addition & 1 deletion src/libextra/dbg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub mod rustrt {
use std::unstable::intrinsics::{TyDesc};

#[abi = "cdecl"]
pub extern {
extern {
pub unsafe fn debug_tydesc(td: *TyDesc);
pub unsafe fn debug_opaque(td: *TyDesc, x: *());
pub unsafe fn debug_box(td: *TyDesc, x: *());
Expand Down
22 changes: 11 additions & 11 deletions src/libextra/flate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ pub mod rustrt {
use std::libc::{c_int, c_void, size_t};

#[link_name = "rustrt"]
pub extern {
unsafe fn tdefl_compress_mem_to_heap(psrc_buf: *const c_void,
src_buf_len: size_t,
pout_len: *mut size_t,
flags: c_int)
-> *c_void;
extern {
pub unsafe fn tdefl_compress_mem_to_heap(psrc_buf: *const c_void,
src_buf_len: size_t,
pout_len: *mut size_t,
flags: c_int)
-> *c_void;

unsafe fn tinfl_decompress_mem_to_heap(psrc_buf: *const c_void,
src_buf_len: size_t,
pout_len: *mut size_t,
flags: c_int)
-> *c_void;
pub unsafe fn tinfl_decompress_mem_to_heap(psrc_buf: *const c_void,
src_buf_len: size_t,
pout_len: *mut size_t,
flags: c_int)
-> *c_void;
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/libextra/net/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ pub mod rustrt {
use std::libc;

#[nolink]
pub extern {
unsafe fn rust_uv_current_kernel_malloc(size: libc::c_uint)
-> *libc::c_void;
unsafe fn rust_uv_current_kernel_free(mem: *libc::c_void);
unsafe fn rust_uv_helper_uv_tcp_t_size() -> libc::c_uint;
extern {
pub unsafe fn rust_uv_current_kernel_malloc(size: libc::c_uint)
-> *libc::c_void;
pub unsafe fn rust_uv_current_kernel_free(mem: *libc::c_void);
pub unsafe fn rust_uv_helper_uv_tcp_t_size() -> libc::c_uint;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/libextra/rl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use std::str;
pub mod rustrt {
use std::libc::{c_char, c_int};

pub extern {
extern {
pub unsafe fn linenoise(prompt: *c_char) -> *c_char;
pub unsafe fn linenoiseHistoryAdd(line: *c_char) -> c_int;
pub unsafe fn linenoiseHistorySetMaxLen(len: c_int) -> c_int;
Expand Down
2 changes: 1 addition & 1 deletion src/libextra/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub mod rustrt {
use super::Tm;

#[abi = "cdecl"]
pub extern {
extern {
pub unsafe fn get_time(sec: &mut i64, nsec: &mut i32);

pub unsafe fn precise_time_ns(ns: &mut u64);
Expand Down
18 changes: 9 additions & 9 deletions src/libextra/unicode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ pub mod icu {
pub mod libicu {
#[link_name = "icuuc"]
#[abi = "cdecl"]
pub extern {
unsafe fn u_hasBinaryProperty(c: UChar32, which: UProperty)
-> UBool;
unsafe fn u_isdigit(c: UChar32) -> UBool;
unsafe fn u_islower(c: UChar32) -> UBool;
unsafe fn u_isspace(c: UChar32) -> UBool;
unsafe fn u_isupper(c: UChar32) -> UBool;
unsafe fn u_tolower(c: UChar32) -> UChar32;
unsafe fn u_toupper(c: UChar32) -> UChar32;
extern {
pub unsafe fn u_hasBinaryProperty(c: UChar32, which: UProperty)
-> UBool;
pub unsafe fn u_isdigit(c: UChar32) -> UBool;
pub unsafe fn u_islower(c: UChar32) -> UBool;
pub unsafe fn u_isspace(c: UChar32) -> UBool;
pub unsafe fn u_isupper(c: UChar32) -> UBool;
pub unsafe fn u_tolower(c: UChar32) -> UChar32;
pub unsafe fn u_toupper(c: UChar32) -> UChar32;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/lib/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ pub mod llvm {
#[link_args = "-Lrustllvm -lrustllvm"]
#[link_name = "rustllvm"]
#[abi = "cdecl"]
pub extern {
extern {
/* Create and destroy contexts. */
#[fast_ffi]
pub unsafe fn LLVMContextCreate() -> ContextRef;
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/cleanup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ pub mod rustrt {
use libc::c_void;

#[link_name = "rustrt"]
pub extern {
extern {
#[rust_stack]
// FIXME (#4386): Unable to make following method private.
pub unsafe fn rust_get_task() -> *c_void;
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub mod rustrt {
use super::StackSegment;

#[link_name = "rustrt"]
pub extern {
extern {
#[rust_stack]
pub unsafe fn rust_gc_metadata() -> *Word;

Expand Down
8 changes: 4 additions & 4 deletions src/libstd/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ pub mod rustrt {

#[abi = "cdecl"]
#[link_name = "rustrt"]
pub extern {
unsafe fn rust_get_stdin() -> *libc::FILE;
unsafe fn rust_get_stdout() -> *libc::FILE;
unsafe fn rust_get_stderr() -> *libc::FILE;
extern {
pub unsafe fn rust_get_stdin() -> *libc::FILE;
pub unsafe fn rust_get_stdout() -> *libc::FILE;
pub unsafe fn rust_get_stderr() -> *libc::FILE;
}
}

Expand Down
Loading

0 comments on commit 8476419

Please sign in to comment.