mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 09:54:49 +00:00
added $ for oids
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
#
|
||||
# Nimrod's Runtime Library
|
||||
# (c) Copyright 2012 Andreas Rumpf
|
||||
# (c) Copyright 2013 Andreas Rumpf
|
||||
#
|
||||
# See the file "copying.txt", included in this
|
||||
# distribution, for details about the copyright.
|
||||
@@ -52,6 +52,10 @@ proc oidToString*(oid: TOid, str: cstring) =
|
||||
inc(i)
|
||||
str[24] = '\0'
|
||||
|
||||
proc `$`*(oid: TOid): string =
|
||||
result = newString(25)
|
||||
oidToString(oid, result)
|
||||
|
||||
var
|
||||
incr: int
|
||||
fuzz: int32
|
||||
|
||||
Reference in New Issue
Block a user