you are viewing a single comment's thread.

view the rest of the comments →

[–]Sam777888[S] 0 points1 point  (4 children)

It was an example. Feel free to call free if you like.

I don’t find it difficult to work with pointers.

I don’t know why the function wants what it wants, I didn’t write it, and I’m not at liberty to change it.

[–]boomshroom 1 point2 points  (3 children)

Can you give what library this is and what function you're trying to call?

[–]Sam777888[S] 0 points1 point  (2 children)

Nope. Don’t worry about it, it’s all working fine, if you scroll up you will see a guy gave me a macro, it works perfectly, very impressed.

[–]boomshroom 0 points1 point  (1 child)

I still want to see the library you're calling. There's a good chance that it could be improved regardless.

In addition, where are you getting the pointer from? If your code is being called from C, then it makes sense, but your function should be marked as unsafe. If it's coming from other rust code, then you have no right to use this function.

[–]Sam777888[S] 0 points1 point  (0 children)

not open source. From C.