Skip to content

fix the cstring's pointer access in File::new and File::new_type#2

Closed
alexsult wants to merge 1 commit into
ebassi:masterfrom
alexsult:master
Closed

fix the cstring's pointer access in File::new and File::new_type#2
alexsult wants to merge 1 commit into
ebassi:masterfrom
alexsult:master

Conversation

@alexsult

Copy link
Copy Markdown

Hello,

As I understand from https://doc.rust-lang.org/std/ffi/struct.CString.html#method.as_ptr , the CString is deallocated after the match, then we need to bind the string to filename_c and call .as_ptr() later.

Regards,

Alexis

@fabian-z fabian-z mentioned this pull request Feb 27, 2017
@ebassi

ebassi commented Mar 29, 2017

Copy link
Copy Markdown
Owner

This has been fixed by PR #3.

Sorry for taking this long to review.

@ebassi ebassi closed this Mar 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants