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>
This commit is contained in:
treeform
2022-03-23 23:35:29 -07:00
committed by GitHub
parent 7c3c61f2f1
commit 400e0260b8

View File

@@ -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
------------