Article View: comp.std.c
Article #4499Re: Should free() take a pointer to const argument?
From: Lawrence Kirby
Date: Sun, 17 Dec 1995 17:11
Date: Sun, 17 Dec 1995 17:11
23 lines
1532 bytes
1532 bytes
In article <4apug2$k5v@natasha.rmii.com> jcoffin@rmii.com "Jerry Coffin" writes: >Lawrence Kirby <fred@genesis.demon.co.uk> wrote: > >[ ... ] >>realloc can be thought of as destroying an object (without modifying it) >>and then creating another one initialised to (an appropriate amount of) >>the data that was in the first one. > >It can be thought of that way, and if officially described that way, I >think realloc taking a const would be reasonable. However, with the >present description, there is the definite concept of realloc (possibly) >modifying the original object, which doesn't fit with const at all. Which is why I included an argument of why the present description of realloc is essentially inconsistent with the meaning of 'object' and should be changed. -- ----------------------------------------- Lawrence Kirby | fred@genesis.demon.co.uk Wilts, England | 70734.126@compuserve.com -----------------------------------------
Technical Details
Message-ID:
<819220264snz@genesis.demon.co.uk>Path:
arc1-ca.pugleaf.net!mail2news.demon.co.uk!genesis.demon.co.ukReferences:
<818626119snz@genesis.demon.co.uk> <4am3dn$6s9@natasha.rmii.com> <818898225snz@genesis.demon.co.uk> <4apug2$k5v@natasha.rmii.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!mail2news.demon.co.uk!genesis.demon.co.uk From: Lawrence Kirby <fred@genesis.demon.co.uk> Newsgroups: comp.std.c Subject: Re: Should free() take a pointer to const argument? Date: Sun, 17 Dec 95 17:11:04 GMT Organization: none Message-ID: <819220264snz@genesis.demon.co.uk> References: <818626119snz@genesis.demon.co.uk> <4am3dn$6s9@natasha.rmii.com> <818898225snz@genesis.demon.co.uk> <4apug2$k5v@natasha.rmii.com> Reply-To: fred@genesis.demon.co.uk X-NNTP-Posting-Host: genesis.demon.co.uk X-Newsreader: Demon Internet Simple News v1.27