rdo-postgres 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +1 -0
- data/ext/rdo_postgres/macros.h +4 -14
- data/lib/rdo/postgres/version.rb +1 -1
- data/spec/postgres/array/float_spec.rb +2 -1
- metadata +1 -1
data/.travis.yml
CHANGED
data/ext/rdo_postgres/macros.h
CHANGED
@@ -52,18 +52,6 @@
|
|
52
52
|
#define RDO_RESULT(tuples, info) \
|
53
53
|
(rb_funcall(rb_path2class("RDO::Result"), rb_intern("new"), 2, tuples, info))
|
54
54
|
|
55
|
-
/**
|
56
|
-
* Wrap the given StatementExecutor in a RDO::Statement.
|
57
|
-
*
|
58
|
-
* @param VALUE
|
59
|
-
* any object that responds to #command and #execute
|
60
|
-
*
|
61
|
-
* @return VALUE
|
62
|
-
* an RDO::Statement
|
63
|
-
*/
|
64
|
-
#define RDO_STATEMENT(executor) \
|
65
|
-
(rb_funcall(rb_path2class("RDO::Statement"), rb_intern("new"), 1, executor))
|
66
|
-
|
67
55
|
/**
|
68
56
|
* Convert a C string to a ruby String.
|
69
57
|
*
|
@@ -77,7 +65,8 @@
|
|
77
65
|
* a Ruby String
|
78
66
|
*/
|
79
67
|
#define RDO_STRING(s, len, enc) \
|
80
|
-
(rb_enc_associate_index(rb_str_new(s, len),
|
68
|
+
(rb_enc_associate_index(rb_str_new(s, len), \
|
69
|
+
enc > 0 ? enc : rb_enc_find_index("binary")))
|
81
70
|
|
82
71
|
/**
|
83
72
|
* Convert a C string to a ruby String, assuming possible NULL bytes.
|
@@ -91,7 +80,8 @@
|
|
91
80
|
* @return VALUE (String)
|
92
81
|
* a Ruby String
|
93
82
|
*/
|
94
|
-
#define RDO_BINARY_STRING(s, len)
|
83
|
+
#define RDO_BINARY_STRING(s, len) \
|
84
|
+
(RDO_STRING(s, len, rb_enc_find_index("binary")))
|
95
85
|
|
96
86
|
/**
|
97
87
|
* Convert a C string to a Fixnum.
|
data/lib/rdo/postgres/version.rb
CHANGED