Celtoys / Remotery

Single C file, Realtime CPU/GPU Profiler with Remote Web Viewer
Apache License 2.0
3.03k stars 255 forks source link

GetInt64 and GetUInt64 return float64 #235

Closed dsuntsov-ms closed 1 year ago

dsuntsov-ms commented 1 year ago

This really confused when I tried to code Remotery receiver in Python

    DataViewReader.prototype.GetInt64 = function ()
    {
        var v = this.DataView.getFloat64(this.Offset, true);
        this.Offset += 8;
        return v;
    }

    DataViewReader.prototype.GetUInt64 = function ()
    {
        var v = this.DataView.getFloat64(this.Offset, true);
        this.Offset += 8;
        return v;
    }
dwilliamson commented 1 year ago

What is the issue you are having, exactly? Javascript DataView does not support 64-bit integers as the language supports only numbers, which are 64-bit floats.

dsuntsov-ms commented 1 year ago

What is the issue you are having, exactly? Javascript DataView does not support 64-bit integers as the language supports only numbers, which are 64-bit floats.

Just naming issue. Three the same functions with different names.

dwilliamson commented 1 year ago

Yeah, that is to allow the caller to specify intent, despite them being implemented exactly the same in the background.