pgsql 1.3 → 1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MTM2YjZhYjdkMzM5ZDdjYTAyZmJjOTMzYTM3NTFiY2M0Y2Y0ZWI1ZA==
5
- data.tar.gz: !binary |-
6
- YWVlZTViMjA4YmYwYzg2MjVlYWYwNjdjNTA1N2ExMmRlMDU5MTY3MA==
2
+ SHA256:
3
+ metadata.gz: cd9c6d654678f0a738b6607d7f9fb8edc562d7634a099c5d246105d24bd8c5ee
4
+ data.tar.gz: d6430b794796c7d6fd068b40084d01dac66469149a5c54ac3b5b8477daaaafa3
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- OWY0NWYwYzA0ZjZkZWFjYjkwMGNhOGFiZmQ3M2U5ZWRmZjY3ODc4NjRkNzhl
10
- MDg2YzdlMmVkZDAzZjZiY2RmOWFkNTgyZTFjNzQxMTM1ZjRhN2ExNmU4OWEx
11
- MmQzZTAwOGI4NGNkZmNhNDQyMGNhM2Y3Yjg0ODNlNDQxODFmNTg=
12
- data.tar.gz: !binary |-
13
- YTc3ZWJkMDg0MWUwYjdhZDdkMGViMDM5MzE5YmU2MGVmZTBkYTNlMGIwNWZh
14
- YzQwN2Y4ZjQ0ZjE2Yjk4OWI1OTFmMzY4NGVjNmY5NDk2MjIzYTIyMzc5MWI0
15
- ODFiNTRjMjBkN2YxNDljN2FlYWJmOWUzMDQwMDE1ODAyYWQyZGY=
6
+ metadata.gz: 92df57a64ecd2bf7a09f28f2de2f0403b215d19883f259cf0c275fd2f8df9aa7fbdd853ef63b11ee658fd960a475b5c9352f93ab8a9a29fc4b600d84619b41d3
7
+ data.tar.gz: 987b07b360cd45b8e112f12a4240b6269554758904cb2076a9574afb03448311a44da6deffd0177b18202b6f1ce2135a4ecac08ac529accbd7435ca352a37243
data/LICENSE CHANGED
@@ -6,7 +6,7 @@
6
6
  |_| |___/ |_|
7
7
 
8
8
 
9
- Copyright (c) 2011-2013, Bertram Scharpf <software@bertram-scharpf.de>.
9
+ Copyright (C) 2011-2019, Bertram Scharpf <software@bertram-scharpf.de>.
10
10
  All rights reserved.
11
11
 
12
12
  Redistribution and use in source and binary forms, with or without
data/lib/conn.c CHANGED
@@ -5,6 +5,8 @@
5
5
 
6
6
  #include "conn.h"
7
7
 
8
+ #include "conn_quote.h"
9
+ #include "conn_exec.h"
8
10
 
9
11
  #if defined( HAVE_HEADER_ST_H)
10
12
  #include <st.h>
@@ -454,7 +456,7 @@ pgconn_set_client_encoding( VALUE self, VALUE str)
454
456
  {
455
457
  StringValue( str);
456
458
  if ((PQsetClientEncoding( get_pgconn( self)->conn, RSTRING_PTR( str))) == -1)
457
- rb_raise( rb_ePgError, "Invalid encoding name %s", str);
459
+ rb_raise( rb_ePgError, "Invalid encoding name %s", RSTRING_PTR( str));
458
460
  return Qnil;
459
461
  }
460
462
 
@@ -491,6 +493,8 @@ pgconn_set_externalenc( VALUE self, VALUE enc)
491
493
  e = NIL_P( enc) ? rb_to_encoding( enc) : rb_default_external_encoding();
492
494
  Data_Get_Struct( self, struct pgconn_data, c);
493
495
  c->external = rb_enc_from_encoding( e);
496
+
497
+ return Qnil;
494
498
  }
495
499
 
496
500
  /*
@@ -523,6 +527,8 @@ pgconn_set_internalenc( VALUE self, VALUE enc)
523
527
  e = NIL_P( enc) ? rb_to_encoding( enc) : rb_default_internal_encoding();
524
528
  Data_Get_Struct( self, struct pgconn_data, c);
525
529
  c->internal = rb_enc_from_encoding( e);
530
+
531
+ return Qnil;
526
532
  }
527
533
 
528
534
  #endif
@@ -69,7 +69,7 @@ static ID id_to_a;
69
69
  void
70
70
  pg_raise_connexec( struct pgconn_data *c)
71
71
  {
72
- rb_raise( rb_ePgConnExec, PQerrorMessage( c->conn));
72
+ rb_raise( rb_ePgConnExec, "%s", PQerrorMessage( c->conn));
73
73
  }
74
74
 
75
75
 
@@ -144,7 +144,7 @@ params_to_strings( VALUE conn, VALUE params, int *len)
144
144
 
145
145
  q = pgconn_destring( c, pgconn_stringize( conn, *ptr), &n);
146
146
  a = ALLOC_N( char, n + 1);
147
- for (p = a; *p = n ? *q : '\0'; ++p, ++q, --n)
147
+ for (p = a; (*p = n ? *q : '\0'); ++p, ++q, --n)
148
148
  ;
149
149
  *v = a;
150
150
  }
@@ -55,7 +55,7 @@ static VALUE pg_escape_regex;
55
55
  VALUE
56
56
  pg_currency_class( void)
57
57
  {
58
- if (NIL_P( rb_cCurrency) && id_currency) {
58
+ if (id_currency && NIL_P( rb_cCurrency)) {
59
59
  if (rb_const_defined( rb_cObject, id_currency))
60
60
  rb_cCurrency = rb_const_get( rb_cObject, id_currency);
61
61
  id_currency = 0;
@@ -121,7 +121,7 @@ VALUE
121
121
  pgconn_escape_bytea( VALUE self, VALUE str)
122
122
  {
123
123
  unsigned char *s;
124
- int l;
124
+ size_t l;
125
125
  VALUE ret;
126
126
 
127
127
  if (NIL_P( str))
@@ -453,7 +453,9 @@ gsub_escape_i( VALUE c, VALUE arg)
453
453
  * Call Pg::Conn#escape_bytea first if you want to tell your string is a byte
454
454
  * array and the quote that result.
455
455
  */
