From: Roopesh Chander Date: Fri, 22 Mar 2019 10:01:02 +0000 (+0530) Subject: macOS: Syntax highlighter: Swift can bridge c strings automatically X-Git-Tag: 0.0.20190409-6~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbd5ea1ff08ec96e2609151a88a702197dff40b7;p=thirdparty%2Fwireguard-apple.git macOS: Syntax highlighter: Swift can bridge c strings automatically Signed-off-by: Roopesh Chander --- diff --git a/WireGuard/WireGuard/UI/macOS/View/ConfTextStorage.swift b/WireGuard/WireGuard/UI/macOS/View/ConfTextStorage.swift index 077ee1e..2219759 100644 --- a/WireGuard/WireGuard/UI/macOS/View/ConfTextStorage.swift +++ b/WireGuard/WireGuard/UI/macOS/View/ConfTextStorage.swift @@ -143,7 +143,7 @@ class ConfTextStorage: NSTextStorage { .font: defaultFont ] backingStore.setAttributes(defaultAttributes, range: fullTextRange) - var spans = highlight_config(backingStore.string.cString(using: String.Encoding.utf8))! + var spans = highlight_config(backingStore.string)! evaluateExcludePrivateIPs(highlightSpans: spans) while spans.pointee.type != HighlightEnd {