Swift 4.2 support

This commit is contained in:
John Estropia
2018-09-15 12:56:08 +09:00
parent f25879b6fe
commit 1ad233ca9d
215 changed files with 425 additions and 333 deletions

View File

@@ -2,7 +2,7 @@
// Functions.swift
// CoreStore
//
// Copyright © 2014 John Rommel Estropia
// Copyright © 2018 John Rommel Estropia
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -27,6 +27,15 @@ import Foundation
// MARK: Associated Objects
@inline(__always)
/// type(of:) doesn't return the dynamic type anymore, use this to guarantee correct dispatch of class methods
internal func cs_dynamicType<T: AnyObject>(of instance: T) -> T.Type {
return object_getClass(instance) as! T.Type
}
// MARK: Associated Objects
@inline(__always)
internal func cs_getAssociatedObjectForKey<T: AnyObject>(_ key: UnsafeRawPointer, inObject object: Any) -> T? {