do_postgres 0.10.14-x86-mswin32-60 → 0.10.15-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f03465b06b90b8534dc54db61a9ef30650473fa
4
- data.tar.gz: fa1e797237f9db49030326d0c6683c310e56df68
3
+ metadata.gz: 521f68f5450e7f7d32c8db1888a92799604b9776
4
+ data.tar.gz: 239688cf84f6fda2891db9affe18953428d2f872
5
5
  SHA512:
6
- metadata.gz: 9b2258b3adeae27b31639c9bbdec3d7828ed34e991037885885d991df2c743781100c3aef507934074605461dd8f4acf838c3d79b452506d3f961c8482b19a8e
7
- data.tar.gz: 7e1d3965bb76023bb1f50fd4e346c5c8870add9cd8e587e67c8d8f50f079361798d631604c1dc237a5395e25dedb196a9e4bd67a01dbd4af0e66f57da9ea15ec
6
+ metadata.gz: 8ad2f396c4f518357a44a4fb7fbd63d94816927ec1ab2e185ee8287e4a5d417659323baf050136bd2bb09c62ebbf4fa1c07f5b2d0d6cf330ed335dcd75fe4d6b
7
+ data.tar.gz: b7ea137e8309ebeaef24c157991995c29cd4bc18fed11a18e248502c94a081b1d71fa2d8ac855bae729329859962b6f426ef3e4e50bcd072c3534121e4926aad
data/ChangeLog.markdown CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.10.15 2015-02-15
2
+
3
+ * Ruby 2.2 support
4
+ * Double after free fix in do\_postgres
5
+ * Windows support on 2.1.x and 2.2.x
6
+
1
7
  ## 0.10.14 2014-02-13
2
8
 
3
9
  * Don't do DNS lookup in transaction loading
@@ -63,7 +63,7 @@ void data_objects_debug(VALUE connection, VALUE string, struct timeval *start) {
63
63
  rb_funcall(connection, DO_ID_LOG, 1, message);
64
64
  }
65
65
 
66
- void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum, const char *message, VALUE query, VALUE state) {
66
+ void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum, VALUE message, VALUE query, VALUE state) {
67
67
  const char *exception_type = "SQLError";
68
68
  const struct errcodes *e;
69
69
  VALUE uri, exception;
@@ -82,7 +82,7 @@ void data_objects_raise_error(VALUE self, const struct errcodes *errors, int err
82
82
  data_objects_const_get(mDO, exception_type),
83
83
  DO_ID_NEW,
84
84
  5,
85
- rb_str_new2(message),
85
+ message,
86
86
  INT2NUM(errnum),
87
87
  state,
88
88
  query,
@@ -123,7 +123,7 @@ static inline void data_objects_define_errors(VALUE scope, const struct errcodes
123
123
  }
124
124
  }
125
125
 
126
- extern void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum, const char *message, VALUE query, VALUE state);
126
+ extern void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum, VALUE message, VALUE query, VALUE state);
127
127
 
128
128
  extern VALUE data_objects_typecast(const char *value, long length, const VALUE type, int encoding);
129
129
 
@@ -32,6 +32,18 @@
32
32
  #endif
33
33
 
34
34
 
35
+ #ifndef HAVE_RB_THREAD_FD_SELECT
36
+ #define rb_fdset_t fd_set
37
+ #define rb_fd_isset(n, f) FD_ISSET(n, f)
38
+ #define rb_fd_init(f) FD_ZERO(f)
39
+ #define rb_fd_zero(f) FD_ZERO(f)
40
+ #define rb_fd_set(n, f) FD_SET(n, f)
41
+ #define rb_fd_clr(n, f) FD_CLR(n, f)
42
+ #define rb_fd_term(f)
43
+ #define rb_thread_fd_select rb_thread_select
44
+ #endif
45
+
46
+
35
47
  #include <ruby.h>
36
48
  #include <string.h>
37
49
  #include <math.h>
@@ -99,13 +111,14 @@ VALUE do_postgres_typecast(const char *value, long length, const VALUE type, int
99
111
  }
100
112
 
101
113
  void do_postgres_raise_error(VALUE self, PGresult *result, VALUE query) {
102
- const char *message = PQresultErrorMessage(result);
114
+ VALUE message = rb_str_new2(PQresultErrorMessage(result));
103
115
  char *sql_state = PQresultErrorField(result, PG_DIAG_SQLSTATE);
104
116
  int postgres_errno = MAKE_SQLSTATE(sql_state[0], sql_state[1], sql_state[2], sql_state[3], sql_state[4]);
117
+ VALUE str = rb_str_new2(sql_state);
105
118
 
106
119
  PQclear(result);
107
120
 
108
- data_objects_raise_error(self, do_postgres_errors, postgres_errno, message, query, rb_str_new2(sql_state));
121
+ data_objects_raise_error(self, do_postgres_errors, postgres_errno, message, query, str);
109
122
  }
110
123
 
111
124
  /* ====== Public API ======= */
@@ -269,12 +282,12 @@ PGresult * do_postgres_cCommand_execute_async(VALUE self, VALUE connection, PGco
269
282
  }
