1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-25 09:12:24 +00:00

Update docs section about use of global variables.

It referred to the global variable 'flags' as an example. But 'flags'
was retired (and good riddance) nearly a year ago, in commit
4ea811a0bf. So we should be using a different example now!
This commit is contained in:
Simon Tatham 2020-12-26 15:40:04 +00:00
parent 875a887c8f
commit 1f8b3b5535

View File

@ -142,12 +142,11 @@ potentially managing multiple sessions.
Therefore, the platform-independent parts of PuTTY never use global Therefore, the platform-independent parts of PuTTY never use global
variables to store per-session data. The global variables that do variables to store per-session data. The global variables that do
exist are tolerated because they are not specific to a particular exist are tolerated because they are not specific to a particular
login session: \c{flags} defines properties that are expected to login session. The random number state in \cw{sshrand.c}, the timer
apply equally to \e{all} the sessions run by a single PuTTY process, list in \cw{timing.c} and the queue of top-level callbacks in
the random number state in \cw{sshrand.c} and the timer list in \cw{callback.c} serve all sessions equally. But most data is specific
\cw{timing.c} serve all sessions equally, and so on. But most data to a particular network session, and is therefore stored in
is specific to a particular network session, and is therefore stored dynamically allocated data structures, and pointers to these
in dynamically allocated data structures, and pointers to these
structures are passed around between functions. structures are passed around between functions.
Platform-specific code can reverse this decision if it likes. The Platform-specific code can reverse this decision if it likes. The