Skip to content

Commit

Permalink
Add deprecation pragmas in lib/deprecated/pure (#19113)
Browse files Browse the repository at this point in the history
  • Loading branch information
konsumlamm authored Nov 9, 2021
1 parent 6ff6176 commit b0f4a9b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
6 changes: 4 additions & 2 deletions lib/deprecated/pure/LockFreeHash.nim
Original file line number Diff line number Diff line change
@@ -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)))

Expand Down
2 changes: 2 additions & 0 deletions lib/deprecated/pure/events.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 3 additions & 2 deletions lib/deprecated/pure/ospaths.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 2 additions & 3 deletions lib/deprecated/pure/securehash.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@


## This module is a deprecated alias for the `sha1` module.
{.deprecated.}

{.deprecated: "use `std/sha1` instead".}

include "../std/sha1"
2 changes: 2 additions & 0 deletions lib/deprecated/pure/sharedstrings.nim
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

## Shared string support for Nim.

{.deprecated.}

type
UncheckedCharArray = UncheckedArray[char]

Expand Down

0 comments on commit b0f4a9b

Please sign in to comment.