@@ -58,13 +58,13 @@ pub const TCCState = opaque {
58
58
}
59
59
60
60
/// add include path
61
- pub fn add_include_path (self : * TCCState , pathname : [:0 ]const u8 ) void {
62
- tcc_add_include_path (self , pathname .ptr );
61
+ pub fn add_include_path (self : * TCCState , pathname : [:0 ]const u8 ) i32 {
62
+ return tcc_add_include_path (self , pathname .ptr );
63
63
}
64
64
65
65
/// add in system include path
66
- pub fn add_sysinclude_path (self : * TCCState , pathname : [:0 ]const u8 ) void {
67
- tcc_add_sysinclude_path (self , pathname .ptr );
66
+ pub fn add_sysinclude_path (self : * TCCState , pathname : [:0 ]const u8 ) i32 {
67
+ return tcc_add_sysinclude_path (self , pathname .ptr );
68
68
}
69
69
70
70
/// define preprocessor symbol 'sym'. value can be NULL, sym can be "sym=val"
@@ -84,7 +84,7 @@ pub const TCCState = opaque {
84
84
}
85
85
86
86
/// add multiple files (C file, dll, object, library, ld script)
87
- pub fn add_files (self : * TCCState , filenames : [][:0 ]const u8 ) ! void {
87
+ pub fn add_files (self : * TCCState , filenames : []const [:0 ]const u8 ) ! void {
88
88
for (filenames ) | filename |
89
89
try self .add_file (filename .ptr );
90
90
}
@@ -131,8 +131,7 @@ pub const TCCState = opaque {
131
131
132
132
/// do all relocations (needed before using get_symbol())
133
133
pub fn relocate (self : * TCCState ) ! void {
134
- const ret = tcc_relocate (self );
135
- if (ret == -1 )
134
+ if (tcc_relocate (self ) == -1 )
136
135
return error .RelocateError ;
137
136
}
138
137
0 commit comments