Manual renames
This commit is contained in:
parent
c7934be7e8
commit
9a6fb37c22
14 changed files with 141 additions and 141 deletions
|
|
@ -121,21 +121,21 @@ different; for this a special setter syntax is needed:
|
|||
.. code-block:: nim
|
||||
|
||||
type
|
||||
TSocket* = object of TObject
|
||||
Socket* = object of RootObj
|
||||
FHost: int # cannot be accessed from the outside of the module
|
||||
# the `F` prefix is a convention to avoid clashes since
|
||||
# the accessors are named `host`
|
||||
|
||||
proc `host=`*(s: var TSocket, value: int) {.inline.} =
|
||||
proc `host=`*(s: var Socket, value: int) {.inline.} =
|
||||
## setter of hostAddr
|
||||
s.FHost = value
|
||||
|
||||
proc host*(s: TSocket): int {.inline.} =
|
||||
proc host*(s: Socket): int {.inline.} =
|
||||
## getter of hostAddr
|
||||
s.FHost
|
||||
|
||||
var
|
||||
s: TSocket
|
||||
s: Socket
|
||||
s.host = 34 # same as `host=`(s, 34)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue