@@ -15,15 +15,6 @@ static VALUE cTinyTdsResult, cKernel, cDate;
1515rb_encoding * binaryEncoding ;
1616VALUE opt_onek , opt_onebil , opt_float_zero , opt_four , opt_tenk ;
1717
18- static void rb_tinytds_client_mark (void * ptr )
19- {
20- tinytds_client_wrapper * cwrap = (tinytds_client_wrapper * )ptr ;
21-
22- if (cwrap ) {
23- rb_gc_mark (cwrap -> charset );
24- }
25- }
26-
2718static void rb_tinytds_client_free (void * ptr )
2819{
2920 tinytds_client_wrapper * cwrap = (tinytds_client_wrapper * )ptr ;
@@ -51,7 +42,7 @@ static size_t tinytds_client_wrapper_size(const void* data)
5142static const rb_data_type_t tinytds_client_wrapper_type = {
5243 .wrap_struct_name = "tinytds_client_wrapper" ,
5344 .function = {
54- .dmark = rb_tinytds_client_mark ,
45+ .dmark = NULL ,
5546 .dfree = rb_tinytds_client_free ,
5647 .dsize = tinytds_client_wrapper_size ,
5748 },
@@ -459,7 +450,6 @@ static VALUE allocate(VALUE klass)
459450 tinytds_client_wrapper * cwrap ;
460451 obj = TypedData_Make_Struct (klass , tinytds_client_wrapper , & tinytds_client_wrapper_type , cwrap );
461452 cwrap -> closed = 1 ;
462- cwrap -> charset = Qnil ;
463453 cwrap -> userdata = malloc (sizeof (tinytds_client_userdata ));
464454 cwrap -> userdata -> closed = 1 ;
465455 rb_tinytds_client_reset_userdata (cwrap -> userdata );
@@ -910,12 +900,6 @@ static VALUE rb_tiny_tds_do(VALUE self, VALUE sql)
910900 return rb_tinytds_affected_rows (cwrap -> client );
911901}
912902
913- static VALUE rb_tinytds_charset (VALUE self )
914- {
915- GET_CLIENT_WRAPPER (self );
916- return cwrap -> charset ;
917- }
918-
919903static VALUE rb_tinytds_encoding (VALUE self )
920904{
921905 GET_CLIENT_WRAPPER (self );
@@ -975,7 +959,7 @@ static VALUE rb_tinytds_connect(VALUE self)
975959 contained = rb_iv_get (self , "@contained" );
976960 database = rb_iv_get (self , "@database" );
977961 dataserver = rb_iv_get (self , "@dataserver" );
978- charset = rb_iv_get (self , "@encoding " );
962+ charset = rb_iv_get (self , "@charset " );
979963 login_timeout = rb_iv_get (self , "@login_timeout" );
980964 password = rb_iv_get (self , "@password" );
981965 tds_version = rb_iv_get (self , "@tds_version" );
@@ -1054,7 +1038,6 @@ static VALUE rb_tinytds_connect(VALUE self)
10541038 VALUE transposed_encoding , timeout_string ;
10551039
10561040 cwrap -> closed = 0 ;
1057- cwrap -> charset = charset ;
10581041
10591042 if (!NIL_P (tds_version )) {
10601043 dbsetversion (NUM2INT (tds_version ));
@@ -1112,7 +1095,6 @@ void init_tinytds_client()
11121095 rb_define_method (cTinyTdsClient , "execute" , rb_tinytds_execute , -1 );
11131096 rb_define_method (cTinyTdsClient , "insert" , rb_tiny_tds_insert , 1 );
11141097 rb_define_method (cTinyTdsClient , "do" , rb_tiny_tds_do , 1 );
1115- rb_define_method (cTinyTdsClient , "charset" , rb_tinytds_charset , 0 );
11161098 rb_define_method (cTinyTdsClient , "encoding" , rb_tinytds_encoding , 0 );
11171099 rb_define_method (cTinyTdsClient , "escape" , rb_tinytds_escape , 1 );
11181100 rb_define_method (cTinyTdsClient , "return_code" , rb_tinytds_return_code , 0 );
0 commit comments