Sha256: 26fc0f994c916554799debf5b9b74c6e55bb3a2664594aff2f9a4faab18276f2

Contents?: true

Size: 418 Bytes

Versions: 33

Compression:

Stored size: 418 Bytes

Contents

#ifndef MRB_VALUE_ARRAY_H__
#define MRB_VALUE_ARRAY_H__

#include <mruby.h>

static inline void
value_move(mrb_value *s1, const mrb_value *s2, size_t n)
{
  if (s1 > s2 && s1 < s2 + n)
  {
    s1 += n;
    s2 += n;
    while (n-- > 0) {
      *--s1 = *--s2;
    }
  }
  else if (s1 != s2) {
    while (n-- > 0) {
      *s1++ = *s2++;
    }
  }
  else {
    /* nothing to do. */
  }
}

#endif /* MRB_VALUE_ARRAY_H__ */

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
script_core-0.2.7 ext/enterprise_script_service/mruby/src/value_array.h
script_core-0.2.6 ext/enterprise_script_service/mruby/src/value_array.h
script_core-0.2.5 ext/enterprise_script_service/mruby/src/value_array.h
script_core-0.2.4 ext/enterprise_script_service/mruby/src/value_array.h
script_core-0.2.3 ext/enterprise_script_service/mruby/src/value_array.h
script_core-0.2.2 ext/enterprise_script_service/mruby/src/value_array.h
script_core-0.2.1 ext/enterprise_script_service/mruby/src/value_array.h
script_core-0.2.0 ext/enterprise_script_service/mruby/src/value_array.h
script_core-0.1.1 ext/enterprise_script_service/mruby/src/value_array.h
script_core-0.1.0 ext/enterprise_script_service/mruby/src/value_array.h
script_core-0.0.6 ext/enterprise_script_service/mruby/src/value_array.h
script_core-0.0.5 ext/enterprise_script_service/mruby/src/value_array.h
esruby-0.2.0 resources/mruby/src/value_array.h
esruby-0.1.5 resources/mruby/src/value_array.h
esruby-0.1.4 resources/mruby/src/value_array.h
esruby-0.1.3 resources/mruby/src/value_array.h
esruby-0.1.2 resources/mruby/src/value_array.h
esruby-0.1.1 resources/mruby/src/value_array.h
esruby-0.1.0 resources/mruby/src/value_array.h
esruby-0.0.11 resources/mruby/src/value_array.h