diff --git a/src/encode.rs b/src/encode.rs index e17f2ab5a..921479da9 100644 --- a/src/encode.rs +++ b/src/encode.rs @@ -32,7 +32,7 @@ enum Code { /// An Objective-C type encoding. /// /// For more information, see Apple's documentation: -/// https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html +/// pub struct Encoding { code: Code, } diff --git a/src/message/arm.rs b/src/message/arm.rs index 4fb535da4..103b3a3cc 100644 --- a/src/message/arm.rs +++ b/src/message/arm.rs @@ -7,7 +7,7 @@ use super::Super; pub fn msg_send_fn(obj: *mut Object, _: Sel) -> (Imp, *mut Object) { // Double-word sized fundamental data types don't use stret, // but any composite type larger than 4 bytes does. - // http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042e/IHI0042E_aapcs.pdf + // extern { fn objc_msgSend(); diff --git a/src/message/arm64.rs b/src/message/arm64.rs index 7ff6fb587..016568acd 100644 --- a/src/message/arm64.rs +++ b/src/message/arm64.rs @@ -3,7 +3,7 @@ use super::Super; pub fn msg_send_fn(obj: *mut Object, _: Sel) -> (Imp, *mut Object) { // stret is not even available in arm64. - // https://twitter.com/gparker/status/378079715824660480 + // extern { fn objc_msgSend(); diff --git a/src/message/mod.rs b/src/message/mod.rs index 41485e974..0bfc8cfa0 100644 --- a/src/message/mod.rs +++ b/src/message/mod.rs @@ -47,8 +47,8 @@ pub unsafe trait Message { Sends a message to self with the given selector and arguments. The correct version of `objc_msgSend` will be chosen based on the - return type. For more information, see Apple's documenation: - https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ObjCRuntimeRef/index.html#//apple_ref/doc/uid/TP40001418-CH1g-88778 + return type. For more information, see Apple's documentation: + If the selector is known at compile-time, it is recommended to use the `msg_send!` macro rather than this method. diff --git a/src/message/x86.rs b/src/message/x86.rs index a1f8499ad..51c6f4d42 100644 --- a/src/message/x86.rs +++ b/src/message/x86.rs @@ -8,7 +8,7 @@ pub fn msg_send_fn(obj: *mut Object, _: Sel) -> (Imp, *mut Object) { // Structures 1 or 2 bytes in size are placed in EAX. // Structures 4 or 8 bytes in size are placed in: EAX and EDX. // Structures of other sizes are placed at the address supplied by the caller. - // https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/LowLevelABI/130-IA-32_Function_Calling_Conventions/IA32.html + // extern { fn objc_msgSend(); diff --git a/src/message/x86_64.rs b/src/message/x86_64.rs index 94ed9ab59..89b342281 100644 --- a/src/message/x86_64.rs +++ b/src/message/x86_64.rs @@ -7,7 +7,7 @@ pub fn msg_send_fn(obj: *mut Object, _: Sel) -> (Imp, *mut Object) { // If the size of an object is larger than two eightbytes, it has class MEMORY. // If the type has class MEMORY, then the caller provides space for the return // value and passes the address of this storage. - // http://people.freebsd.org/~obrien/amd64-elf-abi.pdf + // extern { fn objc_msgSend(); diff --git a/src/runtime.rs b/src/runtime.rs index a98526615..2451307f4 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -1,7 +1,7 @@ //! A Rust interface for the functionality of the Objective-C runtime. //! //! For more information on foreign functions, see Apple's documentation: -//! https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ObjCRuntimeRef/index.html +//! use std::ffi::{CStr, CString}; use std::fmt;