1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

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.
This commit is contained in:
Simon Tatham
2019-02-27 19:47:12 +00:00
parent 1b4a08a953
commit 1db5001260
2 changed files with 9 additions and 2 deletions

View File

@ -41,7 +41,11 @@
struct Filename {
char *path;
};
#define f_open(filename, mode, isprivate) ( fopen((filename)->path, (mode)) )
static inline FILE *f_open(const Filename *filename, const char *mode,
bool isprivate)
{
return fopen(filename->path, mode);
}
struct FontSpec {
char *name;