1

Looking at Tcl_GetInt, I need this type of function for an unsigned __int64 which is unfortunately not present in tclDecls.h

tclDecls.h can be found in

Tcl8.6.5\include

Is it safe to use Tcl_GetDouble and convert it later to unsigned __int64?

Tony Tannous
  • 14,154
  • 10
  • 50
  • 86

1 Answers1

2

Use Tcl_GetWideIntFromObj to obtain a Tcl_WideInt, or better a Tcl_WideUInt. Then cast to unsigned __int64, if need be.

Is it safe to use Tcl_GetDouble and convert it later to unsigned __int64?

It depends: Safe conversion from double to unsigned 64 bit integer

mrcalvin
  • 3,291
  • 12
  • 18