Add deprecation pragmas in lib/deprecated/pure (#19113)

This commit is contained in:
konsumlamm 2021-11-09 19:00:33 +01:00 • committed by GitHub
commit b0f4a9b845
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 7 deletions

View file

@ -1,10 +1,12 @@
#nim c -t:-march=i686 --cpu:amd64 --threads:on -d:release lockfreehash.nim
import math, hashes
#------------------------------------------------------------------------------
## Memory Utility Functions
{.deprecated.}
import math, hashes
proc newHeap*[T](): ptr T =
result = cast[ptr T](alloc0(sizeof(T)))

View file

@ -36,6 +36,8 @@
## myobj.SomeEvent.addHandler(handleevent)
## ee.emit(myobj.SomeEvent, genericargs)
{.deprecated.}
type
EventArgs* = object of RootObj ## Base object for event arguments that are passed to callback functions.
EventHandler* = tuple[name: string, handlers: seq[proc(e: EventArgs) {.closure.}]] ## An eventhandler for an event.

View file

@ -7,8 +7,9 @@
# distribution, for details about the copyright.
#
## This module is deprecated, `import os` instead.
{.deprecated: "import os.nim instead".}
## This module is deprecated, `import std/os` instead.
{.deprecated: "use `std/os` instead".}
import os
export ReadEnvEffect, WriteEnvEffect, ReadDirEffect, WriteDirEffect, OSErrorCode,

View file

@ -1,6 +1,5 @@
## This module is a deprecated alias for the `sha1` module.
{.deprecated.}
{.deprecated: "use `std/sha1` instead".}
include "../std/sha1"

View file

@ -9,6 +9,8 @@
## Shared string support for Nim.
{.deprecated.}
type
UncheckedCharArray = UncheckedArray[char]