move widestrs out of system (#20462)
* move widestrs out of system * fix osproc
This commit is contained in:
parent
cbd9fee22a
commit
0b1650576c
29 changed files with 64 additions and 8 deletions
|
|
@ -2,6 +2,8 @@ discard """
|
|||
matrix: "--gc:refc; --gc:arc"
|
||||
"""
|
||||
|
||||
import std/widestrs
|
||||
|
||||
# bug #19862
|
||||
type NewString = object
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ q(a)
|
|||
|
||||
# bug #914
|
||||
when defined(windows):
|
||||
import std/widestrs
|
||||
var x = newWideCString("Hello")
|
||||
|
||||
echo "success"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,15 @@ discard """
|
|||
when defined(linux):
|
||||
import linenoise
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/[
|
||||
assertions,
|
||||
formatfloat,
|
||||
objectdollar,
|
||||
syncio,
|
||||
widestrs,
|
||||
]
|
||||
|
||||
import
|
||||
algorithm,
|
||||
asyncdispatch,
|
||||
|
|
|
|||
|
|
@ -4,6 +4,11 @@ discard """
|
|||
|
||||
{.warning[UnusedImport]: off.}
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/[
|
||||
syncio, assertions, formatfloat, objectdollar, widestrs
|
||||
]
|
||||
|
||||
import std/[
|
||||
# Core:
|
||||
bitops, typetraits, lenientops, macros, volatile, typeinfo,
|
||||
|
|
|
|||
|
|
@ -3,5 +3,7 @@ discard """
|
|||
output: "Test"
|
||||
"""
|
||||
|
||||
import std/widestrs
|
||||
|
||||
let ws = newWideCString("Test")
|
||||
echo ws
|
||||
echo ws
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ template main =
|
|||
main()
|
||||
|
||||
when defined(windows):
|
||||
import std/widestrs
|
||||
proc c_wgetenv(env: WideCString): WideCString {.importc: "_wgetenv", header: "<stdlib.h>".}
|
||||
proc c_getenv(env: cstring): cstring {.importc: "getenv", header: "<stdlib.h>".}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ static: main()
|
|||
main()
|
||||
|
||||
when defined(windows):
|
||||
import std/widestrs
|
||||
proc c_wgetenv(env: WideCString): WideCString {.importc: "_wgetenv", header: "<stdlib.h>".}
|
||||
proc c_getenv(env: cstring): cstring {.importc: "getenv", header: "<stdlib.h>".}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import std/[syncio, assertions]
|
|||
when not defined(windows):
|
||||
echo "OK"
|
||||
else:
|
||||
import std/widestrs
|
||||
{.push gcsafe.}
|
||||
|
||||
const CP_UTF8 = 65001'i32
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@
|
|||
from stdtest/specialpaths import buildDir
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/syncio
|
||||
import std/[
|
||||
syncio, assertions, formatfloat, objectdollar, widestrs
|
||||
]
|
||||
|
||||
import std/[
|
||||
# Core:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue