[lkml]   [2008]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: Why is the kfree() argument const?

On Thu, 17 Jan 2008, David Schwartz wrote:
> No, that's not what it means. It has nothing to do with memory. It has to do
> with logical state.

Blah. That's just your own made-up explanation of what you think "const"
should mean. It has no logical background or any basis in the C language.

"const" has nothing to do with "logical state". It has one meaning, and
one meaning only: the compiler should complain if that particular type is
used to do a write access.

It says nothing at all about the "logical state of the object". It cannot,
since a single object can - and does - have multiple pointers to it.

So your standpoint not only has no relevant background to it, it's also
not even logically consistent.


 \ /
  Last update: 2008-01-18 00:13    [W:0.258 / U:11.528 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site