[ruby-cvs:67773] normal:r60592 (trunk): use mode_t where applicable (instead of int)

normal at ruby-lang.org normal at ruby-lang.org
Wed Nov 1 04:10:20 JST 2017

normal	2017-11-01 04:10:19 +0900 (Wed, 01 Nov 2017)

  New Revision: 60592


    use mode_t where applicable (instead of int)
    mode_t is the correct type for these syscalls and it can be
    easier-to-understand.  It may also help portability to future
    platforms and improve type checking.
    * dir.c (dir_s_mkdir): use mode_t for mkdir(2)
    * file.c (chmod_internal): use mode_t for chmod(2)
      (rb_file_s_chmod): s/int/mode_t/
      (lchmod_internal): ditto, deref pointer as in chmod_internal
      (rb_file_s_lchmod): pass pointer as in rb_file_s_chmod
      (rb_file_s_rename): use mode_t for umask(2)

  Modified files:

More information about the ruby-cvs mailing list