Commit Graph

5 Commits

Author SHA1 Message Date
practicalswift
cc852042c9 [gardening] Fix accidental trailing whitespace. 2016-10-29 10:22:58 +02:00
practicalswift
72cbb71685 [gardening] Make code pass "perlcritic" review: Avoid subroutine prototypes.
> "perlcritic" is a Perl source code analyzer.  It is the executable front-end
> to the Perl::Critic engine, which attempts to identify awkward, hard to read,
> error-prone, or unconventional constructs in your code.  Most of the rules are
> based on Damian Conway's book Perl Best Practices.
2016-06-14 23:29:33 +02:00
practicalswift
9e62e7bce5 Use Perl pragma to restrict unsafe constructs ("use strict"). 2015-12-19 20:32:58 +01:00
Doug Gregor
88b679969c Get availability annotations right for NSCocoaError.
Fix the script to not wantonly drop availability annotations, and
update NSCocoError accordingly. Also drop in a reinterpret-casting
rawValue initializer, which matches what we get when importing enums
from C.

Swift SVN r28563
2015-05-14 06:53:52 +00:00
Doug Gregor
cfbe2e0921 Hard-code the Cocoa error domain mapping using the results of a simple script.
Bridging the Cocoa error domain requires us to gather constants from
Foundation, CoreData, and AppKit, then pulling those into a single
(_)NSCocoaError enum that conforms to
_ObjectiveCBridgeableErrorType.

Rather than using a table extracted from the appropriate Cocoa headers
and pushing that through gyb, just hardcode the resuting Swift code,
which is produced (manually) by an enumeration-parsing script. Thanks
to Dave for pointing out that I was holding gyb wrong.

... and apologies for the Perl.

Long term, we need a better solution here, but this will suffice for
the short term.

Swift SVN r28560
2015-05-14 05:39:45 +00:00