Skip to content

Commit 4625dcc

Browse files
committed
fix(Lib/stat): stat.S_IMODE not compile for Mode
1 parent 2025f40 commit 4625dcc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/pylib/Lib/stat_impl/isX.nim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ makeSIsFuncTemplate(PORT)
2020
makeSIsFuncTemplate(WHT)
2121

2222

23+
proc S_IMODE*(omode: Mode): int =
24+
int(omode and S_IMODE_val)
2325
proc S_IMODE*(omode: int): int =
24-
let mode = int_AsMode_t(omode)
25-
int(mode and S_IMODE_val)
26+
S_IMODE(int_AsMode_t(omode))
2627

2728
# const stat_S_IMODE_doc = "Return the portion of the file's mode that can be set by os.chmod()."
2829

0 commit comments

Comments
 (0)