Commit Graph

15 Commits

Author SHA1 Message Date
Steven Siloti a6e5ba8804 return a span from TORRENT_ALLOCA (#1244)
return a span from TORRENT_ALLOCA

Unfortunately this requires moving the variable declaration inside the macro.
Due to alloca’s unique properties pretty much the only safe way to call it is
in a simple assign-to-pointer expression. Therefor we need to use a temporary
pointer to store the value returned from alloca before we can call span’s ctor.

This also causes double evaluation of the size parameter which is unfortunate,
but no current callers of TORRENT_ALLOCA have a problem with this. Passing
expressions with side effects to macros is bad mojo anyways.
2016-10-22 14:43:40 -04:00
arvidn 1f9f588e75 merge copyright year update and changelog from RC_1_0 2016-01-17 18:57:46 -05:00
Arvid Norberg d43f7b56a2 update copyright year 2015-06-03 05:18:48 +00:00
Arvid Norberg a943fec777 update copyright 2014-02-23 19:12:25 +00:00
Arvid Norberg 4e6b1cfbfb update copyright 2013-12-25 17:07:16 +00:00
Arvid Norberg bff648a89e update copyright dates and add tool to do so 2012-10-02 03:16:33 +00:00
Arvid Norberg c60f373ae4 merged mingw fix from RC_0_16 2012-08-21 21:54:07 +00:00
Arvid Norberg 7cf7243021 another FreeBSD fix 2012-04-15 01:02:55 +00:00
Arvid Norberg dcffa55700 some sunPRO compiler support 2010-03-07 06:00:12 +00:00
Arvid Norberg 3ea1b0d304 alloca build fixes 2009-09-06 23:56:07 +00:00
Georg Rudoy 4cb1c9f006 Hopefully really fixed alloca.h for now. 2009-09-06 18:43:09 +00:00
Georg Rudoy 5b5597e523 Possibly fixed not found alloca on FreeBSD. 2009-09-06 18:22:55 +00:00
Arvid Norberg d4148055b9 remove unnecessary semicolon 2009-01-13 09:31:35 +00:00
Arvid Norberg 52ee9342e9 alloca macro fix 2009-01-05 01:09:32 +00:00
Arvid Norberg f1d229aae6 first pass of replacing coalesce writes and reads by writev and readv (no windows support yet) 2009-01-03 08:11:31 +00:00