Skip to content

Commit 9f8f67e

Browse files
committed
Switch from set_allow_special_chars_in_func_names to set_special_chars_allowed_in_func_names
1 parent af31863 commit 9f8f67e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

gccjit_sys/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ pub enum gcc_jit_tls_model {
3535
#[repr(C)]
3636
pub enum gcc_jit_str_option {
3737
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,
3940
}
4041

4142
#[repr(C)]
@@ -54,7 +55,6 @@ pub enum gcc_jit_bool_option {
5455
GCC_JIT_BOOL_OPTION_DUMP_EVERYTHING,
5556
GCC_JIT_BOOL_OPTION_SELFCHECK_GC,
5657
GCC_JIT_BOOL_OPTION_KEEP_INTERMEDIATES,
57-
GCC_JIT_BOOL_OPTION_SPECIAL_CHARS_IN_FUNC_NAMES,
5858
GCC_JIT_NUM_BOOL_OPTIONS
5959
}
6060

src/context.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,10 @@ impl<'ctx> Context<'ctx> {
200200
}
201201

202202
#[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();
204205
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());
206207
}
207208
}
208209

0 commit comments

Comments
 (0)