ext/Row.c in rubyfb-0.5.4 vs ext/Row.c in rubyfb-0.5.5

- old
+ new

@@ -131,12 +131,12 @@ items; index = INT2NUM(i); name = rb_funcall(results, rb_intern("column_name"), 1, index); alias = rb_funcall(results, rb_intern("column_alias"), 1, index); - strcpy(row->columns[i].name, STR2CSTR(name)); - strcpy(row->columns[i].alias, STR2CSTR(alias)); + strcpy(row->columns[i].name, StringValuePtr(name)); + strcpy(row->columns[i].alias, StringValuePtr(alias)); items = rb_ary_entry(data, i); row->columns[i].value = rb_ary_entry(items, 0); row->columns[i].type = rb_ary_entry(items, 1); if(TYPE(rb_ary_entry(items, 1)) == T_NIL) @@ -263,11 +263,11 @@ char name[32]; int i, done = 0; VALUE flag = getFireRubySetting("ALIAS_KEYS"); - strcpy(name, STR2CSTR(index)); + strcpy(name, StringValuePtr(index)); for(i = 0; i < row->size && done == 0; i++) { int match; /* Check whether its column name or column alias to compare on. */ @@ -445,11 +445,11 @@ else { if(size == 1) { rb_raise(rb_eIndexError, "Column identifier '%s' not found in row.", - STR2CSTR(parameters[0])); + StringValuePtr(parameters[0])); } value = parameters[1]; } } @@ -475,11 +475,11 @@ char text[32]; int i; VALUE flag = getFireRubySetting("ALIAS_KEYS"); Data_Get_Struct(self, RowHandle, row); - strcpy(text, STR2CSTR(name)); + strcpy(text, StringValuePtr(name)); for(i = 0; i < row->size && result == Qfalse; i++) { int match; /* Check whether key is column name or alias. */ @@ -519,11 +519,11 @@ RowHandle *row = NULL; char text[32]; int i; Data_Get_Struct(self, RowHandle, row); - strcpy(text, STR2CSTR(name)); + strcpy(text, StringValuePtr(name)); for(i = 0; i < row->size && result == Qfalse; i++) { if(strcmp(text, row->columns[i].name) == 0) { result = Qtrue; @@ -551,10 +551,10 @@ RowHandle *row = NULL; char text[32]; int i; Data_Get_Struct(self, RowHandle, row); - strcpy(text, STR2CSTR(name)); + strcpy(text, StringValuePtr(name)); for(i = 0; i < row->size && result == Qfalse; i++) { if(strcmp(text, row->columns[i].alias) == 0) { result = Qtrue;