www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2818] New: Pointer parameters in core.memory should be const(void)*.

reply d-bugmail puremagic.com writes:

           Summary: Pointer parameters in core.memory should be
           Product: D
           Version: 2.027
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: dsimcha yahoo.com

In core.memory, functions that do not affect the validity or contents of the
underlying memory regions should have signatures of ReturnType function(const
void*), not ReturnType function(void*). These include GC.sizeOf(), GC.addrOf(),
and GC.realloc(). There is simply no reason why these would be unsafe to call
on pointers to const/immutable objects, and as such, this should not require an
explicit cast.

Apr 07 2009
parent d-bugmail puremagic.com writes:

David Simcha <dsimcha yahoo.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from David Simcha <dsimcha yahoo.com> 2011-08-27 07:43:55 PDT ---
This was fixed a long time ago.

Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 27 2011