summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 9568b6c..cd2e4d0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -4,15 +4,15 @@
use opengl_registry_macros::for_each_opengl_command;
for_each_opengl_command! {
- #[doc = stringify!(_gl_command_)]
+ #[doc = stringify!(#gl_command_name)]
#[allow(non_snake_case, clippy::too_many_arguments)]
- pub unsafe fn _gl_command_(_gl_command_args_) -> _gl_command_ret_type_ {
+ pub unsafe fn #gl_command_name_noprefix(#gl_command_args) -> #gl_command_ret_type {
type GLFunc =
- unsafe extern "C" fn(_gl_command_arg_types_) -> _gl_command_ret_type_;
+ unsafe extern "C" fn(#gl_command_arg_types) -> #gl_command_ret_type;
- let gl_func = std::mem::transmute::<_, GLFunc>(functions::_gl_command_);
+ let gl_func = std::mem::transmute::<_, GLFunc>(functions::#gl_command_name);
- gl_func(_gl_command_arg_names_)
+ gl_func(#gl_command_arg_names)
}
}
@@ -39,7 +39,7 @@ where
{
for_each_opengl_command! {
unsafe {
- functions::_gl_command_ = get_proc_addr(stringify!(_gl_command_));
+ functions::#gl_command_name = get_proc_addr(stringify!(#gl_command_name));
}
};
}
@@ -49,9 +49,9 @@ mod functions
use opengl_registry_macros::for_each_opengl_command;
for_each_opengl_command!(
- #[doc = stringify!(_gl_command_)]
+ #[doc = stringify!(#gl_command_name)]
#[allow(non_upper_case_globals)]
- pub static mut _gl_command_: unsafe extern "C" fn() = function_not_loaded;
+ pub static mut #gl_command_name: unsafe extern "C" fn() = function_not_loaded;
);
extern "C" fn function_not_loaded()