aboutsummaryrefslogtreecommitdiff
path: root/std/endian.zig
AgeCommit message (Collapse)Author
2018-04-08*WIP* async/await TCP serverAndrew Kelley
2018-01-25syntax: functions require return type. remove `->`Andrew Kelley
The purpose of this is: * Only one way to do things * Changing a function with void return type to return a possible error becomes a 1 character change, subtly encouraging people to use errors. See #632 Here are some imperfect sed commands for performing this update: remove arrow: ``` sed -i 's/\(\bfn\b.*\)-> /\1/g' $(find . -name "*.zig") ``` add void: ``` sed -i 's/\(\bfn\b.*\))\s*{/\1) void {/g' $(find ../ -name "*.zig") ``` Some cleanup may be necessary, but this should do the bulk of the work.
2018-01-11Fix endian swap parametersMarc Tiehuis
2018-01-07Fixed the call to mem.readInt in endian.swapJimmi Holst Christensen
2017-12-22explicitly return from blocksAndrew Kelley
instead of last statement being expression value closes #629
2017-12-04rename builtin.is_big_endian to builtin.endianAndrew Kelley
See #307
2017-05-19change slicing syntax from ... to ..Andrew Kelley
See #359
2017-05-01`@import("builtin")` instead of `@compileVar`Andrew Kelley
See #226 Closes #220
2017-02-12slice and array re-work plus some misc. changesAndrew Kelley
* `@truncate` builtin allows casting to the same size integer. It also performs two's complement casting between signed and unsigned integers. * The idiomatic way to convert between bytes and numbers is now `mem.readInt` and `mem.writeInt` instead of an unsafe cast. It works at compile time, is safer, and looks cleaner. * Implicitly casting an array to a slice is allowed only if the slice is const. * Constant pointer values know if their memory is from a compile- time constant value or a compile-time variable. * Cast from [N]u8 to []T no longer allowed, but [N]u8 to []const T still allowed. * Fix inability to pass a mutable pointer to comptime variable at compile-time to a function and have the function modify the memory pointed to by the pointer. * Add the `comptime T: type` parameter back to mem.eql. Prevents accidentally creating instantiations for arrays.
2017-01-22use comptime instead of inline for var and paramsAndrew Kelley
See #221
2016-08-17progress toward stack trace printingAndrew Kelley