[Chapel Merge] Add int: c_void_ptr casts

Branch: refs/heads/main
Revision: a97f5b2
Author: mppf
Link: Add int: c_void_ptr casts by mppf · Pull Request #19072 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #19072 from mppf/int-to-ptr

Add int: c_void_ptr casts

This PR adds int: c_void_ptr casts.

This is motivated by a feature request from @LouisJenkinsCS who was
trying to use mmap from Chapel and so to have some equivalent to
MAP_FAILED = (void *) -1..

This PR also tidies up some ptr -> int casts.

Reviewed by @bradcray - thanks!