pub unsafe fn get_instance_proc_addr(
&self,
instance: Instance,
- name: *const c_char,
+ name: &CStr,
) -> Option<FnVoidFunction> {
- (self.get_instance_proc_addr)(instance, name)
+ (self.get_instance_proc_addr)(instance, name.as_ptr())
}
#[inline]
let load = |name: &CStr, function_version| {
if api_version >= function_version {
global_functions
- .get_instance_proc_addr(instance, name.as_ptr())
+ .get_instance_proc_addr(instance, name)
.unwrap_or_else(
#[cold]
|| {
unsafe {
let load = |name: &CStr| {
global_functions
- .get_instance_proc_addr(instance, name.as_ptr())
+ .get_instance_proc_addr(instance, name)
.unwrap_or_else(
#[cold]
|| panic!("failed to load device function {}", name.to_string_lossy()),
let load = |name: &CStr, function_version: u32| {
if api_version >= function_version {
global_functions
- .get_instance_proc_addr(instance, name.as_ptr())
+ .get_instance_proc_addr(instance, name)
.unwrap_or_else(
#[cold]
|| panic!("failed to load device function {}", name.to_string_lossy()),