@@ -18,8 +18,9 @@ VALUE cbasic_alloc(VALUE klass)
1818 return Data_Wrap_Struct (klass , NULL , cbasic_free_heap , struct_ptr );
1919}
2020
21- VALUE cbasic_binary_op (VALUE self , VALUE operand2 ,
22- int (* cwfunc_ptr )(basic_struct * , const basic_struct * ,
21+ VALUE cbasic_binary_op (
22+ VALUE self , VALUE operand2 ,
23+ symengine_exceptions_t (* cwfunc_ptr )(basic_struct * , const basic_struct * ,
2324 const basic_struct * ))
2425{
2526 basic_struct * this , * cresult ;
@@ -35,7 +36,7 @@ VALUE cbasic_binary_op(VALUE self, VALUE operand2,
3536
3637 symengine_exceptions_t error_code
3738 = cwfunc_ptr (cresult , this , cbasic_operand2 );
38- if (error_code == 0 ) {
39+ if (error_code == SYMENGINE_NO_EXCEPTION ) {
3940 result = Data_Wrap_Struct (Klass_of_Basic (cresult ), NULL ,
4041 cbasic_free_heap , cresult );
4142 basic_free_stack (cbasic_operand2 );
@@ -46,8 +47,8 @@ VALUE cbasic_binary_op(VALUE self, VALUE operand2,
4647 return result ;
4748}
4849
49- VALUE cbasic_unary_op (VALUE self ,
50- int ( * cwfunc_ptr )( basic_struct * , const basic_struct * ))
50+ VALUE cbasic_unary_op (VALUE self , symengine_exceptions_t ( * cwfunc_ptr )(
51+ basic_struct * , const basic_struct * ))
5152{
5253 basic_struct * this , * cresult ;
5354 VALUE result = Qnil ;
@@ -57,7 +58,7 @@ VALUE cbasic_unary_op(VALUE self,
5758 cresult = basic_new_heap ();
5859
5960 symengine_exceptions_t error_code = cwfunc_ptr (cresult , this );
60- if (error_code == 0 ) {
61+ if (error_code == SYMENGINE_NO_EXCEPTION ) {
6162 result = Data_Wrap_Struct (Klass_of_Basic (cresult ), NULL ,
6263 cbasic_free_heap , cresult );
6364 } else {
0 commit comments