Method: Concurrent::CAtomicFixnum#initialize

Defined in:
ext/concurrent-ruby-ext/atomic_fixnum.c

#initialize(*args) ⇒ Object



22
23
24
25
26
27
28
29
30
31
# File 'ext/concurrent-ruby-ext/atomic_fixnum.c', line 22

VALUE method_atomic_fixnum_initialize(int argc, VALUE* argv, VALUE self) {
  VALUE value = LL2NUM(0);
  rb_check_arity(argc, 0, 1);
  if (argc == 1) {
    Check_Type(argv[0], T_FIXNUM);
    value = argv[0];
  }
  DATA_PTR(self) = (void *) value;
  return(self);
}