diff options
| -rw-r--r-- | Cargo.toml | 2 | ||||
| -rw-r--r-- | src/lib.rs | 16 | 
2 files changed, 9 insertions, 9 deletions
@@ -5,7 +5,7 @@ edition = "2021"  description = "Low-level OpenGL bindings"  [dependencies] -opengl-registry-macros = { git = "https://git.hampusmat.com/opengl-registry-macros" } +opengl-registry-macros = "0.1.0"  [build-dependencies]  bindgen = "0.63.0" @@ -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()  | 
