Commit Graph

392 Commits (19659c3bd347471d3d55597bdc1c141e9e4a1ae1)

Author SHA1 Message Date
Andrew Kelley d5648d2640
remove implicit cast from T to *const T
closes #1465
2018-10-15 18:23:47 -04:00
Jimmi Holst Christensen 378d3e4403
Solve the return type ambiguity (#1628)
Changed container and initializer syntax
* <container> { ... } -> <container> . { ... }
* <exrp> { ... } -> <expr> . { ...}
2018-10-15 09:51:15 -04:00
Andrew Kelley 8700f4d2b1
docs: add comment about operator overloading 2018-10-05 18:25:20 -04:00
Andrew Kelley c81a4b3e3d
docs: fix double escaping html entities 2018-10-05 10:21:08 -04:00
Andrew Kelley 8d6601d7ce
improve pointer documentation
closes #1630
2018-10-04 22:51:36 -04:00
Andrew Kelley 9d4eaf1e07
update std lib API for I/O
std.io.FileInStream -> std.os.File.InStream
std.io.FileInStream.init(file) -> file.inStream()
std.io.FileOutStream -> std.os.File.OutStream
std.io.FileOutStream.init(file) -> file.outStream()

remove a lot of error code possibilities from os functions

std.event.net.socketRead -> std.event.net.read
std.event.net.socketWrite -> std.event.net.write
add std.event.net.readv
add std.event.net.writev
add std.event.net.readvPosix
add std.event.net.writevPosix
add std.event.net.OutStream
add std.event.net.InStream

add std.event.io.InStream
add std.event.io.OutStream
2018-09-30 17:28:35 -04:00
Andrew Kelley cc490f0026
update @typeInfo docs 2018-09-27 12:34:41 -04:00
Andrew Kelley 9485043b3c
fix implicit casting to *c_void
closes #1588

also some small std lib changes regarding posix sockets
and one doc typo fix
2018-09-26 11:06:09 -04:00
Andrew Kelley 839492d0e8
fix not syntax highlighting builtin module 2018-09-25 12:03:09 -04:00
Andrew Kelley 422269ea6e
minor langref improvements 2018-09-24 14:38:51 -04:00
Andrew Kelley 3c1f9baff1
doc: add note about reproducible builds 2018-09-22 10:22:01 -04:00
Andrew Kelley 7c5e3e1f8e
fixups 2018-09-21 14:15:58 -04:00
Andrew Kelley 5a21d3dce0
Merge branch 'BitByteOffsetOfs' of https://github.com/raulgrell/zig into raulgrell-BitByteOffsetOfs 2018-09-21 13:10:21 -04:00
Andrew Kelley 6dd93ee5d9
fix regression from previous commit 2018-09-18 18:56:29 -04:00
Andrew Kelley 4c6f1e614a
remove `zig build --init`. add `zig init-lib` and `zig init-exe`
init-lib creates a working static library with tests, and
init-exe creates a working hello world with a `run` target.

both now have test coverage with the new "cli tests" file.

closes #1035
2018-09-17 17:11:18 -04:00
Andrew Kelley 780e567446
add docs for `@This()` 2018-09-15 10:14:50 -04:00
Andrew Kelley 5e39328542
docs: more syntax highlighting 2018-09-14 10:35:03 -04:00
Andrew Kelley c06a61e9bf
remove `this`. add `@This()`.
closes #1283
2018-09-13 16:34:33 -04:00
Andrew Kelley 7c3636aaa3
remove the scope parameter of setFloatMode
also document that scopes inherit this value. See #367
See #1283
2018-09-13 15:46:34 -04:00
Andrew Kelley 22e39e1e5a
fix tagged union with only 1 field tripping assertion
closes #1495

now the tag type of an enum with only 1 item is comptime_int.
2018-09-13 13:33:11 -04:00
Andrew Kelley 0dbbc91bc9
docs: langref is now javascript-free 2018-09-12 17:27:10 -04:00
Andrew Kelley 15c67d2d50
fix docgen tests 2018-09-11 16:52:50 -04:00
Raul Leal f2186e5fa7
Update langref.html.in 2018-09-07 22:58:31 +01:00
raulgrell 09a1162af5 builtin functions: @byteOffsetOf and @bitOffsetOf 2018-09-07 22:49:19 +01:00
Andrew Kelley c87a576cb5
stage1 compile error instead of crashing for unsupported comptime ptr cast
See #955
2018-09-05 15:53:36 -04:00
Andrew Kelley 3f273479f8
clarify const variables in docs
closes #1200
2018-09-03 12:18:12 -04:00
Andrew Kelley 2a9329c998
better anonymous struct naming
this makes anonymous structs inherit the name of the function they are in
only when they are the return expression.

also document the behavior and provide examples.

closes #1243
2018-09-03 11:32:39 -04:00
Andrew Kelley 832caefc2a fix regressions 2018-09-02 18:35:32 -04:00
Andrew Kelley 048f506aa6
langref: document labeled blocks, labeled for, labeled while
closes #1327
2018-08-27 20:59:28 -04:00
Andrew Kelley c48be3a742
langref: document exporting a library
closes #1431
2018-08-27 17:44:58 -04:00
Andrew Kelley 526338b00f document fixed-width integer types
closes #1280
2018-08-25 17:39:43 -04:00
Marc Tiehuis 05f9b14fc2 Fix builtin alignment type
Closes #1235.
2018-08-24 17:57:17 +12:00
Marc Tiehuis 353419f82d Default to strict IEEE floating point
Closes #1227.
2018-08-23 22:54:46 +12:00
Andrew Kelley 5aeb3217ee fixup for previous commit 2018-08-22 14:24:48 -04:00
Andrew Kelley ea1b21dbdb fix linux
* error.BadFd is not a valid error code. it would always be a bug to
   get this error code.
 * merge error.Io with existing error.InputOutput
 * merge error.PathNotFound with existing error.FileNotFound.
   Not all OS's support both.
 * add os.File.openReadC
 * add error.BadPathName for windows file operations with invalid
   characters
 * add os.toPosixPath to help stack allocate a null terminating byte
 * add some TODOs for other functions to investigate removing the
   allocator requirement
 * optimize some implementations to use the alternate functions when
   a null byte is already available
 * add a missing error.SkipZigTest
 * os.selfExePath uses a non-allocating API
 * os.selfExeDirPath uses a non-allocating API
 * os.path.real uses a non-allocating API
 * add os.path.realAlloc and os.path.realC
 * convert many windows syscalls to use the W versions (See #534)
2018-08-21 20:31:50 -04:00
Andrew Kelley 3ee1b60edf langref: add docs for peer type resolution
closes #1367
2018-08-20 14:22:16 -04:00
Marc Tiehuis 1da93caced docs: correct @memcpy, @memset function signatures 2018-08-18 12:06:25 +12:00
Andrew Kelley c4b9466da7
Merge pull request #1294 from ziglang/async-fs
introduce std.event.fs for async file system functions
2018-08-10 15:51:17 -04:00
Andrew Kelley d40f3fac74 docgen: fix usage of std.HashMap 2018-08-10 00:03:16 -04:00
Shawn Landden cb0ef3ad4c doc: @addWithOverflow also returns if overflow occured 2018-08-06 22:12:14 -07:00
kristopher tate ac0a87d58d doc/langref.html.in: add builtin @handle() to docs;
Tracking Issue #1296 ;
2018-08-02 17:47:39 +09:00
kristopher tate 915e321a23 doc/langref.html.in: update suspend example with @handle();
Tracking Issue #1296 ;
2018-08-02 17:45:35 +09:00
kristopher tate ff4a03f351 doc/langref.html.in: update docs to reflect that the promise symbol is no in scope with suspend;
Tracking Issue #1296 ;
2018-08-02 17:03:39 +09:00
Matthew D. Steele 0db33e9c86 Add "Comments" section to language reference (#1309)
The contents of this section come from the discussion on issue #1305.
2018-07-30 22:27:07 -04:00
Andrew Kelley cfe03c764d fix docs for break from suspend 2018-07-30 13:07:04 -04:00
Andrew Kelley 02c5bda704 remove ability to break from suspend blocks
closes #803
2018-07-27 17:27:03 -04:00
Jay Weisskopf 6394f7e9a3 Fixed minor documentation errors (#1256)
Changed:
- "retuns" to "returns"
- "null-terminated pointers" to "pointers to null-terminated arrays"
2018-07-17 21:18:41 -04:00
Andrew Kelley e9a03cccf3 all integer sizes are available as primitives
* fix wrong implicit cast for `@IntType` bit_count parameter.
 * fix incorrect docs for `@IntType` bit_count parameter.

closes #1242
closes #745
closes #1240
2018-07-16 10:53:15 -04:00
Andrew Kelley 29c756abba docs: correct some misinformation 2018-07-14 11:53:51 -04:00
Andrew Kelley 696ef0bc03 langref: docs for union safety 2018-07-10 10:37:58 -04:00