Skip to content

Commit

Permalink
jocosocial#244 make it build on new glibc swift
Browse files Browse the repository at this point in the history
  • Loading branch information
cohoe committed Dec 28, 2023
1 parent 896c47a commit dbc0fa0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Sources/swiftarr/Image/Image.swift
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,8 @@ public class GDImage {
extension GDImage {
public convenience init?(url: URL) {
let inputFile = fopen(url.path, "rb")
defer { fclose(inputFile) }

guard inputFile != nil else { return nil }
defer { fclose(inputFile!) }

let loadedImage: gdImagePtr?

Expand Down Expand Up @@ -390,7 +389,7 @@ extension GDImage {

// open our output file, then defer it to close
let outputFile = fopen(url.path, "wb")
defer { fclose(outputFile) }
defer { fclose(outputFile!) }

// write the correct output format based on the path extension
switch fileType {
Expand Down

0 comments on commit dbc0fa0

Please sign in to comment.