simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Wed Feb 27 19:52:11 GMT 2019


TL;DR:
  1b4a08a9 Replace method-dispatch #defines with inline functions.
  1db50012 Replace a couple more #defines with inline functions.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2019-02-27 19:52:11

commit 1b4a08a953eac3bcac4cf11d86243eddbe412bec
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=1b4a08a953eac3bcac4cf11d86243eddbe412bec;hp=07ebd88c3ada636ed1a9382cce9c433686b5dcfd
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Feb 27 19:44:15 2019 +0000

    Replace method-dispatch #defines with inline functions.
    
    This replaces all the macros like ssh_key_sign() and win_draw_text()
    which take an object containing a vtable pointer and do the
    dereferencing to find the actual concrete method to call. Now they're
    all inline functions, which means more sensible type-checking and more
    comprehensible error reports when the types go wrong, and also means
    that there's no risk of double-evaluating the object argument.

 network.h |  51 +++++++-----
 putty.h   | 252 +++++++++++++++++++++++++++++++++--------------------------
 sftp.h    | 134 +++++++++++++++++++-------------
 ssh.h     | 262 +++++++++++++++++++++++++++++++++++++++-----------------------
 sshbpp.h  |  14 ++--
 sshchan.h | 188 ++++++++++++++++++++++++++------------------
 sshppl.h  |  22 ++++--
 7 files changed, 557 insertions(+), 366 deletions(-)

commit 1db5001260ee2e745e2863e2eba59cd307f126a5
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=1db5001260ee2e745e2863e2eba59cd307f126a5;hp=1b4a08a953eac3bcac4cf11d86243eddbe412bec
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Feb 27 19:47:12 2019 +0000

    Replace a couple more #defines with inline functions.
    
    My trawl of all the vtable systems in the code spotted a couple of
    other function-like macros in passing, which might as well be
    rewritten as inline functions too for the same reasons.

 terminal.h         | 5 ++++-
 windows/winstuff.h | 6 +++++-
 2 files changed, 9 insertions(+), 2 deletions(-)



More information about the tartarus-commits mailing list