rust-objc v0.2.0 Release Notes
Release Date: 2016-03-20 // about 8 years ago-
โ Added
โ Added verification for the types used when sending messages. This can be enabled for all messages with the
"verify_message"
feature, or you can test before sending specific messages with theMessage::verify_message
method. Verification errors are reported using the newMessageError
struct.โ Added support for the GNUstep runtime! Operating systems besides OSX and iOS will fall back to the GNUstep runtime.
Root classes can be declared by using the
ClassDecl::root
constructor.
๐ Changed
C types are now used from
std::os::raw
rather thanlibc
. This meansEncode
may not be implemented forlibc
types; switch them to thestd::os::raw
equivalents instead. This avoids an issue that would arise from simultaneously using different versions of the libc crate.๐ Dynamic messaging was moved into the
Message
trait; instead of().send(obj, sel!(description))
, useobj.send_message(sel!(description), ())
.Rearranged the parameters to
ClassDecl::new
for consistency; instead ofClassDecl::new(superclass, "MyObject")
, useClassDecl::new("MyObject", superclass)
.Overhauled the
MethodImplementation
trait. Encodings are now accessed through theMethodImplementation::Args
associated type. Theimp_for
method was replaced withimp
and no longer takes a selector or returns anUnequalArgsError
, althoughClassDecl::add_method
still validates the number of arguments.โก๏ธ Updated the definition of
Imp
to not use the old dispatch prototypes. To invoke anImp
, it must first be transmuted to the correct type.โ Removed
objc_msgSend
functions from theruntime
module; the availability of these functions varies and they shouldn't be called without trasmuting, so they are now hidden as an implementation detail of messaging.
๐ Fixed
Corrected alignment of ivars in
ClassDecl
; declared classes may now have a smaller size.๐ป With the
"exception"
or"verify_message"
feature enabled, panics frommsg_send!
will now be triggered from the line and file where the macro is used, rather than from within the implementation of messaging.