@@ -90,12 +90,15 @@ VALUE cbasic_diff(VALUE self, VALUE operand2) {
9090}
9191
9292VALUE cbasic_eq (VALUE self , VALUE operand2 ) {
93+
9394 basic_struct * this ;
9495
9596 basic cbasic_operand2 ;
9697 basic_new_stack (cbasic_operand2 );
9798 Data_Get_Struct (self , basic_struct , this );
98- sympify (operand2 , cbasic_operand2 );
99+
100+ VALUE ret = check_sympify (operand2 , cbasic_operand2 );
101+ if (ret == Qfalse ) return Qfalse ;
99102
100103 VALUE ret_val = basic_eq (this , cbasic_operand2 ) ? Qtrue : Qfalse ;
101104 basic_free_stack (cbasic_operand2 );
@@ -109,7 +112,9 @@ VALUE cbasic_neq(VALUE self, VALUE operand2) {
109112 basic cbasic_operand2 ;
110113 basic_new_stack (cbasic_operand2 );
111114 Data_Get_Struct (self , basic_struct , this );
112- sympify (operand2 , cbasic_operand2 );
115+
116+ VALUE ret = check_sympify (operand2 , cbasic_operand2 );
117+ if (ret == Qfalse ) return Qtrue ;
113118
114119 VALUE ret_val = basic_neq (this , cbasic_operand2 ) ? Qtrue : Qfalse ;
115120 basic_free_stack (cbasic_operand2 );
@@ -122,7 +127,7 @@ VALUE cbasic_neg(VALUE self){
122127}
123128
124129VALUE cbasic_get_args (VALUE self ) {
125- basic_struct * this , * iterator_basic ;
130+ basic_struct * this ;
126131 CVecBasic * args = vecbasic_new ();
127132 int size = 0 ;
128133
@@ -132,7 +137,7 @@ VALUE cbasic_get_args(VALUE self) {
132137 size = vecbasic_size (args );
133138 VALUE ruby_array = rb_ary_new2 (size );
134139 int i = 0 ;
135- VALUE temp = NULL ;
140+ VALUE temp ;
136141 for (i = 0 ; i < size ; i ++ ) {
137142 basic_struct * temp_basic = basic_new_heap ();
138143 vecbasic_get (args , i , temp_basic );
@@ -144,7 +149,7 @@ VALUE cbasic_get_args(VALUE self) {
144149}
145150
146151VALUE cbasic_free_symbols (VALUE self ) {
147- basic_struct * this , * iterator_basic ;
152+ basic_struct * this ;
148153 CSetBasic * symbols = setbasic_new ();
149154 int size = 0 ;
150155
@@ -154,7 +159,7 @@ VALUE cbasic_free_symbols(VALUE self) {
154159 size = setbasic_size (symbols );
155160 VALUE ruby_array = rb_ary_new2 (size );
156161 int i = 0 ;
157- VALUE temp = NULL ;
162+ VALUE temp ;
158163 for (i = 0 ; i < size ; i ++ ) {
159164 basic_struct * temp_basic = basic_new_heap ();
160165 setbasic_get (symbols , i , temp_basic );
0 commit comments