mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-28 18:24:01 +00:00
complete std prefixes for stdlib (#22887)
follow up https://github.com/nim-lang/Nim/pull/22851 follow up https://github.com/nim-lang/Nim/pull/22873
This commit is contained in:
@@ -4,9 +4,9 @@ this can eventually be moved to std/os and `walkDirRec` can be implemented in te
|
||||
to avoid duplication
|
||||
]##
|
||||
|
||||
import os
|
||||
import std/os
|
||||
when defined(windows):
|
||||
from strutils import replace
|
||||
from std/strutils import replace
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/[assertions, objectdollar]
|
||||
@@ -65,6 +65,6 @@ proc nativeToUnixPath*(path: string): string =
|
||||
result = replace(result, '\\', '/')
|
||||
|
||||
when isMainModule:
|
||||
import sugar
|
||||
import std/sugar
|
||||
for a in walkDirRecFilter(".", follow = a=>a.path.lastPathPart notin ["nimcache", ".git", "csources_v1", "csources", "bin"]):
|
||||
echo a
|
||||
|
||||
@@ -22,9 +22,9 @@ type
|
||||
when weirdTarget:
|
||||
discard
|
||||
elif defined(windows):
|
||||
import winlean, times
|
||||
import std/[winlean, times]
|
||||
elif defined(posix):
|
||||
import posix
|
||||
import std/posix
|
||||
proc c_rename(oldname, newname: cstring): cint {.
|
||||
importc: "rename", header: "<stdio.h>".}
|
||||
else:
|
||||
|
||||
@@ -16,9 +16,9 @@ when defined(nimPreviewSlimSystem):
|
||||
when weirdTarget:
|
||||
discard
|
||||
elif defined(windows):
|
||||
import winlean, times
|
||||
import std/[winlean, times]
|
||||
elif defined(posix):
|
||||
import posix, times
|
||||
import std/[posix, times]
|
||||
|
||||
else:
|
||||
{.error: "OS module not ported to your operating system!".}
|
||||
|
||||
@@ -15,9 +15,9 @@ when defined(nimPreviewSlimSystem):
|
||||
when weirdTarget:
|
||||
discard
|
||||
elif defined(windows):
|
||||
import winlean
|
||||
import std/winlean
|
||||
elif defined(posix):
|
||||
import posix, times
|
||||
import std/[posix, times]
|
||||
|
||||
proc toTime(ts: Timespec): times.Time {.inline.} =
|
||||
result = initTime(ts.tv_sec.int64, ts.tv_nsec.int)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
include system/inclrtl
|
||||
import std/private/since
|
||||
|
||||
import strutils, pathnorm
|
||||
import std/[strutils, pathnorm]
|
||||
import std/oserrors
|
||||
|
||||
import oscommon
|
||||
@@ -17,9 +17,9 @@ const weirdTarget = defined(nimscript) or defined(js)
|
||||
when weirdTarget:
|
||||
discard
|
||||
elif defined(windows):
|
||||
import winlean
|
||||
import std/winlean
|
||||
elif defined(posix):
|
||||
import posix, system/ansi_c
|
||||
import std/posix, system/ansi_c
|
||||
else:
|
||||
{.error: "OS module not ported to your operating system!".}
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ when defined(nimPreviewSlimSystem):
|
||||
when weirdTarget:
|
||||
discard
|
||||
elif defined(windows):
|
||||
import winlean, times
|
||||
import std/[winlean, times]
|
||||
elif defined(posix):
|
||||
import posix
|
||||
import std/posix
|
||||
else:
|
||||
{.error: "OS module not ported to your operating system!".}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
## This is an internal helper module. Do not use.
|
||||
|
||||
import macros
|
||||
import std/macros
|
||||
|
||||
proc underscoredCalls*(result, calls, arg0: NimNode)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user