3.6 KiB
0.2.7
Fixed
- Uses of
msg_send!will now correctly fail to compile if no return type can be inferred, instead of relying on an edge case of the compiler that will soon change and silently cause undefined behavior.
0.2.6
Fixed
- Suppressed a deprecation warning in
sel!,msg_send!, andclass!.
0.2.5
Added
autoreleasepoolreturns the value returned by its body closure.
0.2.4
Added
-
Added an
rcmodule with reference counting utilities:StrongPtr,WeakPtr, andautoreleasepool. -
Added some reference counting ABI foreign functions to the
runtimemodule.
Fixed
- Messaging nil under GNUstep now correctly returns zeroed results for all return types.
0.2.3
Added
-
Added a
class!macro for getting statically-known classes. The result is non-optional (avoiding a need to unwrap) and cached so each usage will only look up the class once. -
Added caching to the
sel!macro so that each usage will only register the selector once.
Fixed
- Fixed the implementation of
objc::runtimestructs so there can't be unsound references to uninhabited types.
0.2.2
Added
- Implemented
SyncandSendforSel.
0.2.1
Added
-
Added support for working with protocols with the
Protocolstruct. The protocols a class conforms to can be examined with the newClass::adopted_protocolsandClass::conforms_tomethods. -
Protocols can be declared using the new
ProtocolDeclstruct.
0.2.0
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_messagemethod. Verification errors are reported using the newMessageErrorstruct. -
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::rootconstructor.
Changed
-
C types are now used from
std::os::rawrather thanlibc. This meansEncodemay not be implemented forlibctypes; switch them to thestd::os::rawequivalents instead. This avoids an issue that would arise from simultaneously using different versions of the libc crate. -
Dynamic messaging was moved into the
Messagetrait; instead of().send(obj, sel!(description)), useobj.send_message(sel!(description), ()). -
Rearranged the parameters to
ClassDecl::newfor consistency; instead ofClassDecl::new(superclass, "MyObject"), useClassDecl::new("MyObject", superclass). -
Overhauled the
MethodImplementationtrait. Encodings are now accessed through theMethodImplementation::Argsassociated type. Theimp_formethod was replaced withimpand no longer takes a selector or returns anUnequalArgsError, althoughClassDecl::add_methodstill validates the number of arguments. -
Updated the definition of
Impto not use the old dispatch prototypes. To invoke anImp, it must first be transmuted to the correct type. -
Removed
objc_msgSendfunctions from theruntimemodule; 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.