270
283
 
271
284
  int socket_fd = PQsocket(db);
272
- fd_set rset;
285
+ rb_fdset_t rset;
273
286
 
274
287
  while (1) {
275
- FD_ZERO(&rset);
276
- FD_SET(socket_fd, &rset);
277
- retval = rb_thread_select(socket_fd + 1, &rset, NULL, NULL, NULL);
288
+ rb_fd_init(&rset);
289
+ rb_fd_set(socket_fd, &rset);
290
+ retval = rb_thread_fd_select(socket_fd + 1, &rset, NULL, NULL, NULL);
278
291
 
279
292
  if (retval < 0) {
280
293
  rb_sys_fail(0);
@@ -31,7 +31,7 @@ dir_config('pgsql-server', config_value('includedir-server'), config_value('libd
31
31
  dir_config('pgsql-client', config_value('includedir'), config_value('libdir'))
32
32
  dir_config('pgsql-win32') if RUBY_PLATFORM =~ /mswin|mingw/
33
33
 
34
- desired_functions = %w(localtime_r gmtime_r PQsetClientEncoding pg_encoding_to_char PQfreemem)
34
+ desired_functions = %w(localtime_r gmtime_r PQsetClientEncoding pg_encoding_to_char PQfreemem rb_thread_fd_select)
35
35
  compat_functions = %w(PQescapeString PQexecParams)
36
36
 
37
37
  if have_build_env
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  module DataObjects
2
2
  module Postgres
3
- VERSION = '0.10.14'
3
+ VERSION = '0.10.15'
4
4
  end
5
5
  end
data/tasks/compile.rake CHANGED
@@ -70,7 +70,7 @@ begin
70
70
  ext.classpath = '../do_jdbc/lib/do_jdbc_internal.jar'
71
71
  ext.java_compiling do |gem|
72
72
  gem.add_dependency 'jdbc-postgres', '>=8.2'
73
- gem.add_dependency 'do_jdbc', '0.10.14'
73
+ gem.add_dependency 'do_jdbc', '0.10.15'
74
74
  end
75
75
  end
76
76
  rescue LoadError
data/tasks/release.rake CHANGED
@@ -3,7 +3,7 @@ task :build_all do
3
3
  `rake clean`
4
4
  `rake build`
5
5
  `rake java gem`
6
- `rake cross native gem RUBY_CC_VERSION=1.8.7:1.9.3:2.0.0`
6
+ `rake cross native gem RUBY_CC_VERSION=1.8.7:1.9.3:2.0.0:2.1.5:2.2.0`
7
7
  end
8
8
 
9
9
  desc 'Release all gems (native, binaries for JRuby and Windows)'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: do_postgres
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.14
4
+ version: 0.10.15
5
5
  platform: x86-mswin32-60
6
6
  authors:
7
7
  - Dirkjan Bussink
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-13 00:00:00.000000000 Z
11
+ date: 2015-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: data_objects
@@ -16,40 +16,40 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.10.14
19
+ version: 0.10.15
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.10.14
26
+ version: 0.10.15
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '2.5'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake-compiler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0.7'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.7'
55
55
  description: Implements the DataObjects API for PostgreSQL
@@ -73,9 +73,6 @@ files:
73
73
  - ext/do_postgres/extconf.rb
74
74
  - ext/do_postgres/pg_config.h
75
75
  - lib/do_postgres.rb
76
- - lib/do_postgres/1.8/do_postgres.so
77
- - lib/do_postgres/1.9/do_postgres.so
78
- - lib/do_postgres/2.0/do_postgres.so
79
76
  - lib/do_postgres/encoding.rb
80
77
  - lib/do_postgres/transaction.rb
81
78
  - lib/do_postgres/version.rb
@@ -104,6 +101,11 @@ files:
104
101
  - tasks/release.rake
105
102
  - tasks/retrieve.rake
106
103
  - tasks/spec.rake
104
+ - lib/do_postgres/1.8/do_postgres.so
105
+ - lib/do_postgres/1.9/do_postgres.so
106
+ - lib/do_postgres/2.0/do_postgres.so
107
+ - lib/do_postgres/2.1/do_postgres.so
108
+ - lib/do_postgres/2.2/do_postgres.so
107
109
  homepage:
108
110
  licenses: []
109
111
  metadata: {}
@@ -140,17 +142,17 @@ require_paths:
140
142
  - lib
141
143
  required_ruby_version: !ruby/object:Gem::Requirement
142
144
  requirements:
143
- - - ">="
145
+ - - '>='
144
146
  - !ruby/object:Gem::Version
145
147
  version: '0'
146
148
  required_rubygems_version: !ruby/object:Gem::Requirement
147
149
  requirements:
148
- - - ">="
150
+ - - '>='
149
151
  - !ruby/object:Gem::Version
150
152
  version: '0'
151
153
  requirements: []
152
154
  rubyforge_project: dorb
153
- rubygems_version: 2.2.0.preview.1
155
+ rubygems_version: 2.0.14
154
156
  signing_key:
155
157
  specification_version: 3
156
158
  summary: DataObjects PostgreSQL Driver