The code is used only internally and is not a public API. The comment exists mainly to satisfy the linter.
static int ptrToInt(int ptr) => ptr;