objc2swift
objc2swift copied to clipboard
Modern C struct support is missing
E.g. this is valid Obj-C code
typedef struct {
time_t time;
size_t bytes;
} SessionLimits;
// ....
return (SessionLimits){
.time = someValue
.bytes = someOtherVAlue
};
This would translate to
import Darwin
struct SessionLimits {
var time: time_t
var bytes: size_t
}
// ...
return SessionLimits(time: someValue, bytes: someOtherValue)
in Swift.