wickwirew / Runtime

A Swift Runtime library for viewing type info, and the dynamic getting and setting of properties.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CRuntime can be removed

NSExceptional opened this issue · comments

Simply include this function definition somewhere in this project:

@_silgen_name("swift_getTypeByMangledNameInContext")
func swift_getTypeByMangledNameInContext(
    _ typeNameStart: UnsafeMutablePointer<Int8>,
    _ typeNameLength: Int32,
    _ context: UnsafeRawPointer?,
    _ genericArgs: UnsafePointer<UnsafeRawPointer?>?
) -> UnsafeRawPointer?

Closing this issue because it has occurred to me that using a bridging header is more formal than using the private @_silgen_name

Back in swift 4.2 we had something similar to that for the swift_getFieldAt call, which caused linking problems on linux. Moving it to a separate module was the ultimate fix.

Heres the thread: #18 (comment)

If we can remove it I'd love too though

Yeah, sounds like what Joe told me. Relevant thread on the forums.