diff options
author | treeform <starplant@gmail.com> | 2022-03-23 23:35:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-24 07:35:29 +0100 |
commit | 400e0260b854f34a91af47bbe0a1b1c9d112e51b (patch) | |
tree | 823264fd114a1b52e691b1c0fa9e990858935bdf | |
parent | 7c3c61f2f1e898e5c70dfd619d94d09e339836e4 (diff) | |
download | Nim-400e0260b854f34a91af47bbe0a1b1c9d112e51b.tar.gz |
Add more info for {.bycopy.} (#18815)
* Add more info for {.bycopy.} See confusion here: https://github.com/nim-lang/Nim/issues/18807 I hope this will help people googling to find this. * Update doc/manual.rst Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
-rw-r--r-- | doc/manual.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/manual.rst b/doc/manual.rst index 4c4b9c506..8206d8342 100644 --- a/doc/manual.rst +++ b/doc/manual.rst @@ -7912,6 +7912,7 @@ instructs the compiler to pass the type by value to procs: Vector {.bycopy.} = object x, y, z: float +The Nim compiler automatically determines whether a parameter is passed by value or by reference based on the parameter type's size. If a parameter must be passed by value or by reference, (such as when interfacing with a C library) use the bycopy or byref pragmas. Byref pragma ------------ |