Remove calls to deprecated STR2CSTR #8

Merged
merged 1 commit into from Aug 11, 2012

Conversation

Projects
None yet
2 participants
Contributor

mrgordon commented Aug 10, 2012

Ruby 1.9.2 removed the STR2CSTR macro. This replaces the use of that macro with StringValuePtr. Otherwise I get the following error when trying to bundle install:

Using liblinear-ruby-swig (0.2.1.1) from https://github.com/tomz/liblinear-ruby-swig.git (at master) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/mattgordon/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb 
creating Makefile

make
compiling liblinear_wrap.cxx
liblinear_wrap.cxx: In function ‘int SWIG_AsCharPtrAndSize(VALUE, char**, size_t*, int*)’:
liblinear_wrap.cxx:1706: error: ‘STR2CSTR’ was not declared in this scope
make: *** [liblinear_wrap.o] Error 1

tomz added a commit that referenced this pull request Aug 11, 2012

Merge pull request #8 from mrgordon/no_STR2CSTR
Remove calls to deprecated STR2CSTR

@tomz tomz merged commit 719b307 into tomz:master Aug 11, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment