mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
macos fix
This commit is contained in:
@@ -1217,9 +1217,7 @@ fn extend_module_platform_specific(vm: &VirtualMachine, module: PyObjectRef) ->
|
||||
"ttyname" => ctx.new_rustfunc(os_ttyname),
|
||||
"SEEK_SET" => ctx.new_int(Whence::SeekSet as i8),
|
||||
"SEEK_CUR" => ctx.new_int(Whence::SeekCur as i8),
|
||||
"SEEK_END" => ctx.new_int(Whence::SeekEnd as i8),
|
||||
"SEEK_DATA" => ctx.new_int(Whence::SeekData as i8),
|
||||
"SEEK_HOLE" => ctx.new_int(Whence::SeekHole as i8)
|
||||
"SEEK_END" => ctx.new_int(Whence::SeekEnd as i8)
|
||||
});
|
||||
|
||||
#[cfg(not(target_os = "redox"))]
|
||||
@@ -1231,6 +1229,12 @@ fn extend_module_platform_specific(vm: &VirtualMachine, module: PyObjectRef) ->
|
||||
"openpty" => ctx.new_rustfunc(os_openpty),
|
||||
});
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
extend_module!(vm, module, {
|
||||
"SEEK_DATA" => ctx.new_int(Whence::SeekData as i8),
|
||||
"SEEK_HOLE" => ctx.new_int(Whence::SeekHole as i8)
|
||||
});
|
||||
|
||||
module
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user