🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4476

Re: Should free() take a pointer to const argument?

#4476
From: Jerry Coffin
Date: Thu, 14 Dec 1995 20:51
19 lines
1160 bytes
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.
    Later,
    Jerry.

/* I can barely express my own opinions; I certainly can't
 * express anybody else's.
 *
 * The universe is a figment of its own imagination.
 */
Technical Details
Message-ID: <4apug2$k5v@natasha.rmii.com>
Path: arc1-ca.pugleaf.net!news.rmii.com!usenet
References: <818626119snz@genesis.demon.co.uk> <4am3dn$6s9@natasha.rmii.com> <818898225snz@genesis.demon.co.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.rmii.com!usenet
From: jcoffin@rmii.com (Jerry Coffin)
Newsgroups: comp.std.c
Subject: Re: Should free() take a pointer to const argument?
Date: Thu, 14 Dec 1995 20:51:05 GMT
Organization: TAEUS
Message-ID: <4apug2$k5v@natasha.rmii.com>
References: <818626119snz@genesis.demon.co.uk> <4am3dn$6s9@natasha.rmii.com> <818898225snz@genesis.demon.co.uk>
NNTP-Posting-Host: slip8146.rmii.com
X-Newsreader: Forte Free Agent 1.0.82