Trim remaining expr/stmt from stdlib (#6742)
This commit is contained in:
parent
7f4248dc0c
commit
0ab373115c
9 changed files with 16 additions and 16 deletions
|
|
@ -87,10 +87,10 @@ proc newSharedString*(s: string): SharedString =
|
|||
result.len = len
|
||||
|
||||
when declared(atomicLoadN):
|
||||
template load(x): expr = atomicLoadN(addr x, ATOMIC_SEQ_CST)
|
||||
template load(x): untyped = atomicLoadN(addr x, ATOMIC_SEQ_CST)
|
||||
else:
|
||||
# XXX Fixme
|
||||
template load(x): expr = x
|
||||
template load(x): untyped = x
|
||||
|
||||
proc add*(s: var SharedString; t: cstring; len: Natural) =
|
||||
if len == 0: return
|
||||
|
|
|
|||
|
|
@ -841,7 +841,7 @@ elif not defined(useNimRtl):
|
|||
var attr: Tposix_spawnattr
|
||||
var fops: Tposix_spawn_file_actions
|
||||
|
||||
template chck(e: expr) =
|
||||
template chck(e: untyped) =
|
||||
if e != 0'i32: raiseOSError(osLastError())
|
||||
|
||||
chck posix_spawn_file_actions_init(fops)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ proc name*(t: typedesc): string {.magic: "TypeTrait".}
|
|||
##
|
||||
## proc `$`*(T: typedesc): string = name(T)
|
||||
##
|
||||
## template test(x): stmt =
|
||||
## template test(x): typed =
|
||||
## echo "type: ", type(x), ", value: ", x
|
||||
##
|
||||
## test 42
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue