obhq / obliteration

Experimental free and open-source PlayStation 4 kernel
https://obliteration.net
Apache License 2.0
622 stars 17 forks source link

Adds lifetime parameter to IoVec::{try_}from_raw_parts #787

Closed ultimaweapon closed 6 months ago

ultimaweapon commented 6 months ago

See https://doc.rust-lang.org/std/ffi/struct.CStr.html#method.from_ptr for an example.

Also better to add document to the IoVec.

SuchAFuriousDeath commented 6 months ago

I don't know how to do this. The example doesn't map onto the our code.

SuchAFuriousDeath commented 6 months ago

By the way, don't you have the same problem with gutex guards? Maybe VS Code is incorrect or I don't understand something, but I don't think the lifetime here should be static.

image

ultimaweapon commented 6 months ago

I turned off inlay hint.

SuchAFuriousDeath commented 6 months ago

Ok, but is the 'static lifetime correct, or not?

ultimaweapon commented 6 months ago

After taking a look we have a bigger problem than a life time of two methods here. I'll close this issue and create a new one.