diff --git a/lib/core/locks.nim b/lib/core/locks.nim index f9add0037..d6d579ba0 100644 --- a/lib/core/locks.nim +++ b/lib/core/locks.nim @@ -17,8 +17,6 @@ type ## or not is unspecified! Cond* = SysCond ## Nim condition variable -{.deprecated: [TLock: Lock, TCond: Cond].} - {.push stackTrace: off.} proc initLock*(lock: var Lock) {.inline.} = diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 2508a889e..d74d86bf6 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -418,8 +418,6 @@ type ## if not ambiguous (this cannot be achieved with ## any other means in the language currently) -{.deprecated: [TBindSymRule: BindSymRule].} - proc bindSym*(ident: string | NimNode, rule: BindSymRule = brClosed): NimNode {. magic: "NBindSym", noSideEffect.} ## creates a node that binds `ident` to a symbol node. The bound symbol diff --git a/lib/core/typeinfo.nim b/lib/core/typeinfo.nim index c78752360..14613c50d 100644 --- a/lib/core/typeinfo.nim +++ b/lib/core/typeinfo.nim @@ -83,8 +83,6 @@ when not defined(js): template `rawType=`(x: var Any, p: PNimType) = x.rawTypePtr = cast[pointer](p) -{.deprecated: [TAny: Any, TAnyKind: AnyKind].} - when defined(gogc): const GenericSeqSize = (3 * sizeof(int)) else: diff --git a/lib/deprecated/pure/actors.nim b/lib/deprecated/pure/actors.nim index 451668825..77c67a3e4 100644 --- a/lib/deprecated/pure/actors.nim +++ b/lib/deprecated/pure/actors.nim @@ -111,7 +111,6 @@ type actors: seq[PActor[In, Out]] when Out isnot void: outputs: Channel[Out] -{.deprecated: [TActorPool: ActorPool].} proc `^`*[T](f: ptr Channel[T]): T = ## alias for 'recv'. diff --git a/lib/deprecated/pure/asyncio.nim b/lib/deprecated/pure/asyncio.nim index 39d77230a..2dd08024d 100644 --- a/lib/deprecated/pure/asyncio.nim +++ b/lib/deprecated/pure/asyncio.nim @@ -147,11 +147,6 @@ type SockIdle, SockConnecting, SockConnected, SockListening, SockClosed, SockUDPBound -{.deprecated: [TDelegate: DelegateObj, PDelegate: Delegate, - TInfo: SocketStatus, PAsyncSocket: AsyncSocket, TAsyncSocket: AsyncSocketObj, - TDispatcher: DispatcherObj, PDispatcher: Dispatcher, - ].} - proc newDelegate*(): Delegate = ## Creates a new delegate. diff --git a/lib/deprecated/pure/ftpclient.nim b/lib/deprecated/pure/ftpclient.nim index 7645258b6..d70f9556a 100644 --- a/lib/deprecated/pure/ftpclient.nim +++ b/lib/deprecated/pure/ftpclient.nim @@ -108,11 +108,6 @@ type ReplyError* = object of IOError FTPError* = object of IOError -{.deprecated: [ - TFTPClient: FTPClientObj, TFTPJob: FTPJob, PAsyncFTPClient: AsyncFTPClient, - TAsyncFTPClient: AsyncFTPClientObj, TFTPEvent: FTPEvent, - EInvalidReply: ReplyError, EFTP: FTPError -].} const multiLineLimit = 10000 diff --git a/lib/deprecated/pure/parseurl.nim b/lib/deprecated/pure/parseurl.nim index 6d58e8a73..b19f6dc85 100644 --- a/lib/deprecated/pure/parseurl.nim +++ b/lib/deprecated/pure/parseurl.nim @@ -22,8 +22,6 @@ type scheme, username, password, hostname, port, path, query, anchor: string] -{.deprecated: [TUrl: Url].} - proc parseUrl*(url: string): Url {.deprecated.} = var i = 0 diff --git a/lib/deprecated/pure/sockets.nim b/lib/deprecated/pure/sockets.nim index 34881607f..f78df0b2b 100644 --- a/lib/deprecated/pure/sockets.nim +++ b/lib/deprecated/pure/sockets.nim @@ -70,9 +70,6 @@ when defined(ssl): SSLAcceptResult* = enum AcceptNoClient = 0, AcceptNoHandshake, AcceptSuccess - {.deprecated: [ESSL: SSLError, TSSLCVerifyMode: SSLCVerifyMode, - TSSLProtVersion: SSLProtVersion, PSSLContext: SSLContext, - TSSLAcceptResult: SSLAcceptResult].} const BufferSize*: int = 4000 ## size of a buffered socket's buffer @@ -147,12 +144,6 @@ type TimeoutError* = object of Exception -{.deprecated: [TSocket: Socket, TType: SockType, TPort: Port, TDomain: Domain, - TProtocol: Protocol, TServent: Servent, THostent: Hostent, - TSOBool: SOBool, TRecvLineResult: RecvLineResult, - TReadLineResult: ReadLineResult, ETimeout: TimeoutError, - TSocketImpl: SocketImpl].} - when defined(booting): let invalidSocket*: Socket = nil ## invalid socket else: diff --git a/lib/impure/db_mysql.nim b/lib/impure/db_mysql.nim index 26bc7d0ad..2fcb56202 100644 --- a/lib/impure/db_mysql.nim +++ b/lib/impure/db_mysql.nim @@ -96,7 +96,6 @@ type ## column text on demand row: cstringArray len: int -{.deprecated: [TRow: Row, TDbConn: DbConn].} proc dbError*(db: DbConn) {.noreturn.} = ## raises a DbError exception. diff --git a/lib/impure/db_odbc.nim b/lib/impure/db_odbc.nim index 224bcbb50..72d7aa800 100644 --- a/lib/impure/db_odbc.nim +++ b/lib/impure/db_odbc.nim @@ -101,8 +101,6 @@ type ## used to get a row's ## column text on demand -{.deprecated: [TRow: Row, TSqlQuery: SqlQuery, TDbConn: DbConn].} - var buf: array[0..4096, char] diff --git a/lib/impure/db_postgres.nim b/lib/impure/db_postgres.nim index e765cc197..800673ca0 100644 --- a/lib/impure/db_postgres.nim +++ b/lib/impure/db_postgres.nim @@ -76,7 +76,6 @@ type res: PPGresult ## used to get a row's line: int ## column text on demand SqlPrepared* = distinct string ## a identifier for the prepared queries -{.deprecated: [TRow: Row, TDbConn: DbConn, TSqlPrepared: SqlPrepared].} proc dbError*(db: DbConn) {.noreturn.} = ## raises a DbError exception. diff --git a/lib/impure/db_sqlite.nim b/lib/impure/db_sqlite.nim index 52a168096..c7e373098 100644 --- a/lib/impure/db_sqlite.nim +++ b/lib/impure/db_sqlite.nim @@ -94,7 +94,6 @@ type ## converted to nil. InstantRow* = Pstmt ## a handle that can be used to get a row's column ## text on demand -{.deprecated: [TRow: Row, TDbConn: DbConn].} proc dbError*(db: DbConn) {.noreturn.} = ## raises a DbError exception. diff --git a/lib/impure/ssl.nim b/lib/impure/ssl.nim index 5b0e899f6..0bcb3f217 100644 --- a/lib/impure/ssl.nim +++ b/lib/impure/ssl.nim @@ -21,7 +21,6 @@ type SecureSocket* = object ssl: SslPtr bio: BIO -{.deprecated: [TSecureSocket: SecureSocket].} proc connect*(sock: var SecureSocket, address: string, port: int): int = diff --git a/lib/posix/inotify.nim b/lib/posix/inotify.nim index 359e88617..f88e48a2d 100644 --- a/lib/posix/inotify.nim +++ b/lib/posix/inotify.nim @@ -19,7 +19,6 @@ type cookie*{.importc: "cookie".}: uint32 # Cookie to synchronize two events. len*{.importc: "len".}: uint32 # Length (including NULs) of name. name*{.importc: "name".}: char # Name. -{.deprecated: [Tinotify_event: InotifyEvent].} # Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. const diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim index fa589e905..0c66aa2b9 100644 --- a/lib/posix/posix.nim +++ b/lib/posix/posix.nim @@ -100,7 +100,6 @@ else: include posix_other # There used to be this name in posix.nim a long time ago, not sure why! -{.deprecated: [cSIG_HOLD: SIG_HOLD].} when StatHasNanoseconds: proc st_atime*(s: Stat): Time {.inline.} = diff --git a/lib/posix/posix_linux_amd64.nim b/lib/posix/posix_linux_amd64.nim index 6e69409ea..f37ddfa37 100644 --- a/lib/posix/posix_linux_amd64.nim +++ b/lib/posix/posix_linux_amd64.nim @@ -27,13 +27,10 @@ type DIR* {.importc: "DIR", header: "", incompleteStruct.} = object ## A type representing a directory stream. -{.deprecated: [TDIR: DIR].} type SocketHandle* = distinct cint # The type used to represent socket descriptors -{.deprecated: [TSocketHandle: SocketHandle].} - # not detected by detect.nim, guarded by #ifdef __USE_UNIX98 in glibc const SIG_HOLD* = cast[SigHandler](2) @@ -375,29 +372,6 @@ type ## context is active. # todo fpregds_mem -{.deprecated: [TOff: Off, TPid: Pid, TGid: Gid, TMode: Mode, TDev: Dev, - TNlink: Nlink, TStack: Stack, TGroup: Group, TMqd: Mqd, - TPasswd: Passwd, TClock: Clock, TClockId: ClockId, TKey: Key, - TSem: Sem, Tpthread_attr: PthreadAttr, Ttimespec: Timespec, - Tdirent: Dirent, TGlob: Glob, - # Tflock: Flock, # Naming conflict if we drop the `T` - Ticonv: Iconv, Tlconv: Lconv, TMqAttr: MqAttr, Tblkcnt: Blkcnt, - Tblksize: Blksize, Tfsblkcnt: Fsblkcnt, Tfsfilcnt: Fsfilcnt, - Tid: Id, Tino: Ino, Tpthread_barrier: Pthread_barrier, - Tpthread_barrierattr: Pthread_barrierattr, Tpthread_cond: Pthread_cond, - TPthread_condattr: Pthread_condattr, Tpthread_key: Pthread_key, - Tpthread_mutex: Pthread_mutex, Tpthread_mutexattr: Pthread_mutexattr, - Tpthread_once: Pthread_once, Tpthread_rwlock: Pthread_rwlock, - Tpthread_rwlockattr: Pthread_rwlockattr, Tpthread_spinlock: Pthread_spinlock, - Tpthread: Pthread, Tsuseconds: Suseconds, Ttimer: Timer, - Tuid: Uid, Tuseconds: Useconds, Tutsname: Utsname, Tipc_perm: Ipc_perm, - TStat: Stat, TStatvfs: Statvfs, - Ttm: Tm, titimerspec: Itimerspec, Tsig_atomic: Sig_atomic, Tsigset: Sigset, - TsigEvent: SigEvent, TsigVal: SigVal, TSigaction: Sigaction, - TSigStack: SigStack, TsigInfo: SigInfo, Tnl_item: Nl_item, - Tnl_catd: Nl_catd, Tsched_param: Sched_param, - # TFdSet: FdSet, # Naming conflict if we drop the `T` - Tmcontext: Mcontext, Tucontext: Ucontext].} type Taiocb* {.importc: "struct aiocb", header: "", final, pure.} = object ## struct aiocb @@ -587,13 +561,6 @@ type Tnfds* {.importc: "nfds_t", header: "".} = culong -{.deprecated: [TSockaddr_in: Sockaddr_in, TAddrinfo: AddrInfo, - TSockAddr: SockAddr, TSockLen: SockLen, TTimeval: Timeval, - Tsockaddr_storage: Sockaddr_storage, Tsockaddr_in6: Sockaddr_in6, - Thostent: Hostent, TServent: Servent, - TInAddr: InAddr, TIOVec: IOVec, TInPort: InPort, TInAddrT: InAddrT, - TIn6Addr: In6Addr, TInAddrScalar: InAddrScalar, TProtoent: Protoent].} - var errno* {.importc, header: "".}: cint ## error variable h_errno* {.importc, header: "".}: cint diff --git a/lib/posix/posix_other.nim b/lib/posix/posix_other.nim index ba1dd89ed..261550d96 100644 --- a/lib/posix/posix_other.nim +++ b/lib/posix/posix_other.nim @@ -26,13 +26,10 @@ type DIR* {.importc: "DIR", header: "", incompleteStruct.} = object ## A type representing a directory stream. -{.deprecated: [TDIR: DIR].} type SocketHandle* = distinct cint # The type used to represent socket descriptors -{.deprecated: [TSocketHandle: SocketHandle].} - type Time* {.importc: "time_t", header: "".} = distinct clong @@ -356,31 +353,7 @@ type uc_stack*: Stack ## The stack used by this context. uc_mcontext*: Mcontext ## A machine-specific representation of the saved ## context. -{.deprecated: [TOff: Off, TPid: Pid, TGid: Gid, TMode: Mode, TDev: Dev, - TNlink: Nlink, TStack: Stack, TGroup: Group, TMqd: Mqd, - TPasswd: Passwd, TClock: Clock, TClockId: ClockId, TKey: Key, - TSem: Sem, Tpthread_attr: PthreadAttr, Ttimespec: Timespec, - Tdirent: Dirent, TFTW: FTW, TGlob: Glob, - # Tflock: Flock, # Naming conflict if we drop the `T` - Ticonv: Iconv, Tlconv: Lconv, TMqAttr: MqAttr, Tblkcnt: Blkcnt, - Tblksize: Blksize, Tfsblkcnt: Fsblkcnt, Tfsfilcnt: Fsfilcnt, - Tid: Id, Tino: Ino, Tpthread_barrier: Pthread_barrier, - Tpthread_barrierattr: Pthread_barrierattr, Tpthread_cond: Pthread_cond, - TPthread_condattr: Pthread_condattr, Tpthread_key: Pthread_key, - Tpthread_mutex: Pthread_mutex, Tpthread_mutexattr: Pthread_mutexattr, - Tpthread_once: Pthread_once, Tpthread_rwlock: Pthread_rwlock, - Tpthread_rwlockattr: Pthread_rwlockattr, Tpthread_spinlock: Pthread_spinlock, - Tpthread: Pthread, Tsuseconds: Suseconds, Ttimer: Timer, - Ttrace_attr: Trace_attr, Ttrace_event_id: Trace_event_id, - Ttrace_event_set: Trace_event_set, Ttrace_id: Trace_id, - Tuid: Uid, Tuseconds: Useconds, Tutsname: Utsname, Tipc_perm: Ipc_perm, - TStat: Stat, TStatvfs: Statvfs, Tposix_typed_mem_info: Posix_typed_mem_info, - Ttm: Tm, titimerspec: Itimerspec, Tsig_atomic: Sig_atomic, Tsigset: Sigset, - TsigEvent: SigEvent, TsigVal: SigVal, TSigaction: Sigaction, - TSigStack: SigStack, TsigInfo: SigInfo, Tnl_item: Nl_item, - Tnl_catd: Nl_catd, Tsched_param: Sched_param, - # TFdSet: FdSet, # Naming conflict if we drop the `T` - Tmcontext: Mcontext, Tucontext: Ucontext].} + when hasAioH: type Taiocb* {.importc: "struct aiocb", header: "", @@ -553,13 +526,6 @@ type Tnfds* {.importc: "nfds_t", header: "".} = cint -{.deprecated: [TSockaddr_in: Sockaddr_in, TAddrinfo: AddrInfo, - TSockAddr: SockAddr, TSockLen: SockLen, TTimeval: Timeval, - Tsockaddr_storage: Sockaddr_storage, Tsockaddr_in6: Sockaddr_in6, - Thostent: Hostent, TServent: Servent, - TInAddr: InAddr, TIOVec: IOVec, TInPort: InPort, TInAddrT: InAddrT, - TIn6Addr: In6Addr, TInAddrScalar: InAddrScalar, TProtoent: Protoent].} - var errno* {.importc, header: "".}: cint ## error variable h_errno* {.importc, header: "".}: cint diff --git a/lib/posix/termios.nim b/lib/posix/termios.nim index c08de7342..34bb47f93 100644 --- a/lib/posix/termios.nim +++ b/lib/posix/termios.nim @@ -13,7 +13,6 @@ import posix type Speed* = cuint Cflag* = cuint -{.deprecated: [Tcflag: Cflag].} const NCCS* = when defined(macosx): 20 else: 32 diff --git a/lib/pure/asyncdispatch.nim b/lib/pure/asyncdispatch.nim index 443c65f26..aef4f1ce6 100644 --- a/lib/pure/asyncdispatch.nim +++ b/lib/pure/asyncdispatch.nim @@ -244,8 +244,6 @@ when defined(windows) or defined(nimdoc): AsyncEvent* = ptr AsyncEventImpl Callback = proc (fd: AsyncFD): bool {.closure,gcsafe.} - {.deprecated: [TCompletionKey: CompletionKey, TAsyncFD: AsyncFD, - TCustomOverlapped: CustomOverlapped, TCompletionData: CompletionData].} proc hash(x: AsyncFD): Hash {.borrow.} proc `==`*(x: AsyncFD, y: AsyncFD): bool {.borrow.} @@ -1080,7 +1078,6 @@ else: PDispatcher* = ref object of PDispatcherBase selector: Selector[AsyncData] - {.deprecated: [TAsyncFD: AsyncFD, TCallback: Callback].} proc `==`*(x, y: AsyncFD): bool {.borrow.} proc `==`*(x, y: AsyncEvent): bool {.borrow.} diff --git a/lib/pure/collections/LockFreeHash.nim b/lib/pure/collections/LockFreeHash.nim index 954d62491..28fa2a81b 100644 --- a/lib/pure/collections/LockFreeHash.nim +++ b/lib/pure/collections/LockFreeHash.nim @@ -49,13 +49,11 @@ when sizeof(int) == 4: # 32bit Raw = range[0..1073741823] ## The range of uint values that can be stored directly in a value slot ## when on a 32 bit platform - {.deprecated: [TRaw: Raw].} elif sizeof(int) == 8: # 64bit type Raw = range[0'i64..4611686018427387903'i64] ## The range of uint values that can be stored directly in a value slot ## when on a 64 bit platform - {.deprecated: [TRaw: Raw].} else: {.error: "unsupported platform".} @@ -74,7 +72,6 @@ type copyDone: int next: PConcTable[K,V] data: EntryArr -{.deprecated: [TEntry: Entry, TEntryArr: EntryArr].} proc setVal[K,V](table: var PConcTable[K,V], key: int, val: int, expVal: int, match: bool): int @@ -544,7 +541,6 @@ when not defined(testing) and isMainModule: Data = tuple[k: string,v: TestObj] PDataArr = array[0..numTests-1, Data] Dict = PConcTable[string,TestObj] - {.deprecated: [TTestObj: TestObj, TData: Data].} var thr: array[0..numThreads-1, Thread[Dict]] diff --git a/lib/pure/collections/critbits.nim b/lib/pure/collections/critbits.nim index c94e08098..32e0299ba 100644 --- a/lib/pure/collections/critbits.nim +++ b/lib/pure/collections/critbits.nim @@ -33,8 +33,6 @@ type root: Node[T] count: int -{.deprecated: [TCritBitTree: CritBitTree].} - proc len*[T](c: CritBitTree[T]): int = ## returns the number of elements in `c` in O(1). result = c.count diff --git a/lib/pure/collections/intsets.nim b/lib/pure/collections/intsets.nim index 545958977..def96b8f7 100644 --- a/lib/pure/collections/intsets.nim +++ b/lib/pure/collections/intsets.nim @@ -44,8 +44,6 @@ type data: TrunkSeq a: array[0..33, int] # profiling shows that 34 elements are enough -{.deprecated: [TIntSet: IntSet, TTrunk: Trunk, TTrunkSeq: TrunkSeq].} - proc mustRehash(length, counter: int): bool {.inline.} = assert(length > counter) result = (length * 2 < counter * 3) or (length - counter < 4) diff --git a/lib/pure/collections/lists.nim b/lib/pure/collections/lists.nim index e69acc8d9..0b3708a7c 100644 --- a/lib/pure/collections/lists.nim +++ b/lib/pure/collections/lists.nim @@ -45,15 +45,6 @@ type SomeLinkedNode*[T] = SinglyLinkedNode[T] | DoublyLinkedNode[T] -{.deprecated: [TDoublyLinkedNode: DoublyLinkedNodeObj, - PDoublyLinkedNode: DoublyLinkedNode, - TSinglyLinkedNode: SinglyLinkedNodeObj, - PSinglyLinkedNode: SinglyLinkedNode, - TDoublyLinkedList: DoublyLinkedList, - TSinglyLinkedRing: SinglyLinkedRing, - TDoublyLinkedRing: DoublyLinkedRing, - TSinglyLinkedList: SinglyLinkedList].} - proc initSinglyLinkedList*[T](): SinglyLinkedList[T] = ## creates a new singly linked list that is empty. discard diff --git a/lib/pure/collections/queues.nim b/lib/pure/collections/queues.nim index ce792d6da..9a1d169fb 100644 --- a/lib/pure/collections/queues.nim +++ b/lib/pure/collections/queues.nim @@ -46,8 +46,6 @@ type data: seq[T] rd, wr, count, mask: int -{.deprecated: [TQueue: Queue].} - proc initQueue*[T](initialSize: int = 4): Queue[T] = ## Create a new queue. ## Optionally, the initial capacity can be reserved via `initialSize` as a diff --git a/lib/pure/collections/sets.nim b/lib/pure/collections/sets.nim index 7355aae02..1273cbc33 100644 --- a/lib/pure/collections/sets.nim +++ b/lib/pure/collections/sets.nim @@ -39,8 +39,6 @@ type data: KeyValuePairSeq[A] counter: int -{.deprecated: [TSet: HashSet].} - template default[T](t: typedesc[T]): T = ## Used by clear methods to get a default value. var v: T @@ -631,8 +629,6 @@ type data: OrderedKeyValuePairSeq[A] counter, first, last: int -{.deprecated: [TOrderedSet: OrderedSet].} - proc clear*[A](s: var OrderedSet[A]) = ## Clears the OrderedSet back to an empty state, without shrinking ## any of the existing storage. O(n) where n is the size of the hash bucket. diff --git a/lib/pure/collections/tables.nim b/lib/pure/collections/tables.nim index 9fdae33ed..f46a368b1 100644 --- a/lib/pure/collections/tables.nim +++ b/lib/pure/collections/tables.nim @@ -125,8 +125,6 @@ type counter: int TableRef*[A,B] = ref Table[A, B] -{.deprecated: [TTable: Table, PTable: TableRef].} - template maxHash(t): untyped = high(t.data) template dataLen(t): untyped = len(t.data) @@ -520,8 +518,6 @@ type counter, first, last: int OrderedTableRef*[A, B] = ref OrderedTable[A, B] -{.deprecated: [TOrderedTable: OrderedTable, POrderedTable: OrderedTableRef].} - proc len*[A, B](t: OrderedTable[A, B]): int {.inline.} = ## returns the number of keys in ``t``. result = t.counter @@ -795,7 +791,7 @@ proc getOrDefault*[A, B](t: OrderedTableRef[A, B], key: A): B = getOrDefault(t[], key) proc getOrDefault*[A, B](t: OrderedTableRef[A, B], key: A, default: B): B = - ## retrieves the value at ``t[key]`` iff ``key`` is in ``t``. Otherwise, + ## retrieves the value at ``t[key]`` iff ``key`` is in ``t``. Otherwise, ## ``default`` is returned. getOrDefault(t[], key, default) @@ -892,8 +888,6 @@ type counter: int CountTableRef*[A] = ref CountTable[A] -{.deprecated: [TCountTable: CountTable, PCountTable: CountTableRef].} - proc len*[A](t: CountTable[A]): int = ## returns the number of keys in ``t``. result = t.counter diff --git a/lib/pure/encodings.nim b/lib/pure/encodings.nim index 96f030c9b..e09b00221 100644 --- a/lib/pure/encodings.nim +++ b/lib/pure/encodings.nim @@ -213,7 +213,6 @@ when defined(windows): maxCharSize: int32 defaultChar: array[0..1, char] leadByte: array[0..12-1, char] - {.deprecated: [TCpInfo: CpInfo].} proc getCPInfo(codePage: CodePage, lpCPInfo: var CpInfo): int32 {. stdcall, importc: "GetCPInfo", dynlib: "kernel32".} diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim index e4614bd0f..841985605 100644 --- a/lib/pure/httpclient.nim +++ b/lib/pure/httpclient.nim @@ -848,8 +848,6 @@ proc newHttpClient*(userAgent = defUserAgent, type AsyncHttpClient* = HttpClientBase[AsyncSocket] -{.deprecated: [PAsyncHttpClient: AsyncHttpClient].} - proc newAsyncHttpClient*(userAgent = defUserAgent, maxRedirects = 5, sslContext = getDefaultSSL(), proxy: Proxy = nil): AsyncHttpClient = @@ -1163,7 +1161,7 @@ proc requestAux(client: HttpClient | AsyncHttpClient, url: string, {.multisync.} = # Helper that actually makes the request. Does not handle redirects. let requestUrl = parseUri(url) - + if requestUrl.scheme == "": raise newException(ValueError, "No uri scheme supplied.") diff --git a/lib/pure/parsesql.nim b/lib/pure/parsesql.nim index 4b841b9e1..20f02e815 100644 --- a/lib/pure/parsesql.nim +++ b/lib/pure/parsesql.nim @@ -566,9 +566,6 @@ type SqlParser* = object of SqlLexer ## SQL parser object tok: Token -{.deprecated: [EInvalidSql: SqlParseError, PSqlNode: SqlNode, - TSqlNode: SqlNodeObj, TSqlParser: SqlParser, TSqlNodeKind: SqlNodeKind].} - proc newNode*(k: SqlNodeKind): SqlNode = new(result) result.kind = k diff --git a/lib/pure/pegs.nim b/lib/pure/pegs.nim index 3909d18f8..957091918 100644 --- a/lib/pure/pegs.nim +++ b/lib/pure/pegs.nim @@ -90,19 +90,19 @@ proc kind*(p: Peg): PegKind = p.kind ## Returns the *PegKind* of a given *Peg* object. proc term*(p: Peg): string = p.term - ## Returns the *string* representation of a given *Peg* variant object + ## Returns the *string* representation of a given *Peg* variant object ## where present. proc ch*(p: Peg): char = p.ch - ## Returns the *char* representation of a given *Peg* variant object + ## Returns the *char* representation of a given *Peg* variant object ## where present. proc charChoice*(p: Peg): ref set[char] = p.charChoice - ## Returns the *charChoice* field of a given *Peg* variant object + ## Returns the *charChoice* field of a given *Peg* variant object ## where present. proc nt*(p: Peg): NonTerminal = p.nt - ## Returns the *NonTerminal* object of a given *Peg* variant object + ## Returns the *NonTerminal* object of a given *Peg* variant object ## where present. proc index*(p: Peg): range[0..MaxSubpatterns] = p.index @@ -137,7 +137,7 @@ proc flags*(nt: NonTerminal): set[NonTerminalFlag] = nt.flags proc rule*(nt: NonTerminal): Peg = nt.rule ## Gets the *Peg* object representing the rule definition of the parent *Peg* - ## object variant of a given *NonTerminal*. + ## object variant of a given *NonTerminal*. proc term*(t: string): Peg {.nosideEffect, rtl, extern: "npegs$1Str".} = ## constructs a PEG from a terminal string @@ -553,8 +553,6 @@ type ml: int origStart: int -{.deprecated: [TCaptures: Captures].} - proc bounds*(c: Captures, i: range[0..MaxSubpatterns-1]): tuple[first, last: int] = ## returns the bounds ``[first..last]`` of the `i`'th capture. @@ -885,7 +883,7 @@ proc rawMatch*(s: string, p: Peg, start: int, c: var Captures): int macro mkHandlerTplts(handlers: untyped): untyped = # Transforms the handler spec in *handlers* into handler templates. # The AST structure of *handlers[0]*: - # + # # .. code-block:: # StmtList # Call @@ -1009,7 +1007,7 @@ template eventParser*(pegAst, handlers: untyped): (proc(s: string): int) = ## echo opStack ## ## let pLen = parseArithExpr(txt) - ## + ## ## The *handlers* parameter consists of code blocks for *PegKinds*, ## which define the grammar elements of interest. Each block can contain ## handler code to be executed when the parser enters and leaves text diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index c2a502731..4d0fe800e 100644 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -1987,8 +1987,6 @@ type ffDecimal, ## use decimal floating point notation ffScientific ## use scientific notation (using ``e`` character) -{.deprecated: [TFloatFormat: FloatFormatMode].} - proc formatBiggestFloat*(f: BiggestFloat, format: FloatFormatMode = ffDefault, precision: range[-1..32] = 16; decimalSep = '.'): string {. diff --git a/lib/pure/subexes.nim b/lib/pure/subexes.nim index 8149c72cc..d103af710 100644 --- a/lib/pure/subexes.nim +++ b/lib/pure/subexes.nim @@ -300,8 +300,6 @@ proc scanDollar(p: var FormatParser, a: openarray[string], s: var string) = type Subex* = distinct string ## string that contains a substitution expression -{.deprecated: [TSubex: Subex].} - proc subex*(s: string): Subex = ## constructs a *substitution expression* from `s`. Currently this performs ## no syntax checking but this may change in later versions. diff --git a/lib/pure/terminal.nim b/lib/pure/terminal.nim index 974dc839d..35dc2483c 100644 --- a/lib/pure/terminal.nim +++ b/lib/pure/terminal.nim @@ -481,9 +481,6 @@ type styleHidden, ## hidden text styleStrikethrough ## strikethrough -{.deprecated: [TStyle: Style].} -{.deprecated: [styleUnknown: styleItalic].} - when not defined(windows): var gFG {.threadvar.}: int @@ -556,9 +553,6 @@ type bg8Bit, ## 256-color (not supported, see ``enableTrueColors`` instead.) bgDefault ## default terminal background color -{.deprecated: [TForegroundColor: ForegroundColor, - TBackgroundColor: BackgroundColor].} - when defined(windows): var defaultForegroundColor, defaultBackgroundColor: int16 = 0xFFFF'i16 # Default to an invalid value 0xFFFF diff --git a/lib/pure/times.nim b/lib/pure/times.nim index ae412eaf0..b8f76276a 100644 --- a/lib/pure/times.nim +++ b/lib/pure/times.nim @@ -298,9 +298,6 @@ type TimeIntervalParts* = array[TimeUnit, int] # Array of Duration parts starts TimesMutableTypes = DateTime | Time | Duration | TimeInterval -{.deprecated: [TMonth: Month, TWeekDay: WeekDay, TTime: Time, - TTimeInterval: TimeInterval, TTimeInfo: DateTime, TimeInfo: DateTime].} - const secondsInMin = 60 secondsInHour = 60*60 diff --git a/lib/pure/unicode.nim b/lib/pure/unicode.nim index ec3cb9899..e16c185d4 100644 --- a/lib/pure/unicode.nim +++ b/lib/pure/unicode.nim @@ -18,8 +18,6 @@ type Rune* = distinct RuneImpl ## type that can hold any Unicode character Rune16* = distinct int16 ## 16 bit Unicode character -{.deprecated: [TRune: Rune, TRune16: Rune16].} - proc `<=%`*(a, b: Rune): bool = return int(a) <=% int(b) proc `<%`*(a, b: Rune): bool = return int(a) <% int(b) proc `==`*(a, b: Rune): bool = return int(a) == int(b) diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim index 757bf4745..837072be2 100644 --- a/lib/pure/unittest.nim +++ b/lib/pure/unittest.nim @@ -145,8 +145,6 @@ type testStartTime: float testStackTrace: string -{.deprecated: [TTestStatus: TestStatus, TOutputLevel: OutputLevel]} - var abortOnError* {.threadvar.}: bool ## Set to true in order to quit ## immediately on fail. Default is false, diff --git a/lib/system.nim b/lib/system.nim index 06d8a9921..ace3f5e38 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -106,8 +106,6 @@ type SomeNumber* = SomeInteger|SomeFloat ## type class matching all number types -{.deprecated: [SomeReal: SomeFloat].} - proc defined*(x: untyped): bool {.magic: "Defined", noSideEffect, compileTime.} ## Special compile-time procedure that checks whether `x` is ## defined. @@ -4039,8 +4037,6 @@ type NimNode* {.magic: "PNimrodNode".} = ref NimNodeObj ## represents a Nim AST node. Macros operate on this type. -{.deprecated: [PNimrodNode: NimNode].} - when false: template eval*(blk: typed): typed = ## executes a block of code at compile time just as if it was a macro diff --git a/lib/system/atomics.nim b/lib/system/atomics.nim index 56ebde823..b41b4009a 100644 --- a/lib/system/atomics.nim +++ b/lib/system/atomics.nim @@ -40,7 +40,6 @@ when someGcc and hasThreadSupport: type AtomType* = SomeNumber|pointer|ptr|char|bool ## Type Class representing valid types for use with atomic procs - {.deprecated: [TAtomType: AtomType].} proc atomicLoadN*[T: AtomType](p: ptr T, mem: AtomMemModel): T {. importc: "__atomic_load_n", nodecl.} diff --git a/lib/system/cellsets.nim b/lib/system/cellsets.nim index f26cb86ab..d56de06bb 100644 --- a/lib/system/cellsets.nim +++ b/lib/system/cellsets.nim @@ -39,8 +39,7 @@ type CellSeq {.final, pure.} = object len, cap: int d: PCellArray -{.deprecated: [TCell: Cell, TBitIndex: BitIndex, TPageDesc: PageDesc, - TRefCount: RefCount, TCellSet: CellSet, TCellSeq: CellSeq].} + # ------------------- cell seq handling --------------------------------------- proc contains(s: CellSeq, c: PCell): bool {.inline.} = diff --git a/lib/system/debugger.nim b/lib/system/debugger.nim index 937c0d6f0..fd0ae2399 100644 --- a/lib/system/debugger.nim +++ b/lib/system/debugger.nim @@ -23,7 +23,6 @@ type # except for the global data description. f: TFrame slots: array[0..10_000, VarSlot] -{.deprecated: [TVarSlot: VarSlot, TExtendedFrame: ExtendedFrame].} var dbgGlobalData: ExtendedFrame # this reserves much space, but @@ -156,7 +155,6 @@ type address: pointer typ: PNimType oldValue: Hash -{.deprecated: [THash: Hash, TWatchpoint: Watchpoint].} var watchpoints: array[0..99, Watchpoint] diff --git a/lib/system/endb.nim b/lib/system/endb.nim index d51ae29df..257ee3fea 100644 --- a/lib/system/endb.nim +++ b/lib/system/endb.nim @@ -35,8 +35,6 @@ type dbSkipCurrent, dbQuiting, # debugger wants to quit dbBreakpoints # debugger is only interested in breakpoints -{.deprecated: [TStaticStr: StaticStr, TBreakpointFilename: BreakpointFilename, - TDbgState: DbgState].} var dbgUser: StaticStr # buffer for user input; first command is ``step_into`` diff --git a/lib/system/mmdisp.nim b/lib/system/mmdisp.nim index 9a7af0a28..683e84f7d 100644 --- a/lib/system/mmdisp.nim +++ b/lib/system/mmdisp.nim @@ -37,7 +37,6 @@ type ByteArray = UncheckedArray[byte] PByte = ptr ByteArray PString = ptr string -{.deprecated: [TByteArray: ByteArray].} # Page size of the system; in most cases 4096 bytes. For exotic OS or # CPU this needs to be changed: diff --git a/lib/system/profiler.nim b/lib/system/profiler.nim index 7146500d9..ffd6fd0c5 100644 --- a/lib/system/profiler.nim +++ b/lib/system/profiler.nim @@ -23,7 +23,6 @@ type lines*: array[0..MaxTraceLen-1, cstring] files*: array[0..MaxTraceLen-1, cstring] ProfilerHook* = proc (st: StackTrace) {.nimcall.} -{.deprecated: [TStackTrace: StackTrace, TProfilerHook: ProfilerHook].} proc `[]`*(st: StackTrace, i: int): cstring = st.lines[i] diff --git a/lib/system/repr.nim b/lib/system/repr.nim index ce7c349bd..ff8f92404 100644 --- a/lib/system/repr.nim +++ b/lib/system/repr.nim @@ -127,7 +127,6 @@ type marked: CellSet recdepth: int # do not recurse endlessly indent: int # indentation -{.deprecated: [TReprClosure: ReprClosure].} when not defined(useNimRtl): proc initReprClosure(cl: var ReprClosure) = diff --git a/lib/system/sets.nim b/lib/system/sets.nim index 53d222468..a5f6c5de9 100644 --- a/lib/system/sets.nim +++ b/lib/system/sets.nim @@ -11,7 +11,6 @@ type NimSet = array[0..4*2048-1, uint8] -{.deprecated: [TNimSet: NimSet].} proc countBits32(n: int32): int {.compilerproc.} = var v = n diff --git a/lib/system/syslocks.nim b/lib/system/syslocks.nim index 6569f4f9f..fa4164b95 100644 --- a/lib/system/syslocks.nim +++ b/lib/system/syslocks.nim @@ -26,8 +26,6 @@ when defined(Windows): SysCond = Handle - {.deprecated: [THandle: Handle, TSysLock: SysLock, TSysCond: SysCond].} - proc initSysLock(L: var SysLock) {.importc: "InitializeCriticalSection", header: "".} ## Initializes the lock `L`. diff --git a/lib/system/threads.nim b/lib/system/threads.nim index aaf0164fd..f89de4376 100644 --- a/lib/system/threads.nim +++ b/lib/system/threads.nim @@ -57,7 +57,6 @@ when defined(windows): type SysThread* = Handle WinThreadProc = proc (x: pointer): int32 {.stdcall.} - {.deprecated: [TSysThread: SysThread].} proc createThread(lpThreadAttributes: pointer, dwStackSize: int32, lpStartAddress: WinThreadProc, @@ -198,8 +197,6 @@ else: Timespec {.importc: "struct timespec", header: "".} = object tv_sec: Time tv_nsec: clong - {.deprecated: [TSysThread: SysThread, Tpthread_attr: PThreadAttr, - Ttimespec: Timespec, TThreadVarSlot: ThreadVarSlot].} proc pthread_attr_init(a1: var PthreadAttr) {. importc, header: pthreadh.} @@ -277,7 +274,6 @@ type stackSize: int else: nil -{.deprecated: [TThreadLocalStorage: ThreadLocalStorage, TGcThread: GcThread].} when not defined(useNimRtl): when not useStackMaskHack: @@ -382,8 +378,6 @@ type dataFn: proc (m: TArg) {.nimcall, gcsafe.} data: TArg -{.deprecated: [TThread: Thread].} - var threadDestructionHandlers {.rtlThreadVar.}: seq[proc () {.closure, gcsafe.}] diff --git a/lib/system/timers.nim b/lib/system/timers.nim index f2ebad2c1..dd8350e2d 100644 --- a/lib/system/timers.nim +++ b/lib/system/timers.nim @@ -13,7 +13,6 @@ type Ticks = distinct int64 Nanos = int64 -{.deprecated: [TTicks: Ticks, TNanos: Nanos].} when defined(windows): @@ -38,7 +37,6 @@ elif defined(macosx): importc: "mach_timebase_info_data_t", header: "".} = object numer, denom: int32 - {.deprecated: [TMachTimebaseInfoData: MachTimebaseInfoData].} proc mach_absolute_time(): int64 {.importc, header: "".} proc mach_timebase_info(info: var MachTimebaseInfoData) {.importc, @@ -61,7 +59,6 @@ elif defined(posixRealtime): final, pure.} = object ## struct timespec tv_sec: int ## Seconds. tv_nsec: int ## Nanoseconds. - {.deprecated: [TClockid: Clockid, TTimeSpec: TimeSpec].} var CLOCK_REALTIME {.importc: "CLOCK_REALTIME", header: "".}: Clockid @@ -89,7 +86,7 @@ else: final, pure.} = object ## struct timeval tv_sec: Time ## Seconds. tv_usec: clong ## Microseconds. - {.deprecated: [Ttimeval: Timeval].} + proc posix_gettimeofday(tp: var Timeval, unused: pointer = nil) {. importc: "gettimeofday", header: "".} diff --git a/lib/windows/winlean.nim b/lib/windows/winlean.nim index 73c222790..3e37b824c 100644 --- a/lib/windows/winlean.nim +++ b/lib/windows/winlean.nim @@ -22,10 +22,8 @@ const when useWinUnicode: type WinChar* = Utf16Char - {.deprecated: [TWinChar: WinChar].} else: type WinChar* = char - {.deprecated: [TWinChar: WinChar].} type Handle* = int @@ -96,10 +94,6 @@ type dwPlatformId*: DWORD szCSDVersion*: array[0..127, WinChar] -{.deprecated: [THandle: Handle, TSECURITY_ATTRIBUTES: SECURITY_ATTRIBUTES, - TSTARTUPINFO: STARTUPINFO, TPROCESS_INFORMATION: PROCESS_INFORMATION, - TFILETIME: FILETIME, TBY_HANDLE_FILE_INFORMATION: BY_HANDLE_FILE_INFORMATION].} - const STARTF_USESHOWWINDOW* = 1'i32 STARTF_USESTDHANDLES* = 256'i32 @@ -327,7 +321,6 @@ type dwReserved1: int32 cFileName*: array[0..(MAX_PATH) - 1, WinChar] cAlternateFileName*: array[0..13, WinChar] -{.deprecated: [TWIN32_FIND_DATA: WIN32_FIND_DATA].} when useWinUnicode: proc findFirstFileW*(lpFileName: WideCString, @@ -453,7 +446,6 @@ proc wsaGetLastError*(): cint {.importc: "WSAGetLastError", dynlib: ws2dll.} type SocketHandle* = distinct int -{.deprecated: [TSocketHandle: SocketHandle].} type WSAData* {.importc: "WSADATA", header: "winsock2.h".} = object @@ -538,11 +530,6 @@ type ai_next*: ptr AddrInfo ## Pointer to next in list. SockLen* = cuint -{.deprecated: [TSockaddr_in: Sockaddr_in, TAddrinfo: AddrInfo, - TSockAddr: SockAddr, TSockLen: SockLen, TTimeval: Timeval, - TWSADATA: WSADATA, Thostent: Hostent, TServent: Servent, - TInAddr: InAddr, Tin6_addr: In6_addr, Tsockaddr_in6: Sockaddr_in6, - Tsockaddr_in6_old: Sockaddr_in6_old].} var @@ -668,7 +655,6 @@ const type WOHandleArray* = array[0..MAXIMUM_WAIT_OBJECTS - 1, Handle] PWOHandleArray* = ptr WOHandleArray -{.deprecated: [TWOHandleArray: WOHandleArray].} proc waitForMultipleObjects*(nCount: DWORD, lpHandles: PWOHandleArray, bWaitAll: WINBOOL, dwMilliseconds: DWORD): DWORD{. @@ -798,7 +784,6 @@ type D2*: int16 D3*: int16 D4*: array[0..7, int8] -{.deprecated: [TOVERLAPPED: OVERLAPPED, TGUID: GUID].} const ERROR_IO_PENDING* = 997 # a.k.a WSA_IO_PENDING diff --git a/lib/wrappers/odbcsql.nim b/lib/wrappers/odbcsql.nim index 43d1c504d..3b022290b 100644 --- a/lib/wrappers/odbcsql.nim +++ b/lib/wrappers/odbcsql.nim @@ -60,17 +60,6 @@ type PSQLDOUBLE* = ptr TSqlDouble PSQLFLOAT* = ptr TSqlFloat PSQLHANDLE* = ptr SqlHandle -{.deprecated: [ - # TSqlChar: TSqlChar, # Name conflict if we drop`T` - # TSqlSmallInt: TSqlSmallInt, # Name conflict if we drop`T` - TSqlUSmallInt: SqlUSmallInt, TSqlHandle: SqlHandle, TSqlHEnv: SqlHEnv, - TSqlHDBC: SqlHDBC, TSqlHStmt: SqlHStmt, TSqlHDesc: SqlHDesc, - # TSqlInteger: TSqlInteger, # Name conflict if we drop `T` - TSqlUInteger: SqlUInteger, TSqlPointer: SqlPointer, - # TSqlReal: TSqlReal, # Name conflict if we drop`T` - # TSqlDouble: TSqlDouble, # Name conflict if we drop`T` - # TSqlFloat: TSqlFloat, # Name conflict if we drop `T` - TSqlHWND: SqlHWND].} const # SQL data type codes SQL_UNKNOWN_TYPE* = 0 diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim index ff05d8aca..2f072d5c7 100644 --- a/lib/wrappers/openssl.nim +++ b/lib/wrappers/openssl.nim @@ -83,8 +83,6 @@ type pem_password_cb* = proc(buf: cstring, size, rwflag: cint, userdata: pointer): cint {.cdecl.} -{.deprecated: [PSSL: SslPtr, PSSL_CTX: SslCtx, PBIO: BIO].} - const SSL_SENT_SHUTDOWN* = 1 SSL_RECEIVED_SHUTDOWN* = 2 diff --git a/lib/wrappers/pcre.nim b/lib/wrappers/pcre.nim index e9e11960c..c4bb24cfd 100644 --- a/lib/wrappers/pcre.nim +++ b/lib/wrappers/pcre.nim @@ -466,14 +466,6 @@ proc study*(code: ptr Pcre, {.pop.} -{.deprecated: [MAJOR: PCRE_MAJOR, MINOR: PCRE_MINOR, - PRERELEASE: PCRE_PRERELEASE, DATE: PCRE_DATE].} - -{.deprecated: [TPcre: Pcre, TJitStack: JitStack].} type PPcre* {.deprecated.} = ptr Pcre PJitStack* {.deprecated.} = ptr JitStack - -{.deprecated: [TExtra: ExtraData].} -{.deprecated: [TCalloutBlock: CalloutBlock].} -{.deprecated: [TJitCallback: JitCallback].} diff --git a/lib/wrappers/postgres.nim b/lib/wrappers/postgres.nim index 7cb816f68..f38712c0e 100644 --- a/lib/wrappers/postgres.nim +++ b/lib/wrappers/postgres.nim @@ -152,10 +152,6 @@ type length*: int32 isint*: int32 p*: pointer -{.deprecated: [TSockAddr: SockAddr, TPGresAttDesc: PgresAttDesc, - TPGresAttValue: PgresAttValue, TExecStatusType: ExecStatusType, - TPGlobjfuncs: Pglobjfuncs, TConnStatusType: ConnStatusType, TPGconn: Pgconn, - TPGresult: PGresult].} proc pqconnectStart*(conninfo: cstring): PPGconn{.cdecl, dynlib: dllName, importc: "PQconnectStart".} diff --git a/lib/wrappers/sqlite3.nim b/lib/wrappers/sqlite3.nim index 0276a0a65..e4bf2e67b 100644 --- a/lib/wrappers/sqlite3.nim +++ b/lib/wrappers/sqlite3.nim @@ -121,12 +121,6 @@ type para4: int32, para5: pointer): int32{.cdecl.} Collation_needed_func* = proc (para1: pointer, para2: PSqlite3, eTextRep: int32, para4: cstring){.cdecl.} -{.deprecated: [TSqlite3: Sqlite3, TContext: Context, Tvalue: Value, - Tcallback: Callback, Tcreate_function_step_func: Create_function_step_func, - Tcreate_function_func_func: Create_function_func_func, - Tcreate_function_final_func: Create_function_final_func, - Tresult_func: Result_func, Tcreate_collation_func: Create_collation_func, - Tcollation_needed_func: Collation_needed_func].} const SQLITE_STATIC* = nil diff --git a/lib/wrappers/tinyc.nim b/lib/wrappers/tinyc.nim index f2ce92d36..f29758f13 100644 --- a/lib/wrappers/tinyc.nim +++ b/lib/wrappers/tinyc.nim @@ -12,7 +12,6 @@ type PccState* = ptr CcState ErrorFunc* = proc (opaque: pointer, msg: cstring) {.cdecl.} -{.deprecated: [TccState: CcState, TErrorFunc: ErrorFunc].} proc openCCState*(): PccState {.importc: "tcc_new", cdecl.} ## create a new TCC compilation context diff --git a/tests/manyloc/keineschweine/dependencies/genpacket/genpacket_enet.nim b/tests/manyloc/keineschweine/dependencies/genpacket/genpacket_enet.nim index 3fb4dc7d9..dccbe61ba 100644 --- a/tests/manyloc/keineschweine/dependencies/genpacket/genpacket_enet.nim +++ b/tests/manyloc/keineschweine/dependencies/genpacket/genpacket_enet.nim @@ -2,7 +2,7 @@ import macros, macro_dsl, estreams from strutils import format template newLenName() = - let lenName {.inject.} = ^("len"& $lenNames) + let lenName {.inject.} = ^("len" & $lenNames) inc(lenNames) template defPacketImports*() {.dirty.} = @@ -18,7 +18,7 @@ macro defPacket*(typeNameN: untyped, typeFields: untyped): untyped = var constructorParams = newNimNode(nnkFormalParams).und(typeName) constructor = newNimNode(nnkProcDef).und( - postfix(^("new"& $typeName.ident), "*"), + postfix(^("new" & $typeName.ident), "*"), emptyNode(), emptyNode(), constructorParams, @@ -41,7 +41,7 @@ macro defPacket*(typeNameN: untyped, typeFields: untyped): untyped = emptyNode(), emptyNode()) read = newNimNode(nnkProcDef).und( - newIdentNode("read"& $typeName.ident).postfix("*"), + newIdentNode("read" & $typeName.ident).postfix("*"), emptyNode(), emptyNode(), newNimNode(nnkFormalParams).und( @@ -70,7 +70,7 @@ macro defPacket*(typeNameN: untyped, typeFields: untyped): untyped = let item = ^"item" ## item name in our iterators seqType = typeFields[i][1][1] ## type of seq - readName = newIdentNode("read"& $seqType.ident) + readName = newIdentNode("read" & $seqType.ident) readBody.add(newNimNode(nnkLetSection).und( newNimNode(nnkIdentDefs).und( lenName, @@ -100,7 +100,7 @@ macro defPacket*(typeNameN: untyped, typeFields: untyped): untyped = #set the default value to @[] (new sequence) typeFields[i][2] = "@".prefix(newNimNode(nnkBracket)) else: - error("Unknown type: "& treeRepr(typeFields[i])) + error("Unknown type: " & treeRepr(typeFields[i])) of nnkIdent: ##normal type case $typeFields[i][1].ident of "string": # length encoded string @@ -109,12 +109,12 @@ macro defPacket*(typeNameN: untyped, typeFields: untyped): untyped = of "int8", "int16", "int32", "float32", "float64", "char", "bool": packBody.add(newCall( "writeBE", streamID, dotName)) - readBody.add(resName := newCall("read"& $typeFields[i][1].ident, streamID)) + readBody.add(resName := newCall("read" & $typeFields[i][1].ident, streamID)) else: ## hopefully the type you specified was another defpacket() type packBody.add(newCall("pack", streamID, dotName)) - readBody.add(resName := newCall("read"& $typeFields[i][1].ident, streamID)) + readBody.add(resName := newCall("read" & $typeFields[i][1].ident, streamID)) else: - error("I dont know what to do with: "& treerepr(typeFields[i])) + error("I dont know what to do with: " & treerepr(typeFields[i])) var toStringFunc = newNimNode(nnkProcDef).und( @@ -137,7 +137,7 @@ macro defPacket*(typeNameN: untyped, typeFields: untyped): untyped = newNimNode(nnkCall).und(# [6][0][1] ^"format", ## format emptyNode())))) ## "[TypeName $1 $2]" - formatStr = "["& $typeName.ident + formatStr = "[" & $typeName.ident const emptyFields = {nnkEmpty, nnkNilLit} var objFields = newNimNode(nnkRecList) @@ -206,7 +206,7 @@ macro forwardPacket*(typeName: untyped, underlyingType: untyped): untyped = streamID = ^"s" result = newNimNode(nnkStmtList).und( newProc( - (^("read"& $typeName.ident)).postfix("*"), + (^("read" & $typeName.ident)).postfix("*"), [ iddefs("s", "PBuffer", newNimNode(nnkNilLit)) ], typeName), newProc( diff --git a/tests/manyloc/keineschweine/enet_server/enet_client.nim b/tests/manyloc/keineschweine/enet_server/enet_client.nim index ac600c0af..7b8576a14 100644 --- a/tests/manyloc/keineschweine/enet_server/enet_client.nim +++ b/tests/manyloc/keineschweine/enet_server/enet_client.nim @@ -217,7 +217,7 @@ proc lobbyUpdate*(dt: float) = gui.update(dt) i = (i + 1) mod 60 if i == 0: - fpsText.setString("FPS: "& ff(1.0/dt)) + fpsText.setString("FPS: " & ff(1.0/dt)) proc lobbyDraw*(window: PRenderWindow) = window.clear(Black) diff --git a/tests/manyloc/keineschweine/keineschweine.nim b/tests/manyloc/keineschweine/keineschweine.nim index 59347ee46..04fec2788 100644 --- a/tests/manyloc/keineschweine/keineschweine.nim +++ b/tests/manyloc/keineschweine/keineschweine.nim @@ -230,7 +230,7 @@ proc explode*(b: PLiveBullet) = proc bulletUpdate(body: PBody, gravity: TVector, damping, dt: CpFloat){.cdecl.} = body.UpdateVelocity(gravity, damping, dt) -template getPhysical() {.immediate.} = +template getPhysical() {.dirty.} = result.body = space.addBody(newBody( record.physics.mass, record.physics.moment)) @@ -281,7 +281,7 @@ proc draw*(window: PRenderWindow; b: PLiveBullet) {.inline.} = proc free*(veh: PVehicle) = - ("Destroying vehicle "& veh.record.name).echo + ("Destroying vehicle " & veh.record.name).echo destroy(veh.sprite) if veh.shape.isNil: "Free'd vehicle's shape was NIL!".echo else: space.removeShape(veh.shape) @@ -290,12 +290,12 @@ proc free*(veh: PVehicle) = veh.body.free() veh.shape.free() veh.sprite = nil - veh.body = nil + veh.body = nil veh.shape = nil proc newVehicle*(record: PVehicleRecord): PVehicle = - echo("Creating "& record.name) + echo("Creating " & record.name) new(result, free) result.record = record result.sprite = result.record.anim.spriteSheet.sprite.copy() diff --git a/tests/manyloc/keineschweine/lib/client_helpers.nim b/tests/manyloc/keineschweine/lib/client_helpers.nim index 5f819a7d1..0ebb4ade1 100644 --- a/tests/manyloc/keineschweine/lib/client_helpers.nim +++ b/tests/manyloc/keineschweine/lib/client_helpers.nim @@ -8,7 +8,7 @@ type addy: enet.TAddress host*: PHost peer*: PPeer - handlers*: TTable[char, TScPktHandler] + handlers*: Table[char, TScPktHandler] TScPktHandler* = proc(serv: PServer; buffer: PBuffer) TFileTransfer = object fileName: string diff --git a/tests/manyloc/keineschweine/lib/sg_assets.nim b/tests/manyloc/keineschweine/lib/sg_assets.nim index 90f0a54e9..7caa9c3fb 100644 --- a/tests/manyloc/keineschweine/lib/sg_assets.nim +++ b/tests/manyloc/keineschweine/lib/sg_assets.nim @@ -222,7 +222,7 @@ template cacheImpl(procName, cacheName, resultType, body: untyped) {.dirty.} = template checkFile(path: untyped) {.dirty.} = if not existsFile(path): - errors.add("File missing: "& path) + errors.add("File missing: " & path) cacheImpl newSprite, SpriteSheets, PSpriteSheet: result.file = filename @@ -231,7 +231,7 @@ cacheImpl newSprite, SpriteSheets, PSpriteSheet: result.frameh = strutils.parseInt(matches[1]) checkFile("data/gfx"/result.file) else: - errors.add "Bad file: "&filename&" must be in format name_WxH.png" + errors.add "Bad file: " & filename & " must be in format name_WxH.png" return cacheImpl newSound, SoundCache, PSoundRecord: @@ -314,10 +314,10 @@ proc validateSettings*(settings: JsonNode, errors: var seq[string]): bool = else: var id = 0 for i in items.items: - if i.kind != JArray: errors.add("Item #$1 is not an array"% $id) + if i.kind != JArray: errors.add("Item #$1 is not an array" % $id) elif i.len != 3: errors.add("($1) Item record should have 3 fields"%($id)) elif i[0].kind != JString or i[1].kind != JString or i[2].kind != JObject: - errors.add("($1) Item should be in form [name, type, {item: data}]"% $id) + errors.add("($1) Item should be in form [name, type, {item: data}]" % $id) result = false inc id @@ -332,10 +332,10 @@ proc loadSettings*(rawJson: string, errors: var seq[string]): bool = try: settings = parseJson(rawJson) except JsonParsingError: - errors.add("JSON parsing error: "& getCurrentExceptionMsg()) + errors.add("JSON parsing error: " & getCurrentExceptionMsg()) return except: - errors.add("Unknown exception: "& getCurrentExceptionMsg()) + errors.add("Unknown exception: " & getCurrentExceptionMsg()) return if not validateSettings(settings, errors): return @@ -378,7 +378,7 @@ proc loadSettings*(rawJson: string, errors: var seq[string]): bool = inc vID if itm.kind == Projectile: if itm.bullet.isNil: - errors.add("Projectile #$1 has no bullet!"% $vID) + errors.add("Projectile #$1 has no bullet!" % $vID) elif itm.bullet.id == -1: ## this item has an anonymous bullet, fix the ID and name itm.bullet.id = bID diff --git a/tests/manyloc/keineschweine/lib/sg_gui.nim b/tests/manyloc/keineschweine/lib/sg_gui.nim index 074e0604c..83ad0d1bf 100644 --- a/tests/manyloc/keineschweine/lib/sg_gui.nim +++ b/tests/manyloc/keineschweine/lib/sg_gui.nim @@ -260,7 +260,7 @@ proc update*(m: PMessageArea) = m.texts.add messageProto.copy() elif m.texts.len > m.sizeVisible: echo "cutting ", m.texts.len - m.sizeVisible, " fields" - for i in m.sizeVisible.. < m.texts.len: + for i in m.sizeVisible ..< m.texts.len: m.texts.pop().destroy() let nmsgs = m.messages.len() if m.sizeVisible == 0 or nmsgs == 0: diff --git a/tests/manyloc/keineschweine/lib/vehicles.nim b/tests/manyloc/keineschweine/lib/vehicles.nim index e245c9e8c..2c6e54d2b 100644 --- a/tests/manyloc/keineschweine/lib/vehicles.nim +++ b/tests/manyloc/keineschweine/lib/vehicles.nim @@ -23,7 +23,7 @@ proc strafe_left*(obj: PVehicle, dt: float) = VectorZero) proc strafe_right*(obj: PVehicle, dt: float) = obj.body.applyImpulse( - vectorForAngle(obj.body.getAngle()).rperp()* obj.record.handling.strafe * dt, + vectorForAngle(obj.body.getAngle()).rperp() * obj.record.handling.strafe * dt, VectorZero) proc turn_right*(obj: PVehicle, dt: float) = #obj.angle = (obj.angle + (obj.record.handling.rotation.float / 10.0 * dt)) mod TAU diff --git a/tests/misc/tlastmod.nim b/tests/misc/tlastmod.nim index 538b5e656..c622ab518 100644 --- a/tests/misc/tlastmod.nim +++ b/tests/misc/tlastmod.nim @@ -5,7 +5,7 @@ import proc main() = var - a, b: TTime + a, b: Time a = getLastModificationTime(paramStr(1)) b = getLastModificationTime(paramStr(2)) writeLine(stdout, $a) diff --git a/tests/stdlib/tlists.nim b/tests/stdlib/tlists.nim index 37e73c53f..b7c7f9f5a 100644 --- a/tests/stdlib/tlists.nim +++ b/tests/stdlib/tlists.nim @@ -8,14 +8,14 @@ const data = [1, 2, 3, 4, 5, 6] block SinglyLinkedListTest1: - var L: TSinglyLinkedList[int] + var L: SinglyLinkedList[int] for d in items(data): L.prepend(d) assert($L == "[6, 5, 4, 3, 2, 1]") assert(4 in L) block SinglyLinkedListTest2: - var L: TSinglyLinkedList[string] + var L: SinglyLinkedList[string] for d in items(data): L.prepend($d) assert($L == """["6", "5", "4", "3", "2", "1"]""") @@ -23,7 +23,7 @@ block SinglyLinkedListTest2: block DoublyLinkedListTest1: - var L: TDoublyLinkedList[int] + var L: DoublyLinkedList[int] for d in items(data): L.prepend(d) for d in items(data): L.append(d) L.remove(L.find(1)) @@ -32,7 +32,7 @@ block DoublyLinkedListTest1: assert(4 in L) block SinglyLinkedRingTest1: - var L: TSinglyLinkedRing[int] + var L: SinglyLinkedRing[int] L.prepend(4) assert($L == "[4]") L.prepend(4) @@ -42,7 +42,7 @@ block SinglyLinkedRingTest1: block DoublyLinkedRingTest1: - var L: TDoublyLinkedRing[int] + var L: DoublyLinkedRing[int] L.prepend(4) assert($L == "[4]") L.prepend(4)