swift-db-postgres 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/ext/swift/db/postgres/adapter.c +2 -0
- data/ext/swift/db/postgres/extconf.rb +7 -6
- metadata +4 -4
data/CHANGELOG
CHANGED
@@ -396,6 +396,7 @@ VALUE db_postgres_adapter_query(int argc, VALUE *argv, VALUE self) {
|
|
396
396
|
bind_args_fmt = (int *) malloc(sizeof(int) * RARRAY_LEN(bind));
|
397
397
|
bind_args_data = (char **) malloc(sizeof(char *) * RARRAY_LEN(bind));
|
398
398
|
|
399
|
+
rb_gc_register_address(&bind);
|
399
400
|
for (n = 0; n < RARRAY_LEN(bind); n++) {
|
400
401
|
data = rb_ary_entry(bind, n);
|
401
402
|
if (NIL_P(data)) {
|
@@ -418,6 +419,7 @@ VALUE db_postgres_adapter_query(int argc, VALUE *argv, VALUE self) {
|
|
418
419
|
ok = PQsendQueryParams(a->connection, RSTRING_PTR(sql), RARRAY_LEN(bind), 0,
|
419
420
|
(const char* const *)bind_args_data, bind_args_size, bind_args_fmt, 0);
|
420
421
|
|
422
|
+
rb_gc_unregister_address(&bind);
|
421
423
|
free(bind_args_size);
|
422
424
|
free(bind_args_data);
|
423
425
|
free(bind_args_fmt);
|
@@ -22,12 +22,13 @@ lib_paths = %w(
|
|
22
22
|
/sw/lib
|
23
23
|
)
|
24
24
|
|
25
|
-
(
|
26
|
-
|
25
|
+
uuid_inc, uuid_lib = dir_config('uuid', '/usr/include/uuid', '/usr/lib')
|
26
|
+
libpq_inc, libpq_lib = dir_config('postgresql')
|
27
27
|
|
28
|
-
find_header
|
29
|
-
find_header
|
28
|
+
find_header 'uuid/uuid.h', *inc_paths.dup.unshift(uuid_inc).compact
|
29
|
+
find_header 'libpq-fe.h', *inc_paths.dup.unshift(libpq_inc).compact
|
30
|
+
|
31
|
+
find_library 'uuid', 'main', *lib_paths.dup.unshift(uuid_lib).compact
|
32
|
+
find_library 'pq', 'main', *lib_paths.dup.unshift(libpq_lib).compact
|
30
33
|
|
31
|
-
find_library('pq', 'main', *lib_paths) or raise 'unable to locate postgresql lib set SPG_LIBRARY_DIRS'
|
32
|
-
find_library('uuid','main', *lib_paths) or raise 'unable to locate uuid lib set SPG_LIBRARY_DIRS'
|
33
34
|
create_makefile('swift_db_postgres_ext')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swift-db-postgres
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -35,13 +35,13 @@ extensions:
|
|
35
35
|
- ext/swift/db/postgres/extconf.rb
|
36
36
|
extra_rdoc_files: []
|
37
37
|
files:
|
38
|
-
- ext/swift/db/postgres/result.c
|
39
38
|
- ext/swift/db/postgres/datetime.c
|
39
|
+
- ext/swift/db/postgres/result.c
|
40
40
|
- ext/swift/db/postgres/adapter.c
|
41
|
+
- ext/swift/db/postgres/statement.c
|
41
42
|
- ext/swift/db/postgres/typecast.c
|
42
43
|
- ext/swift/db/postgres/common.c
|
43
44
|
- ext/swift/db/postgres/main.c
|
44
|
-
- ext/swift/db/postgres/statement.c
|
45
45
|
- ext/swift/db/postgres/typecast.h
|
46
46
|
- ext/swift/db/postgres/common.h
|
47
47
|
- ext/swift/db/postgres/datetime.h
|