Skip to content

Conversation

@adnan-alhomssi
Copy link

No description provided.

Copy link
Member

@andrebsguedes andrebsguedes left a comment

Choose a reason for hiding this comment

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

LGTM! Just some minor considerations

(Will approve once we have merged and released object_store_ffi and updated the version here)

c_paths = [Base.cconvert(Cstring, path) for path in paths]
# Create an array of pointers to the Cstrings
paths_array = [pointer(c_path) for c_path in c_paths]
result = GC.@preserve paths c_paths paths_array config response event try
Copy link
Member

Choose a reason for hiding this comment

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

Quite a lot of GC.@preserve, I think the c_paths is redundant because Base.cconvert(Cstring, String) is a noop IIRC, but it is better to be safe and leave it as you have here.

Copy link
Member

Choose a reason for hiding this comment

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

I did some testing and Julia appears to be smart enough to convert Vector{String} to Ptr{Ptr{Cchar}} on the @ccall directly. But I leave it for you to decide whether you trust it or not 😉

Copy link
Author

Choose a reason for hiding this comment

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

changed it to pass Vector{String} directly

@adnan-alhomssi adnan-alhomssi marked this pull request as ready for review February 11, 2025 21:26
Copy link
Member

@andrebsguedes andrebsguedes left a comment

Choose a reason for hiding this comment

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

LGTM!

@andrebsguedes andrebsguedes merged commit 4bc46a0 into main Mar 1, 2025
5 checks passed
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