Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #59142

Re: Variadic functions and const

Newsgroups comp.lang.c
Date 2015-03-28 08:38 -0700
References <8fdc6e6e-6160-4ec8-b910-971c96445e67@googlegroups.com> <12de4cf3-776d-418f-a68e-2266a310ee45@googlegroups.com>
Message-ID <b6055901-e33a-405d-b7a5-0e6f96c829cc@googlegroups.com> (permalink)
Subject Re: Variadic functions and const
From fir <profesor.fir@gmail.com>

Show all headers | View raw


W dniu sobota, 28 marca 2015 16:34:56 UTC+1 użytkownik fir napisał:
> (not an answer but side note about 
> 
> foo(data*); 
> 
> passing in c
> 
> c has extreme hole here that might be 
> extremally confusing esp if working with
> second party libraries,
> you just dont know
> 1) if this data is passed to read
> 2) if is passed to write
> 3) if is consumed (i mean may be internally dealocated by some free(), seems probably very rare case in reality but in strict sense you never know (if im not wrong))
> 4) if this data is produced (may be mallocked)
> 5) if needs to be sustained (on caller side) 
> (becouse only pointer was passed snd setted to oryginal data that are steel needed to be referenced) or if they may and should be destroyed after this call
> 6, 7.. ) maybe even other cases im not sure
> 
> i was deadly condused with such things working
> with some libs (even more in other languages than in c, as you also have not clearly stated
> what the real case is also there), this is like some damn small coding dellirium here ;/
> (thats why it needs to be repaired)

ps may sociological question becouse of curiosity

- does other people also noticed this 'delirium' in such cases or i am the only one that was haunted by this? 
- id so how was the cure for it, or they just ignore this or what?

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Variadic functions and const samuelallenalexander@gmail.com - 2015-03-28 05:54 -0700
  Re: Variadic functions and const Lőrinczy Zsigmond <nospam@for.me> - 2015-03-28 14:38 +0100
  Re: Variadic functions and const Richard Damon <Richard@Damon-Family.org> - 2015-03-28 10:02 -0400
  Re: Variadic functions and const Kaz Kylheku <kaz@kylheku.com> - 2015-03-28 14:11 +0000
  Re: Variadic functions and const Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-03-28 15:13 +0000
  Re: Variadic functions and const fir <profesor.fir@gmail.com> - 2015-03-28 08:34 -0700
    Re: Variadic functions and const fir <profesor.fir@gmail.com> - 2015-03-28 08:38 -0700
    Re: Variadic functions and const Lőrinczy Zsigmond <nospam@for.me> - 2015-03-28 17:01 +0100
      Re: Variadic functions and const Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-03-28 12:49 -0700

csiph-web