ovirt-engine-sdk 4.4.1 → 4.6.1
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.
- checksums.yaml +4 -4
- data/CHANGES.adoc +21 -3
- data/ext/ovirtsdk4c/ov_http_client.c +33 -23
- data/ext/ovirtsdk4c/ov_http_request.c +5 -5
- data/ext/ovirtsdk4c/ov_http_response.c +5 -5
- data/ext/ovirtsdk4c/ov_http_transfer.c +5 -5
- data/ext/ovirtsdk4c/ov_xml_reader.c +2 -2
- data/ext/ovirtsdk4c/ov_xml_writer.c +2 -2
- data/lib/ovirtsdk4/readers.rb +640 -0
- data/lib/ovirtsdk4/services.rb +2877 -2410
- data/lib/ovirtsdk4/types.rb +2299 -52
- data/lib/ovirtsdk4/version.rb +1 -1
- data/lib/ovirtsdk4/writers.rb +220 -0
- metadata +32 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2a18fa604006bdf2fff1c9c6ae67d53cfc8421aedca0f5a823fbae736b3b17fa
|
|
4
|
+
data.tar.gz: 6353e9cba637cd0e739ecfc525720eedd303cf19c7f1c149cd9f336927a9eae4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8f1b0c3d6a4b006f7536276da729334719c8507b3fddb7ca03675647c73191ef55b2c0b4411996695c13fbfdca6965a571b5bed2124c5514fc17646ff8c0bdfc
|
|
7
|
+
data.tar.gz: 519977ad66626c3ec8a3ca01184cfb966fced85b9399e6f548fd37f47bfc1bc0e5481f710f74f43ac3ea945e17fe4cc6e60f46846edec93f5d122bd029ffd88c
|
data/CHANGES.adoc
CHANGED
|
@@ -2,8 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
This document describes the relevant changes between releases of the SDK.
|
|
4
4
|
|
|
5
|
+
== 4.6.1 / Oct 16 2025
|
|
6
|
+
Upgrade to model 4.6.1 and metamodel 1.3.11
|
|
7
|
+
|
|
8
|
+
New features:
|
|
9
|
+
|
|
10
|
+
* Add support for Ruby 3
|
|
11
|
+
|
|
12
|
+
* Use Weld 3
|
|
13
|
+
|
|
14
|
+
* Build on Java 21
|
|
15
|
+
|
|
16
|
+
== 4.6.0 / Feb 1 2024
|
|
17
|
+
Upgrade to model 4.6.0 and metamodel 1.3.10
|
|
18
|
+
|
|
19
|
+
New features:
|
|
20
|
+
|
|
21
|
+
* Replace rb_cData with rb_cObject, making it compatible with ruby 3.1+
|
|
22
|
+
|
|
5
23
|
== 4.4.1 / Feb 23 2021
|
|
6
|
-
Upgrade to model 4.4.
|
|
24
|
+
Upgrade to model 4.4.26, metamodel 1.3.4
|
|
7
25
|
|
|
8
26
|
* Remove python dependencies from build scripts
|
|
9
27
|
|
|
@@ -26,7 +44,7 @@ Deprecations:
|
|
|
26
44
|
|
|
27
45
|
* packaging: drop fc28, fc29, el7
|
|
28
46
|
|
|
29
|
-
* automation: drop fc28, fc29, el7
|
|
47
|
+
* automation: drop fc28, fc29, el7
|
|
30
48
|
|
|
31
49
|
== 4.3.0 / Jan 16 2018
|
|
32
50
|
Update to model 4.3.21.
|
|
@@ -117,7 +135,7 @@ New features:
|
|
|
117
135
|
|
|
118
136
|
* Add `cancel` action to transfer image session.
|
|
119
137
|
|
|
120
|
-
* Add `export` template as OVA to a given path on a host
|
|
138
|
+
* Add `export` template as OVA to a given path on a host
|
|
121
139
|
https://bugzilla.redhat.com/1526033[#1526033].
|
|
122
140
|
|
|
123
141
|
* Add service to list user groups
|
|
@@ -34,6 +34,9 @@ limitations under the License.
|
|
|
34
34
|
#include "ov_http_response.h"
|
|
35
35
|
#include "ov_http_transfer.h"
|
|
36
36
|
|
|
37
|
+
/* thread.c (export) */
|
|
38
|
+
extern int ruby_thread_has_gvl_p(void);
|
|
39
|
+
|
|
37
40
|
/* Class: */
|
|
38
41
|
VALUE ov_http_client_class;
|
|
39
42
|
|
|
@@ -130,7 +133,7 @@ typedef struct {
|
|
|
130
133
|
|
|
131
134
|
typedef struct {
|
|
132
135
|
CURLM* handle;
|
|
133
|
-
|
|
136
|
+
CURLMcode code;
|
|
134
137
|
bool cancel;
|
|
135
138
|
} ov_http_client_wait_context;
|
|
136
139
|
|
|
@@ -176,7 +179,7 @@ static void ov_http_client_check_closed(ov_http_client_object* object) {
|
|
|
176
179
|
static void ov_http_client_mark(void* vptr) {
|
|
177
180
|
ov_http_client_object* ptr;
|
|
178
181
|
|
|
179
|
-
ptr = vptr;
|
|
182
|
+
ptr = (ov_http_client_object*)vptr;
|
|
180
183
|
rb_gc_mark(ptr->log);
|
|
181
184
|
rb_gc_mark(ptr->queue);
|
|
182
185
|
rb_gc_mark(ptr->pending);
|
|
@@ -187,7 +190,7 @@ static void ov_http_client_free(void* vptr) {
|
|
|
187
190
|
ov_http_client_object* ptr;
|
|
188
191
|
|
|
189
192
|
/* Get the pointer to the object: */
|
|
190
|
-
ptr = vptr;
|
|
193
|
+
ptr = (ov_http_client_object*)vptr;
|
|
191
194
|
|
|
192
195
|
/* Release the resources used by libcurl: */
|
|
193
196
|
if (ptr->handle != NULL) {
|
|
@@ -213,7 +216,7 @@ rb_data_type_t ov_http_client_type = {
|
|
|
213
216
|
.dmark = ov_http_client_mark,
|
|
214
217
|
.dfree = ov_http_client_free,
|
|
215
218
|
.dsize = NULL,
|
|
216
|
-
.reserved = { NULL
|
|
219
|
+
.reserved = { NULL }
|
|
217
220
|
},
|
|
218
221
|
#ifdef RUBY_TYPED_FREE_IMMEDIATELY
|
|
219
222
|
.parent = NULL,
|
|
@@ -384,7 +387,7 @@ static void* ov_http_client_header_task(void* data) {
|
|
|
384
387
|
}
|
|
385
388
|
|
|
386
389
|
/* Parse the header and add it to the response object: */
|
|
387
|
-
pointer = memchr(buffer, ':', length);
|
|
390
|
+
pointer = (char*) memchr(buffer, ':', length);
|
|
388
391
|
if (pointer != NULL) {
|
|
389
392
|
name = rb_str_new(buffer, pointer - buffer);
|
|
390
393
|
name = rb_funcall(name, DOWNCASE_ID, 0);
|
|
@@ -490,12 +493,20 @@ static int ov_http_client_debug_function(CURL* handle, curl_infotype type, char*
|
|
|
490
493
|
/* Get the pointer to the transfer: */
|
|
491
494
|
ov_http_transfer_ptr(transfer, transfer_ptr);
|
|
492
495
|
|
|
493
|
-
/*
|
|
496
|
+
/* The global interpreter lock may be acquired or not, so we need to check and either call the task directly
|
|
497
|
+
or else call it after acquiring the lock. Note that the `ruby_thread_has_gvl_p` function that we use to
|
|
498
|
+
check if the GVL is acquired is marked as experimental, and not defined in `thread.h`, so it may be
|
|
499
|
+
removed at any time, but I didn't find any other way to check if the GVL is acquired. */
|
|
494
500
|
context.client = transfer_ptr->client;
|
|
495
501
|
context.type = type;
|
|
496
502
|
context.data = data;
|
|
497
503
|
context.size = size;
|
|
498
|
-
|
|
504
|
+
if (ruby_thread_has_gvl_p()) {
|
|
505
|
+
ov_http_client_debug_task(&context);
|
|
506
|
+
}
|
|
507
|
+
else {
|
|
508
|
+
rb_thread_call_with_gvl(ov_http_client_debug_task, &context);
|
|
509
|
+
}
|
|
499
510
|
return 0;
|
|
500
511
|
}
|
|
501
512
|
|
|
@@ -728,7 +739,7 @@ static VALUE ov_http_client_build_url( VALUE url, VALUE query) {
|
|
|
728
739
|
if (!NIL_P(query)) {
|
|
729
740
|
Check_Type(query, T_HASH);
|
|
730
741
|
if (RHASH_SIZE(query) > 0) {
|
|
731
|
-
url = rb_sprintf("%"PRIsVALUE"?%"PRIsVALUE"", url, rb_funcall(URI_CLASS, ENCODE_WWW_FORM_ID, 1, query));
|
|
742
|
+
url = rb_sprintf("%" PRIsVALUE "?%" PRIsVALUE "", url, rb_funcall(URI_CLASS, ENCODE_WWW_FORM_ID, 1, query));
|
|
732
743
|
}
|
|
733
744
|
}
|
|
734
745
|
|
|
@@ -738,7 +749,7 @@ static VALUE ov_http_client_build_url( VALUE url, VALUE query) {
|
|
|
738
749
|
static int ov_http_client_add_header(VALUE name, VALUE value, struct curl_slist** headers) {
|
|
739
750
|
VALUE header = Qnil;
|
|
740
751
|
|
|
741
|
-
header = rb_sprintf("%"PRIsVALUE": %"PRIsVALUE"", name, value);
|
|
752
|
+
header = rb_sprintf("%" PRIsVALUE ": %" PRIsVALUE "", name, value);
|
|
742
753
|
*headers = curl_slist_append(*headers, StringValueCStr(header));
|
|
743
754
|
|
|
744
755
|
return ST_CONTINUE;
|
|
@@ -784,7 +795,7 @@ static void* ov_http_client_complete_task(void* data) {
|
|
|
784
795
|
/* Send a summary of the response to the log: */
|
|
785
796
|
ov_http_client_log_info(
|
|
786
797
|
client_ptr->log,
|
|
787
|
-
"Received response code %"PRIsVALUE" for %"PRIsVALUE" request to URL '%"PRIsVALUE"'.",
|
|
798
|
+
"Received response code %" PRIsVALUE " for %" PRIsVALUE " request to URL '%" PRIsVALUE "'.",
|
|
788
799
|
response_ptr->code,
|
|
789
800
|
request_ptr->method,
|
|
790
801
|
request_ptr->url
|
|
@@ -832,7 +843,7 @@ static void* ov_http_client_wait_task(void* data) {
|
|
|
832
843
|
#endif
|
|
833
844
|
|
|
834
845
|
/* The passed data is the wait context: */
|
|
835
|
-
context_ptr = data;
|
|
846
|
+
context_ptr = (ov_http_client_wait_context*) data;
|
|
836
847
|
|
|
837
848
|
/* Get the timeout preferred by libcurl, or one 100 ms by default: */
|
|
838
849
|
curl_multi_timeout(context_ptr->handle, &timeout);
|
|
@@ -843,7 +854,7 @@ static void* ov_http_client_wait_task(void* data) {
|
|
|
843
854
|
#if LIBCURL_VERSION_NUM >= 0x071c00
|
|
844
855
|
/* Wait till there is activity: */
|
|
845
856
|
context_ptr->code = curl_multi_wait(context_ptr->handle, NULL, 0, timeout, NULL);
|
|
846
|
-
if (context_ptr->code !=
|
|
857
|
+
if (context_ptr->code != CURLM_OK) {
|
|
847
858
|
return NULL;
|
|
848
859
|
}
|
|
849
860
|
#else
|
|
@@ -864,7 +875,7 @@ static void* ov_http_client_wait_task(void* data) {
|
|
|
864
875
|
/* Let libcurl do its work, even if no file descriptor needs attention. This is necessary because some of its
|
|
865
876
|
activities can't be monitored using file descriptors. */
|
|
866
877
|
context_ptr->code = curl_multi_perform(context_ptr->handle, &pending);
|
|
867
|
-
if (context_ptr->code !=
|
|
878
|
+
if (context_ptr->code != CURLM_OK) {
|
|
868
879
|
return NULL;
|
|
869
880
|
}
|
|
870
881
|
|
|
@@ -882,7 +893,7 @@ static void* ov_http_client_wait_task(void* data) {
|
|
|
882
893
|
}
|
|
883
894
|
|
|
884
895
|
/* Everything worked correctly: */
|
|
885
|
-
context_ptr->code =
|
|
896
|
+
context_ptr->code = CURLM_OK;
|
|
886
897
|
return NULL;
|
|
887
898
|
}
|
|
888
899
|
|
|
@@ -890,7 +901,7 @@ static void ov_http_client_wait_cancel(void* data) {
|
|
|
890
901
|
ov_http_client_wait_context* context_ptr;
|
|
891
902
|
|
|
892
903
|
/* The passed data is the wait context: */
|
|
893
|
-
context_ptr = data;
|
|
904
|
+
context_ptr = (ov_http_client_wait_context*) data;
|
|
894
905
|
|
|
895
906
|
/* Set the cancel flag so that the operation will be actually aborted in the next operation of the wait loop: */
|
|
896
907
|
context_ptr->cancel = true;
|
|
@@ -972,7 +983,6 @@ static void ov_http_client_prepare_handle(ov_http_client_object* client_ptr, ov_
|
|
|
972
983
|
else if (rb_eql(request_ptr->method, PUT_SYMBOL)) {
|
|
973
984
|
*headers = curl_slist_append(*headers, "Expect:");
|
|
974
985
|
curl_easy_setopt(handle, CURLOPT_UPLOAD, 1L);
|
|
975
|
-
curl_easy_setopt(handle, CURLOPT_PUT, 1L);
|
|
976
986
|
}
|
|
977
987
|
else if (rb_eql(request_ptr->method, DELETE_SYMBOL)) {
|
|
978
988
|
curl_easy_setopt(handle, CURLOPT_HTTPGET, 1L);
|
|
@@ -984,7 +994,7 @@ static void ov_http_client_prepare_handle(ov_http_client_object* client_ptr, ov_
|
|
|
984
994
|
|
|
985
995
|
/* Set authentication details: */
|
|
986
996
|
if (!NIL_P(request_ptr->token)) {
|
|
987
|
-
header = rb_sprintf("Authorization: Bearer %"PRIsVALUE"", request_ptr->token);
|
|
997
|
+
header = rb_sprintf("Authorization: Bearer %" PRIsVALUE "", request_ptr->token);
|
|
988
998
|
*headers = curl_slist_append(*headers, StringValueCStr(header));
|
|
989
999
|
}
|
|
990
1000
|
else if (!NIL_P(request_ptr->username) && !NIL_P(request_ptr->password)) {
|
|
@@ -998,14 +1008,14 @@ static void ov_http_client_prepare_handle(ov_http_client_object* client_ptr, ov_
|
|
|
998
1008
|
|
|
999
1009
|
/* Set the headers: */
|
|
1000
1010
|
if (!NIL_P(request_ptr->headers)) {
|
|
1001
|
-
rb_hash_foreach(request_ptr->headers, ov_http_client_add_header, (VALUE) headers);
|
|
1011
|
+
rb_hash_foreach(request_ptr->headers, (int (*)(VALUE, VALUE, VALUE)) ov_http_client_add_header, (VALUE) headers);
|
|
1002
1012
|
}
|
|
1003
1013
|
curl_easy_setopt(handle, CURLOPT_HTTPHEADER, *headers);
|
|
1004
1014
|
|
|
1005
1015
|
/* Send a summary of the request to the log: */
|
|
1006
1016
|
ov_http_client_log_info(
|
|
1007
1017
|
client_ptr->log,
|
|
1008
|
-
"Sending %"PRIsVALUE" request to URL '%"PRIsVALUE"'.",
|
|
1018
|
+
"Sending %" PRIsVALUE " request to URL '%" PRIsVALUE "'.",
|
|
1009
1019
|
request_ptr->method,
|
|
1010
1020
|
url
|
|
1011
1021
|
);
|
|
@@ -1111,7 +1121,7 @@ static VALUE ov_http_client_wait(VALUE self, VALUE request) {
|
|
|
1111
1121
|
|
|
1112
1122
|
/* Work till the transfer has been completed. */
|
|
1113
1123
|
context.handle = ptr->handle;
|
|
1114
|
-
context.code =
|
|
1124
|
+
context.code = CURLM_OK;
|
|
1115
1125
|
context.cancel = false;
|
|
1116
1126
|
for (;;) {
|
|
1117
1127
|
/* Move requests from the queue to libcurl: */
|
|
@@ -1136,8 +1146,8 @@ static VALUE ov_http_client_wait(VALUE self, VALUE request) {
|
|
|
1136
1146
|
if (context.cancel) {
|
|
1137
1147
|
return Qnil;
|
|
1138
1148
|
}
|
|
1139
|
-
if (context.code !=
|
|
1140
|
-
rb_raise(ov_error_class, "Unexpected error while waiting: %s",
|
|
1149
|
+
if (context.code != CURLM_OK) {
|
|
1150
|
+
rb_raise(ov_error_class, "Unexpected error while waiting: %s", curl_multi_strerror(context.code));
|
|
1141
1151
|
}
|
|
1142
1152
|
}
|
|
1143
1153
|
|
|
@@ -1148,7 +1158,7 @@ static VALUE ov_http_client_inspect(VALUE self) {
|
|
|
1148
1158
|
ov_http_client_object* ptr;
|
|
1149
1159
|
|
|
1150
1160
|
ov_http_client_ptr(self, ptr);
|
|
1151
|
-
return rb_sprintf("#<%"PRIsVALUE":%p>", ov_http_client_class, ptr);
|
|
1161
|
+
return rb_sprintf("#<%" PRIsVALUE ":%p>", ov_http_client_class, ptr);
|
|
1152
1162
|
}
|
|
1153
1163
|
|
|
1154
1164
|
void ov_http_client_define(void) {
|
|
@@ -45,7 +45,7 @@ static VALUE CONNECT_TIMEOUT_SYMBOL;
|
|
|
45
45
|
static void ov_http_request_mark(void* vptr) {
|
|
46
46
|
ov_http_request_object* ptr;
|
|
47
47
|
|
|
48
|
-
ptr = vptr;
|
|
48
|
+
ptr = (ov_http_request_object*)vptr;
|
|
49
49
|
rb_gc_mark(ptr->method);
|
|
50
50
|
rb_gc_mark(ptr->url);
|
|
51
51
|
rb_gc_mark(ptr->query);
|
|
@@ -62,7 +62,7 @@ static void ov_http_request_mark(void* vptr) {
|
|
|
62
62
|
static void ov_http_request_free(void* vptr) {
|
|
63
63
|
ov_http_request_object* ptr;
|
|
64
64
|
|
|
65
|
-
ptr = vptr;
|
|
65
|
+
ptr = (ov_http_request_object*)vptr;
|
|
66
66
|
xfree(ptr);
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -72,7 +72,7 @@ rb_data_type_t ov_http_request_type = {
|
|
|
72
72
|
.dmark = ov_http_request_mark,
|
|
73
73
|
.dfree = ov_http_request_free,
|
|
74
74
|
.dsize = NULL,
|
|
75
|
-
.reserved = { NULL
|
|
75
|
+
.reserved = { NULL }
|
|
76
76
|
},
|
|
77
77
|
#ifdef RUBY_TYPED_FREE_IMMEDIATELY
|
|
78
78
|
.parent = NULL,
|
|
@@ -305,7 +305,7 @@ static VALUE ov_http_request_inspect(VALUE self) {
|
|
|
305
305
|
|
|
306
306
|
ov_http_request_ptr(self, ptr);
|
|
307
307
|
return rb_sprintf(
|
|
308
|
-
"#<%"PRIsVALUE":%"PRIsVALUE" %"PRIsVALUE">",
|
|
308
|
+
"#<%" PRIsVALUE ":%" PRIsVALUE " %" PRIsVALUE ">",
|
|
309
309
|
ov_http_request_class,
|
|
310
310
|
ptr->method,
|
|
311
311
|
ptr->url
|
|
@@ -344,7 +344,7 @@ static VALUE ov_http_request_initialize(int argc, VALUE* argv, VALUE self) {
|
|
|
344
344
|
|
|
345
345
|
void ov_http_request_define(void) {
|
|
346
346
|
/* Define the class: */
|
|
347
|
-
ov_http_request_class = rb_define_class_under(ov_module, "HttpRequest",
|
|
347
|
+
ov_http_request_class = rb_define_class_under(ov_module, "HttpRequest", rb_cObject);
|
|
348
348
|
|
|
349
349
|
/* Define the constructor: */
|
|
350
350
|
rb_define_alloc_func(ov_http_request_class, ov_http_request_alloc);
|
|
@@ -31,7 +31,7 @@ static VALUE MESSAGE_SYMBOL;
|
|
|
31
31
|
static void ov_http_response_mark(void* vptr) {
|
|
32
32
|
ov_http_response_object* ptr;
|
|
33
33
|
|
|
34
|
-
ptr = vptr;
|
|
34
|
+
ptr = (ov_http_response_object*)vptr;
|
|
35
35
|
rb_gc_mark(ptr->body);
|
|
36
36
|
rb_gc_mark(ptr->code);
|
|
37
37
|
rb_gc_mark(ptr->headers);
|
|
@@ -41,7 +41,7 @@ static void ov_http_response_mark(void* vptr) {
|
|
|
41
41
|
static void ov_http_response_free(void* vptr) {
|
|
42
42
|
ov_http_response_object* ptr;
|
|
43
43
|
|
|
44
|
-
ptr = vptr;
|
|
44
|
+
ptr = (ov_http_response_object*)vptr;
|
|
45
45
|
xfree(ptr);
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -51,7 +51,7 @@ rb_data_type_t ov_http_response_type = {
|
|
|
51
51
|
.dmark = ov_http_response_mark,
|
|
52
52
|
.dfree = ov_http_response_free,
|
|
53
53
|
.dsize = NULL,
|
|
54
|
-
.reserved = { NULL
|
|
54
|
+
.reserved = { NULL }
|
|
55
55
|
},
|
|
56
56
|
#ifdef RUBY_TYPED_FREE_IMMEDIATELY
|
|
57
57
|
.parent = NULL,
|
|
@@ -151,7 +151,7 @@ static VALUE ov_http_response_inspect(VALUE self) {
|
|
|
151
151
|
|
|
152
152
|
ov_http_response_ptr(self, ptr);
|
|
153
153
|
return rb_sprintf(
|
|
154
|
-
"#<%"PRIsVALUE":%"PRIsVALUE" %"PRIsVALUE">",
|
|
154
|
+
"#<%" PRIsVALUE ":%" PRIsVALUE " %" PRIsVALUE ">",
|
|
155
155
|
ov_http_response_class,
|
|
156
156
|
ptr->code,
|
|
157
157
|
ptr->message
|
|
@@ -184,7 +184,7 @@ static VALUE ov_http_response_initialize(int argc, VALUE* argv, VALUE self) {
|
|
|
184
184
|
|
|
185
185
|
void ov_http_response_define(void) {
|
|
186
186
|
/* Define the class: */
|
|
187
|
-
ov_http_response_class = rb_define_class_under(ov_module, "HttpResponse",
|
|
187
|
+
ov_http_response_class = rb_define_class_under(ov_module, "HttpResponse", rb_cObject);
|
|
188
188
|
|
|
189
189
|
/* Define the constructor: */
|
|
190
190
|
rb_define_alloc_func(ov_http_response_class, ov_http_response_alloc);
|
|
@@ -27,7 +27,7 @@ VALUE ov_http_transfer_class;
|
|
|
27
27
|
static void ov_http_transfer_mark(void* vptr) {
|
|
28
28
|
ov_http_transfer_object* ptr;
|
|
29
29
|
|
|
30
|
-
ptr = vptr;
|
|
30
|
+
ptr = (ov_http_transfer_object*)vptr;
|
|
31
31
|
rb_gc_mark(ptr->client);
|
|
32
32
|
rb_gc_mark(ptr->request);
|
|
33
33
|
rb_gc_mark(ptr->response);
|
|
@@ -38,7 +38,7 @@ static void ov_http_transfer_mark(void* vptr) {
|
|
|
38
38
|
static void ov_http_transfer_free(void* vptr) {
|
|
39
39
|
ov_http_transfer_object* ptr;
|
|
40
40
|
|
|
41
|
-
ptr = vptr;
|
|
41
|
+
ptr = (ov_http_transfer_object*)vptr;
|
|
42
42
|
xfree(ptr);
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -48,7 +48,7 @@ rb_data_type_t ov_http_transfer_type = {
|
|
|
48
48
|
.dmark = ov_http_transfer_mark,
|
|
49
49
|
.dfree = ov_http_transfer_free,
|
|
50
50
|
.dsize = NULL,
|
|
51
|
-
.reserved = { NULL
|
|
51
|
+
.reserved = { NULL }
|
|
52
52
|
},
|
|
53
53
|
#ifdef RUBY_TYPED_FREE_IMMEDIATELY
|
|
54
54
|
.parent = NULL,
|
|
@@ -75,12 +75,12 @@ static VALUE ov_http_transfer_inspect(VALUE self) {
|
|
|
75
75
|
ov_http_transfer_object* ptr;
|
|
76
76
|
|
|
77
77
|
ov_http_transfer_ptr(self, ptr);
|
|
78
|
-
return rb_sprintf("#<%"PRIsVALUE":%p>", ov_http_transfer_class, ptr);
|
|
78
|
+
return rb_sprintf("#<%" PRIsVALUE ":%p>", ov_http_transfer_class, ptr);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
void ov_http_transfer_define(void) {
|
|
82
82
|
/* Define the class: */
|
|
83
|
-
ov_http_transfer_class = rb_define_class_under(ov_module, "HttpTransfer",
|
|
83
|
+
ov_http_transfer_class = rb_define_class_under(ov_module, "HttpTransfer", rb_cObject);
|
|
84
84
|
|
|
85
85
|
/* Define the constructor: */
|
|
86
86
|
rb_define_alloc_func(ov_http_transfer_class, ov_http_transfer_alloc);
|
|
@@ -72,7 +72,7 @@ rb_data_type_t ov_xml_reader_type = {
|
|
|
72
72
|
.dmark = ov_xml_reader_mark,
|
|
73
73
|
.dfree = ov_xml_reader_free,
|
|
74
74
|
.dsize = NULL,
|
|
75
|
-
.reserved = { NULL
|
|
75
|
+
.reserved = { NULL }
|
|
76
76
|
},
|
|
77
77
|
#ifdef RUBY_TYPED_FREE_IMMEDIATELY
|
|
78
78
|
.parent = NULL,
|
|
@@ -430,7 +430,7 @@ void ov_xml_reader_define(void) {
|
|
|
430
430
|
rb_require("stringio");
|
|
431
431
|
|
|
432
432
|
/* Define the class: */
|
|
433
|
-
ov_xml_reader_class = rb_define_class_under(ov_module, "XmlReader",
|
|
433
|
+
ov_xml_reader_class = rb_define_class_under(ov_module, "XmlReader", rb_cObject);
|
|
434
434
|
|
|
435
435
|
/* Define the constructor: */
|
|
436
436
|
rb_define_alloc_func(ov_xml_reader_class, ov_xml_reader_alloc);
|
|
@@ -66,7 +66,7 @@ rb_data_type_t ov_xml_writer_type = {
|
|
|
66
66
|
.dmark = ov_xml_writer_mark,
|
|
67
67
|
.dfree = ov_xml_writer_free,
|
|
68
68
|
.dsize = NULL,
|
|
69
|
-
.reserved = { NULL
|
|
69
|
+
.reserved = { NULL }
|
|
70
70
|
},
|
|
71
71
|
#ifdef RUBY_TYPED_FREE_IMMEDIATELY
|
|
72
72
|
.parent = NULL,
|
|
@@ -181,7 +181,7 @@ static VALUE ov_xml_writer_string(VALUE self) {
|
|
|
181
181
|
if (rc < 0) {
|
|
182
182
|
rb_raise(ov_error_class, "Can't flush XML writer");
|
|
183
183
|
}
|
|
184
|
-
return rb_funcall(ptr->io, STRING_ID, 0,
|
|
184
|
+
return rb_funcall(ptr->io, STRING_ID, 0, Qnil);
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
static VALUE ov_xml_writer_write_start(VALUE self, VALUE name) {
|