This repository was archived by the owner on Nov 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed
Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,12 @@ const HEADERS: &[&str] = &[
33 "string.h" ,
44 "bytes.h" ,
55 "source_line.h" ,
6+ "decoded_input.h" ,
67 "loc.h" ,
78 "token_ids.h" ,
89 "token.h" ,
910 "comment.h" ,
1011 "magic_comment.h" ,
11- "decoded_input.h" ,
1212 "nodes.h" ,
1313 "messages.h" ,
1414 "diagnostic.h" ,
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ typedef struct LIB_RUBY_PARSER_Diagnostic
4242 Return owned NULL-terminated string.
4343*/
4444char * LIB_RUBY_PARSER_render_diagnostic (
45- LIB_RUBY_PARSER_Diagnostic * diagnostic ,
46- LIB_RUBY_PARSER_DecodedInput * input );
45+ const LIB_RUBY_PARSER_Diagnostic * diagnostic ,
46+ const LIB_RUBY_PARSER_DecodedInput * input );
4747
4848/*
4949 Diagnostic destructor.
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ pub extern "C" fn LIB_RUBY_PARSER_drop_diagnostic_list(diagnostic_list: *mut Vec
4242
4343#[ no_mangle]
4444pub extern "C" fn LIB_RUBY_PARSER_render_diagnostic (
45- diagnostic : * mut Diagnostic ,
46- input : * mut DecodedInput ,
45+ diagnostic : * const Diagnostic ,
46+ input : * const DecodedInput ,
4747) -> * mut i8 {
4848 let diagnostic = unsafe { diagnostic. as_ref ( ) . unwrap ( ) } ;
4949 let input = unsafe { input. as_ref ( ) . unwrap ( ) } ;
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ pub extern "C" fn lib_ruby_parser__test__make_token_eq(
3030}
3131
3232#[ no_mangle]
33- pub extern "C" fn LIB_RUBY_PARSER_token_name ( token : * mut Token ) -> * mut i8 {
33+ pub extern "C" fn LIB_RUBY_PARSER_token_name ( token : * const Token ) -> * mut i8 {
3434 let token = unsafe { token. as_ref ( ) . unwrap ( ) } ;
3535 let token_name = token. token_name ( ) ;
3636 std:: ffi:: CString :: new ( token_name) . unwrap ( ) . into_raw ( )
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ typedef struct LIB_RUBY_PARSER_Token
1919/*
2020 Returns token name (like "kDEF") for a given token.
2121*/
22- char * LIB_RUBY_PARSER_token_name (LIB_RUBY_PARSER_Token * token );
22+ char * LIB_RUBY_PARSER_token_name (const LIB_RUBY_PARSER_Token * token );
2323/*
2424 Token destructor.
2525 Just like Rust/C++ destructor it performs cleanup of "embedded" resources.
You can’t perform that action at this time.
0 commit comments