Skip to content

Commit

Permalink
use strcmp for string comparison in ruby typemaps
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Nov 14, 2011
1 parent 0ef3680 commit 6c75752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/interfaces/ruby_modular/swig_typemaps.i
Expand Up @@ -238,7 +238,7 @@ TYPEMAP_SGMATRIX(float64_t, NUM2DBL, rb_float_new)
arr = rb_ary_new2(num);

for (i = 0; i < num; i++) {
if (TYPECODE == "String[]") {
if (strcmp(TYPECODE, "String[]")==0) {
VALUE vec = rb_str_new2((char *)str[i].string);
rb_ary_push(arr, vec);
}
Expand Down

0 comments on commit 6c75752

Please sign in to comment.