30 lines
880 B
C
30 lines
880 B
C
// Copyright 2010-2014 Greg Hurrell. All rights reserved.
|
|
// Licensed under the terms of the BSD 2-clause license.
|
|
|
|
#include <ruby.h>
|
|
|
|
// for compatibility with older versions of Ruby which don't declare RSTRING_PTR
|
|
#ifndef RSTRING_PTR
|
|
#define RSTRING_PTR(s) (RSTRING(s)->ptr)
|
|
#endif
|
|
|
|
// for compatibility with older versions of Ruby which don't declare RSTRING_LEN
|
|
#ifndef RSTRING_LEN
|
|
#define RSTRING_LEN(s) (RSTRING(s)->len)
|
|
#endif
|
|
|
|
// for compatibility with older versions of Ruby which don't declare RARRAY_PTR
|
|
#ifndef RARRAY_PTR
|
|
#define RARRAY_PTR(a) (RARRAY(a)->ptr)
|
|
#endif
|
|
|
|
// for compatibility with older versions of Ruby which don't declare RARRAY_LEN
|
|
#ifndef RARRAY_LEN
|
|
#define RARRAY_LEN(a) (RARRAY(a)->len)
|
|
#endif
|
|
|
|
// for compatibility with older versions of Ruby which don't declare RFLOAT_VALUE
|
|
#ifndef RFLOAT_VALUE
|
|
#define RFLOAT_VALUE(f) (RFLOAT(f)->value)
|
|
#endif
|