File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ pub enum gcc_jit_tls_model {
35
35
#[ repr( C ) ]
36
36
pub enum gcc_jit_str_option {
37
37
GCC_JIT_STR_OPTION_PROGNAME ,
38
- GCC_JIT_NUM_STR_OPTIONS
38
+ GCC_JIT_STR_OPTION_SPECIAL_CHARS_IN_FUNC_NAMES ,
39
+ GCC_JIT_NUM_STR_OPTIONS ,
39
40
}
40
41
41
42
#[ repr( C ) ]
@@ -54,7 +55,6 @@ pub enum gcc_jit_bool_option {
54
55
GCC_JIT_BOOL_OPTION_DUMP_EVERYTHING ,
55
56
GCC_JIT_BOOL_OPTION_SELFCHECK_GC ,
56
57
GCC_JIT_BOOL_OPTION_KEEP_INTERMEDIATES ,
57
- GCC_JIT_BOOL_OPTION_SPECIAL_CHARS_IN_FUNC_NAMES ,
58
58
GCC_JIT_NUM_BOOL_OPTIONS
59
59
}
60
60
Original file line number Diff line number Diff line change @@ -200,9 +200,10 @@ impl<'ctx> Context<'ctx> {
200
200
}
201
201
202
202
#[ cfg( feature="master" ) ]
203
- pub fn set_allow_special_chars_in_func_names ( & self , value : bool ) {
203
+ pub fn set_special_chars_allowed_in_func_names ( & self , value : & str ) {
204
+ let c_str = CString :: new ( value) . unwrap ( ) ;
204
205
unsafe {
205
- gccjit_sys:: gcc_jit_context_set_bool_option ( self . ptr , GCC_JIT_BOOL_OPTION_SPECIAL_CHARS_IN_FUNC_NAMES , value as i32 ) ;
206
+ gccjit_sys:: gcc_jit_context_set_str_option ( self . ptr , GCC_JIT_STR_OPTION_SPECIAL_CHARS_IN_FUNC_NAMES , c_str . as_ptr ( ) ) ;
206
207
}
207
208
}
208
209
You can’t perform that action at this time.
0 commit comments