{"push_id":1312946097,"size":3,"distinct_size":3,"ref":"refs/heads/swift-3.0-branch","head":"51efc3804a367151c7af27561a2e89cdf60d5532","before":"4dea103aec65a7bb901dd8f34a989ed22980c58a","commits":[{"sha":"272163f9b7dd10f48ec3fa6ebc0eb8be97c15fc0","author":{"name":"Joe Groff","email":"68122447f8f73fd0fe68c1577287346172ffeb70@apple.com"},"message":"Add a builtin to generate the ObjC @encode string for a type.\n\nWe need the encode string to be able to construct NSValues using the core valueWithBytes:objCType: API. This builtin only works with concrete, @objc-representable types for now, which should be sufficient for a stdlib-internal API.","distinct":true,"url":"https://api.github.com/repos/apple/swift/commits/272163f9b7dd10f48ec3fa6ebc0eb8be97c15fc0"},{"sha":"c1e8ce6535857fa6b3eac9ba461936e746dc8cad","author":{"name":"Joe Groff","email":"68122447f8f73fd0fe68c1577287346172ffeb70@apple.com"},"message":"SE-0139: Bridge Cocoa framework structs to NSValue.\n\nFor every struct type for which the frameworks provides an NSValue category for boxing and unboxing values of that type, provide an _ObjectiveCBridgeable conformance in the Swift overlay that bridges that struct to NSValue, allowing the structs to be used naturally with id-as-Any APIs and Cocoa container classes. This is mostly a matter of gyb-ing out boilerplate using `NSValue.init(bytes:objCType:)` to construct the instance, `NSValue.objCType` to check its type when casting, and `NSValue.getValue(_:)` to extract the unboxed value, though there are a number of special snowflake cases that need special accommodation:\n\n- To maintain proper layering, CoreGraphics structs need to be bridged in the Foundation overlay.\n- AVFoundation provides the NSValue boxing categories for structs owned by CoreMedia, but it does so using its own internal subclasses of NSValue, and these subclasses do not interop properly with the standard `NSValue` subclasses instantiated by Foundation. To do the right thing, we therefore have to let AVFoundation provide the bridging implementation for the CoreMedia types, and we have to use its category methods to do so.\n- SceneKit provides NSValue categories to box and unbox SCNVector3, SCNVector4, and SCNMatrix4; however, the methods it provides do so in an unusual way. SCNVector3 and SCNVector4 are packaged into `CGRect`s and then the CGRect is boxed using `valueWithCGRect:`. SCNMatrix4 is copied into a CATransform3D, which is then boxed using `valueWithCATransform3D:` from CoreAnimation. To be consistent with what SceneKit does, use its category methods for these types as well, and when casting, check the type against the type encoding SceneKit uses rather than the type encoding of the expected type.","distinct":true,"url":"https://api.github.com/repos/apple/swift/commits/c1e8ce6535857fa6b3eac9ba461936e746dc8cad"},{"sha":"51efc3804a367151c7af27561a2e89cdf60d5532","author":{"name":"Ted Kremenek","email":"49893db2bf842cf86833804067d706e978509d70@apple.com"},"message":"Merge pull request #4922 from jckarter/nsvalue-bridging-3.0\n\n[3.0] SE-0139: NSValue bridging","distinct":true,"url":"https://api.github.com/repos/apple/swift/commits/51efc3804a367151c7af27561a2e89cdf60d5532"}]}
{"actor":{"display_login":"tkremenek"}}