~ehmry/nim-tkrzw

368fdb0d2ff92ac276ecd374fca61bccf736c3fa — Emery Hemingway 2 years ago 17c134d
Pointer cast for idiot language
2 files changed, 2 insertions(+), 2 deletions(-)

M src/tkrzw.nim
M tkrzw.nimble
M src/tkrzw.nim => src/tkrzw.nim +1 -1
@@ 66,7 66,7 @@ proc `$`(cpp: CppString): string =

type CppStringView {.importcpp: "std::string_view".} = object
proc toStringView(s: pointer; count: int): CppStringView {.
  importcpp: "std::string_view(@)", constructor.}
  importcpp: "std::string_view(static_cast<const char *>(#), #)", constructor.}
proc toStringView(s: string): CppStringView {.inline.} =
  if s.len == 0: toStringView(nil, 0)
  else: toStringView(unsafeAddr s[0], s.len)

M tkrzw.nimble => tkrzw.nimble +1 -1
@@ 1,6 1,6 @@
# Package

version = "20220830"
version = "20220910"
author        = "Emery Hemingway"
description   = "Wrapper of the Tkrzw key-value database library"
license       = "Apache-2.0"