Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFI class improvements (fixes #221) #230

Merged
merged 2 commits into from
Feb 14, 2024
Merged

Conversation

uuf6429
Copy link
Contributor

@uuf6429 uuf6429 commented Jan 31, 2024

Changes (all backward compatible!):

  • a few minor improvements to comments
  • fixes loadLibrary return type (it can now return null, which is then handled by caller)
  • adds a new library path for osx/brew (see also link in comment)
  • tiny simplification to cpp script to avoid HEREDOC interpolation
  • changed all HEREDOCs to NOWDOCs (among other things, doesn't require escaping dollar signs etc)
  • changed all NOWDOC terminators to "CPP" - participating IDEs can highlight the code in those strings properly based on that

While the change in return type should fix the error from #221, hopefully adding the extra search path also fix the root cause behind it too.

@jcupitt
Copy link
Member

jcupitt commented Feb 2, 2024

This is great, thank you @uuf6429!

I'll try to take a look today.

src/FFI.php Outdated Show resolved Hide resolved
@uuf6429
Copy link
Contributor Author

uuf6429 commented Feb 3, 2024

@jcupitt I've improved the code style a bit more in a separate branch: 14f9c79 (consistent NOWDOC indentation; unambiguous condition)
What do you think, is it too much? If you're ok with it, I can cherry-pick it into this PR (if not we can leave it out).

@jcupitt
Copy link
Member

jcupitt commented Feb 14, 2024

Sorry for the delay, I've been working on other stuff.

Let's merge this and maybe have another PR for the code style changes you suggested. I left a comment on that branch.

@jcupitt jcupitt merged commit 57b593a into libvips:master Feb 14, 2024
4 checks passed
@uuf6429 uuf6429 deleted the ffi-improvements branch February 14, 2024 18:59
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.

2 participants