456
- VALUE pgconn_quote( VALUE self, VALUE obj) { VALUE o, res;
456
+ VALUE pgconn_quote( VALUE self, VALUE obj)
457
+ {
458
+ VALUE o, res;
457
459
 
458
460
  o = rb_funcall( self, id_format, 1, obj);
459
461
  if (!NIL_P( o))
@@ -5,9 +5,10 @@
5
5
  #include "module.h"
6
6
 
7
7
  #include "conn.h"
8
+ #include "result.h"
8
9
 
9
10
 
10
- #define PGSQL_VERSION "1.3"
11
+ #define PGSQL_VERSION "1.4"
11
12
 
12
13
 
13
14
  VALUE rb_mPg;
@@ -280,8 +280,8 @@ pgresult_clear( VALUE self)
280
280
 
281
281
  Data_Get_Struct( self, struct pgresult_data, r);
282
282
  if (r->res != NULL) {
283
- PQclear( r->res);
284
- r->res = NULL;
283
+ PQclear( r->res);
284
+ r->res = NULL;
285
285
  }
286
286
  return Qnil;
287
287
  }
@@ -513,7 +513,7 @@ pg_fetchrow( struct pgresult_data *r, int num)
513
513
  n = PQnfields( r->res);
514
514
  if (num < PQntuples( r->res)) {
515
515
  row = rb_ary_new2( n);
516
- for (i = 0, n; n; ++i, --n)
516
+ for (i = 0; n; ++i, --n)
517
517
  rb_ary_store( row, i, pg_fetchresult( r, num, i));
518
518
  } else
519
519
  row = Qnil;
metadata CHANGED
@@ -1,38 +1,34 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgsql
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.3'
4
+ version: '1.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bertram Scharpf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-29 00:00:00.000000000 Z
11
+ date: 2019-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: autorake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.0'
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
26
  version: '2.0'
27
- description: ! 'This is not the official PostgreSQL library that was originally written
28
- by Guy
29
-
30
- Decoux. As the project wasn''t maintained a long time after Guy''s decease, I
31
-
27
+ description: |
28
+ This is not the official PostgreSQL library that was originally written by Guy
29
+ Decoux. As the project wasn't maintained a long time after Guy's decease, I
32
30
  decided to fork my own project.
33
-
34
- '
35
- email: <software@bertram-scharpf.de>
31
+ email: "<software@bertram-scharpf.de>"
36
32
  executables: []
37
33
  extensions:
38
34
  - lib/mkrf_conf
@@ -40,46 +36,46 @@ extra_rdoc_files:
40
36
  - README
41
37
  - LICENSE
42
38
  files:
39
+ - LICENSE
40
+ - README
43
41
  - lib/Rakefile
44
- - lib/mkrf_conf
45
- - lib/undef.h
46
- - lib/module.h
47
- - lib/module.c
48
- - lib/conn.h
49
42
  - lib/conn.c
50
- - lib/conn_quote.h
51
- - lib/conn_quote.c
52
- - lib/conn_exec.h
43
+ - lib/conn.h
53
44
  - lib/conn_exec.c
54
- - lib/result.h
45
+ - lib/conn_exec.h
46
+ - lib/conn_quote.c
47
+ - lib/conn_quote.h
48
+ - lib/mkrf_conf
49
+ - lib/module.c
50
+ - lib/module.h
55
51
  - lib/result.c
56
- - README
57
- - LICENSE
52
+ - lib/result.h
53
+ - lib/undef.h
58
54
  homepage: http://www.bertram-scharpf.de/software/pgsql
59
- licenses: []
55
+ licenses:
56
+ - BSD-2-Clause
60
57
  metadata: {}
61
58
  post_install_message:
62
59
  rdoc_options:
63
- - --charset
60
+ - "--charset"
64
61
  - utf-8
65
- - --main
62
+ - "--main"
66
63
  - README
67
64
  require_paths:
68
65
  - lib
69
66
  required_ruby_version: !ruby/object:Gem::Requirement
70
67
  requirements:
71
- - - ! '>='
68
+ - - ">="
72
69
  - !ruby/object:Gem::Version
73
70
  version: '0'
74
71
  required_rubygems_version: !ruby/object:Gem::Requirement
75
72
  requirements:
76
- - - ! '>='
73
+ - - ">="
77
74
  - !ruby/object:Gem::Version
78
75
  version: '0'
79
76
  requirements:
80
77
  - PostgreSQL
81
- rubyforge_project: NONE
82
- rubygems_version: 2.1.11
78
+ rubygems_version: 3.0.6
83
79
  signing_key:
84
80
  specification_version: 4
85
81
  summary: PostgreSQL-API for Ruby