Skip to content

Commit

Permalink
stat_result: specify __slots__
Browse files Browse the repository at this point in the history
We're likely to have a lot of these, so might as well save the memory.

Signed-off-by: Rob Browning <[email protected]>
Tested-by: Rob Browning <[email protected]>
  • Loading branch information
rlbdv committed Aug 14, 2022
1 parent e34ff95 commit 3914d75
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/bup/xstat.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ def _fix_cygwin_id(id):


class stat_result:
__slots__ = ('st_mode', 'st_ino', 'st_dev', 'st_nlink', 'st_uid', 'st_gid',
'st_rdev', 'st_size', 'st_atime', 'st_mtime', 'st_ctime')
@staticmethod
def from_xstat_rep(st):
global _cygwin_sys
Expand Down

0 comments on commit 3914d75

Please sign in to comment.