     /// - Throws: an `ErrorType` if there is an issue with the CSS
     @discardableResult
     public func load(from data: String) throws -> Bool {
-        return try loadFrom(data: string(data), length: -1)
+        return try with(gString: data) {
+            return try loadFrom(data: $0, length: -1)
+        }
     }
 }
 


public extension CssProviderProtocol {
    /// Return the CSS provider as a style provider
    public var styleProvider: StyleProviderRef { return StyleProviderRef(cPointer: ptr) }

    /// Loads the data provided in the given string into the CSS Provider
    ///

//  Created by Rene Hexel on 25/4/17.
//  Copyright © 2017 Rene Hexel.  All rights reserved.
//
import Foundation
import CGtk

fileprivate func with<T>(gString: UnsafePointer<CChar>, perform: (UnsafeMutablePointer<gchar>) throws -> T) throws -> T {
    return try perform(UnsafeMutablePointer(mutating: gString))
}

/// CSS Provider reference
public typealias CSSProviderRef = CssProvider
