[ruby-cvs:65481] normal:r58309 (trunk): time.c: use predefined IDs

normal at ruby-lang.org normal at ruby-lang.org
Tue Apr 11 03:16:58 JST 2017


normal	2017-04-11 03:16:58 +0900 (Tue, 11 Apr 2017)

  New Revision: 58309

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58309

  Log:
    time.c: use predefined IDs
    
    This reduces rb_intern calls during startup and shortens code.
    
    * time.c: include id.h for predefined IDs
      (id_mul, id_eq, id_ne, id_cmp): remove static variables
      (eq): replace id_eq with idEq
      (cmp, wcmp): replace id_cmp with idCmp
      (weq): replace id_eq with idEq
      (time_timespec): replace id_mul with '*'
      (Init_Time): remove rb_intern calls for removed variables
    * common.mk (time.$(OBJEXT)): add depend on id.h

  Modified files:
    trunk/common.mk
    trunk/time.c


More information about the ruby-cvs mailing list