tiny_tds 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ * 0.2.1 *
3
+
4
+ Compatibility with 32-bit systems. Better cross language testing [Klaus Gundermann]
5
+
6
+
2
7
  * 0.2.0 *
3
8
 
4
9
  * Convert GUID's in a more compatible way. [Klaus Gundermann]
@@ -89,7 +89,7 @@ static VALUE rb_tinytds_result_fetch_row(VALUE self, ID timezone, int symbolize_
89
89
  val = INT2NUM(*(DBINT *)data);
90
90
  break;
91
91
  case SYBINT8:
92
- val = LONG2NUM(*(long *)data);
92
+ val = LL2NUM(*(DBBIGINT *)data);
93
93
  break;
94
94
  case SYBBIT:
95
95
  val = *(int *)data ? Qtrue : Qfalse;
@@ -116,8 +116,8 @@ static VALUE rb_tinytds_result_fetch_row(VALUE self, ID timezone, int symbolize_
116
116
  case SYBMONEY: {
117
117
  DBMONEY *money = (DBMONEY *)data;
118
118
  char converted_money[25];
119
- long money_value = ((long)money->mnyhigh << 32) | money->mnylow;
120
- sprintf(converted_money, "%ld", money_value);
119
+ long long money_value = ((long long)money->mnyhigh << 32) | money->mnylow;
120
+ sprintf(converted_money, "%lld", money_value);
121
121
  val = rb_funcall(cBigDecimal, intern_new, 2, rb_str_new2(converted_money), opt_four);
122
122
  val = rb_funcall(val, intern_divide, 1, opt_tenk);
123
123
  break;
@@ -2,6 +2,8 @@
2
2
  #ifndef TINYTDS_RESULT_H
3
3
  #define TINYTDS_RESULT_H
4
4
 
5
+ typedef tds_sysdep_int64_type DBBIGINT; /* Missing in sybdb.h ?!?! */
6
+
5
7
  void init_tinytds_result();
6
8
  VALUE rb_tinytds_new_result_obj(DBPROCESS *c);
7
9
 
data/lib/tiny_tds.rb CHANGED
@@ -15,5 +15,5 @@ require 'tiny_tds/tiny_tds'
15
15
  #
16
16
  # Tiny Ruby Wrapper For FreeTDS Using DB-Library
17
17
  module TinyTds
18
- VERSION = '0.2.0'
18
+ VERSION = '0.2.1'
19
19
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_tds
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ken Collins