]> git.wincent.com - wikitext.git/commit
Conditional compilation for Ruby 1.8.x and 1.9.x
authorWincent Colaiuta <win@wincent.com>
Tue, 12 May 2009 10:00:41 +0000 (12:00 +0200)
committerWincent Colaiuta <win@wincent.com>
Tue, 12 May 2009 10:00:41 +0000 (12:00 +0200)
commit33cd74fd262cd6dde29f692d4dbe7e1f1e98f537
tree825e6fcb93c1df9f36ce23d8301033cf5cea00e8
parent7051f619c2f094bcb995a43a0add33f0ba20f6c5
Conditional compilation for Ruby 1.8.x and 1.9.x

Detect the Ruby version in extconf.rb using the RUBY_VERSION
constant and pass this along as a C preprocessor macro (either
RUBY_1_8_x or RUBY_1_9_x).

By definition we're doing this conditional compilation because
we want to manipulate RString struct members directly, so we
tie the conditional compilation very tightly to the version
number. Older or newer versions will bail with an error.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
ext/extconf.rb
ext/parser.c