Skip to content

Optimize file_readable()#1878

Closed
michaelortmann wants to merge 2 commits intoeggheads:developfrom
michaelortmann:file_readable
Closed

Optimize file_readable()#1878
michaelortmann wants to merge 2 commits intoeggheads:developfrom
michaelortmann:file_readable

Conversation

@michaelortmann
Copy link
Copy Markdown
Member

Found by: michaelortmann
Patch by: michaelortmann
Fixes:

One-line summary:
Optimize file_readable() down to using a single call to POSIX 2001 access()

Additional description (if needed):
We could even #define it, but that would probably break binary modules, so this is the best fully compatible solution.

Test cases demonstrating functionality (if applicable):
No functional change

@michaelortmann
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a6a35f1756

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@michaelortmann
Copy link
Copy Markdown
Member Author

i reject this PR. my understanding of access() vs. fopen()+fclose() wasnt good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant