Files
swift-mirror/stdlib/objc/BridgeObjectiveC.mm
Jordan Rose 940d53c864 Fix definition of "nil": it has to be null, not a default-initialized NSObject.
This ended up being easiest with a runtime function. I couldn't push this
into the standard library because the standard library doesn't know about
NSObject, and I couldn't compile the ObjectiveC module as -parse-stdlib
because it uses standard library types and doesn't otherwise know how to
find the "swift" module.

Swift SVN r7581
2013-08-26 18:57:45 +00:00

21 lines
764 B
Plaintext

//===--- BridgeObjectiveC.mm - Swift <-> Objective-C Bridging -------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This implements runtime support for bridging between Swift and Objective-C
// in non-trivial cases.
//
//===----------------------------------------------------------------------===//
extern "C" id swift_makeUnsafeNil() {
return (id)0;
}