diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-10-04 09:40:08 -0700 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2023-10-04 10:25:46 -0700 |
commit | 7db6f448ed9ba6a5c27a750416cb6877711a7c05 (patch) | |
tree | 7bb908aa76768ef892324d572b18ac20eefb1f63 /yjit | |
parent | 577ff858bce3c9620c763d6481b082253f7e2bfd (diff) |
Use a better variable name for w
Diffstat (limited to 'yjit')
-rw-r--r-- | yjit/src/options.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/yjit/src/options.rs b/yjit/src/options.rs index f25e7f3618..e8d08aae50 100644 --- a/yjit/src/options.rs +++ b/yjit/src/options.rs @@ -244,16 +244,17 @@ pub fn parse_option(str_ptr: *const std::os::raw::c_char) -> Option<()> { return Some(()); } -/// Print YJIT options for `ruby --help`. +/// Print YJIT options for `ruby --help`. `width` is width of option parts, and +/// `columns` is indent width of descriptions. #[no_mangle] -pub extern "C" fn rb_yjit_show_usage(help: c_int, highlight: c_int, w: c_uint, columns: c_int) { +pub extern "C" fn rb_yjit_show_usage(help: c_int, highlight: c_int, width: c_uint, columns: c_int) { for &(name, description) in YJIT_OPTIONS.iter() { extern "C" { fn ruby_show_usage_line(name: *const c_char, secondary: *const c_char, description: *const c_char, - help: c_int, highlight: c_int, w: c_uint, columns: c_int); + help: c_int, highlight: c_int, width: c_uint, columns: c_int); } let name = CString::new(name).unwrap(); let description = CString::new(description).unwrap(); - unsafe { ruby_show_usage_line(name.as_ptr(), null(), description.as_ptr(), help, highlight, w, columns) } + unsafe { ruby_show_usage_line(name.as_ptr(), null(), description.as_ptr(), help, highlight, width, columns) } } } |