soup-ruby 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/soup/soup.c +77 -72
- data/lib/soup/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73302d6ab8b6f33bebf9b25d87c776ccf1156aa9
|
4
|
+
data.tar.gz: 0155e9c16389f80950d5a74b3a40954f43bb53e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5d46927c2fca5048055d0be28d03b0b13730618f8de0343d986d711f1cb095aed285e7bbc1d5fddfe084146064f826980c3023722f3a8b2c511a5e6b6d9a17f
|
7
|
+
data.tar.gz: 144dd4d2b579b6b5a54e2918f892e22e77e85825ff2df2be2cc57277651841d60f8587350d8da8d7bb84fde9c63d148c6b1ffe4c0b81949c7e6f7eb356b4831f
|
data/ext/soup/soup.c
CHANGED
@@ -1,9 +1,14 @@
|
|
1
1
|
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
2
|
-
/* Includes */
|
3
|
-
#include <ruby.h>
|
4
|
-
#include <stdlib.h>
|
5
|
-
#include <stdio.h>
|
6
|
-
#include <string.h>
|
2
|
+
/* Includes */
|
3
|
+
#include <ruby.h>
|
4
|
+
#include <stdlib.h>
|
5
|
+
#include <stdio.h>
|
6
|
+
#include <string.h>
|
7
|
+
#if defined GCC
|
8
|
+
#define OPTIONAL_ATTR __attribute__((unused))
|
9
|
+
#else
|
10
|
+
#define OPTIONAL_ATTR
|
11
|
+
#endif
|
7
12
|
#include "libsoup/soup.h"
|
8
13
|
|
9
14
|
/* Setup types */
|
@@ -33,23 +38,23 @@ RUBY_GTK2_VAR VALUE mGdk;
|
|
33
38
|
static VALUE mSoup;
|
34
39
|
static VALUE cSession;
|
35
40
|
static VALUE
|
36
|
-
Session_queue(VALUE self, VALUE __v_message);
|
41
|
+
Session_queue(VALUE self OPTIONAL_ATTR , VALUE __v_message OPTIONAL_ATTR);
|
37
42
|
static VALUE
|
38
|
-
Session_send(VALUE self, VALUE __v_msg);
|
43
|
+
Session_send(VALUE self OPTIONAL_ATTR , VALUE __v_msg OPTIONAL_ATTR);
|
39
44
|
static VALUE
|
40
|
-
Session_pause(VALUE self, VALUE __v_msg);
|
45
|
+
Session_pause(VALUE self OPTIONAL_ATTR , VALUE __v_msg OPTIONAL_ATTR);
|
41
46
|
static VALUE
|
42
|
-
Session_unpause(VALUE self, VALUE __v_msg);
|
47
|
+
Session_unpause(VALUE self OPTIONAL_ATTR , VALUE __v_msg OPTIONAL_ATTR);
|
43
48
|
static VALUE
|
44
|
-
Session_abort(VALUE self);
|
49
|
+
Session_abort(VALUE self OPTIONAL_ATTR );
|
45
50
|
static VALUE cSessionAsync;
|
46
51
|
static VALUE
|
47
|
-
SessionAsync_initialize(VALUE self);
|
52
|
+
SessionAsync_initialize(VALUE self OPTIONAL_ATTR );
|
48
53
|
static VALUE cURI;
|
49
54
|
static VALUE
|
50
|
-
URI_initialize(VALUE self, VALUE __v_uri_string);
|
55
|
+
URI_initialize(VALUE self OPTIONAL_ATTR , VALUE __v_uri_string OPTIONAL_ATTR);
|
51
56
|
static VALUE
|
52
|
-
URI_to_s(VALUE self);
|
57
|
+
URI_to_s(VALUE self OPTIONAL_ATTR );
|
53
58
|
static VALUE flagsMessageFlags;
|
54
59
|
|
55
60
|
static VALUE flagsBaseClass;
|
@@ -273,31 +278,31 @@ static VALUE flags_MessageFlags_to_ruby(int value) { switch(value) {
|
|
273
278
|
static int flags_ruby_to_MessageFlags(VALUE val) { return flags_value_to_int(val, flagsMessageFlags); }
|
274
279
|
static VALUE cMessage;
|
275
280
|
static VALUE
|
276
|
-
Message_initialize(VALUE self, VALUE __v_method, VALUE __v_uri);
|
281
|
+
Message_initialize(VALUE self OPTIONAL_ATTR , VALUE __v_method OPTIONAL_ATTR, VALUE __v_uri OPTIONAL_ATTR);
|
277
282
|
static VALUE
|
278
|
-
Message_set_request_header(VALUE self, VALUE __v_name, VALUE __v_value);
|
283
|
+
Message_set_request_header(VALUE self OPTIONAL_ATTR , VALUE __v_name OPTIONAL_ATTR, VALUE __v_value OPTIONAL_ATTR);
|
279
284
|
static VALUE
|
280
|
-
Message_unset_request_header(VALUE self, VALUE __v_name);
|
285
|
+
Message_unset_request_header(VALUE self OPTIONAL_ATTR , VALUE __v_name OPTIONAL_ATTR);
|
281
286
|
static VALUE
|
282
|
-
Message_set_request_body(VALUE self, VALUE __v_type, VALUE body);
|
287
|
+
Message_set_request_body(VALUE self OPTIONAL_ATTR , VALUE __v_type OPTIONAL_ATTR, VALUE body OPTIONAL_ATTR);
|
283
288
|
static VALUE
|
284
|
-
Message_set_response(VALUE self, VALUE __v_content_type, VALUE body);
|
289
|
+
Message_set_response(VALUE self OPTIONAL_ATTR , VALUE __v_content_type OPTIONAL_ATTR, VALUE body OPTIONAL_ATTR);
|
285
290
|
static VALUE
|
286
291
|
Message_set_status(int __p_argc, VALUE *__p_argv, VALUE self);
|
287
292
|
static VALUE
|
288
|
-
Message_set_redirect(VALUE self, VALUE __v_status_code, VALUE __v_redirect_uri);
|
293
|
+
Message_set_redirect(VALUE self OPTIONAL_ATTR , VALUE __v_status_code OPTIONAL_ATTR, VALUE __v_redirect_uri OPTIONAL_ATTR);
|
289
294
|
static VALUE
|
290
|
-
Message_is_keepalive_query(VALUE self);
|
295
|
+
Message_is_keepalive_query(VALUE self OPTIONAL_ATTR );
|
291
296
|
static VALUE
|
292
|
-
Message_flags_equals(VALUE self, VALUE __v_flags);
|
297
|
+
Message_flags_equals(VALUE self OPTIONAL_ATTR , VALUE __v_flags OPTIONAL_ATTR);
|
293
298
|
static VALUE
|
294
|
-
Message_flags(VALUE self);
|
299
|
+
Message_flags(VALUE self OPTIONAL_ATTR );
|
295
300
|
static VALUE
|
296
|
-
Message_get_response_header(VALUE self, VALUE __v_name);
|
301
|
+
Message_get_response_header(VALUE self OPTIONAL_ATTR , VALUE __v_name OPTIONAL_ATTR);
|
297
302
|
static VALUE
|
298
|
-
Message_each_response_header(VALUE self);
|
303
|
+
Message_each_response_header(VALUE self OPTIONAL_ATTR );
|
299
304
|
static VALUE
|
300
|
-
Message_response_body(VALUE self);
|
305
|
+
Message_response_body(VALUE self OPTIONAL_ATTR );
|
301
306
|
static VALUE _gcpool_RubyFunc = Qnil;
|
302
307
|
static void __gcpool_RubyFunc_add(VALUE val);
|
303
308
|
static void __gcpool_RubyFunc_del(VALUE val);
|
@@ -344,13 +349,13 @@ static void each_header(const char *name, const char *value, gpointer user_data)
|
|
344
349
|
|
345
350
|
/* Code */
|
346
351
|
static VALUE
|
347
|
-
Session_queue(VALUE self, VALUE __v_message)
|
352
|
+
Session_queue(VALUE self OPTIONAL_ATTR , VALUE __v_message OPTIONAL_ATTR)
|
348
353
|
{
|
349
354
|
SoupMessage * message; SoupMessage * __orig_message;
|
350
355
|
SoupSession *_self = ((SoupSession*)RVAL2GOBJ(self));
|
351
356
|
__orig_message = message = RVAL2GOBJ(__v_message);
|
352
357
|
|
353
|
-
#line 52 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
358
|
+
#line 52 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
354
359
|
|
355
360
|
do {
|
356
361
|
if (rb_block_given_p()) { VALUE block =
|
@@ -366,106 +371,106 @@ Session_queue(VALUE self, VALUE __v_message)
|
|
366
371
|
}
|
367
372
|
|
368
373
|
static VALUE
|
369
|
-
Session_send(VALUE self, VALUE __v_msg)
|
374
|
+
Session_send(VALUE self OPTIONAL_ATTR , VALUE __v_msg OPTIONAL_ATTR)
|
370
375
|
{
|
371
|
-
VALUE __p_retval = Qnil;
|
376
|
+
VALUE __p_retval OPTIONAL_ATTR = Qnil;
|
372
377
|
SoupMessage * msg; SoupMessage * __orig_msg;
|
373
378
|
SoupSession *_self = ((SoupSession*)RVAL2GOBJ(self));
|
374
379
|
__orig_msg = msg = RVAL2GOBJ(__v_msg);
|
375
380
|
|
376
|
-
#line 62 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
381
|
+
#line 62 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
377
382
|
do { __p_retval = UINT2NUM(soup_session_send_message(_self, msg)); goto out; } while(0);
|
378
383
|
out:
|
379
384
|
return __p_retval;
|
380
385
|
}
|
381
386
|
|
382
387
|
static VALUE
|
383
|
-
Session_pause(VALUE self, VALUE __v_msg)
|
388
|
+
Session_pause(VALUE self OPTIONAL_ATTR , VALUE __v_msg OPTIONAL_ATTR)
|
384
389
|
{
|
385
390
|
SoupMessage * msg; SoupMessage * __orig_msg;
|
386
391
|
SoupSession *_self = ((SoupSession*)RVAL2GOBJ(self));
|
387
392
|
__orig_msg = msg = RVAL2GOBJ(__v_msg);
|
388
393
|
|
389
|
-
#line 66 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
394
|
+
#line 66 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
390
395
|
soup_session_pause_message(_self, msg);
|
391
396
|
|
392
397
|
return Qnil;
|
393
398
|
}
|
394
399
|
|
395
400
|
static VALUE
|
396
|
-
Session_unpause(VALUE self, VALUE __v_msg)
|
401
|
+
Session_unpause(VALUE self OPTIONAL_ATTR , VALUE __v_msg OPTIONAL_ATTR)
|
397
402
|
{
|
398
403
|
SoupMessage * msg; SoupMessage * __orig_msg;
|
399
404
|
SoupSession *_self = ((SoupSession*)RVAL2GOBJ(self));
|
400
405
|
__orig_msg = msg = RVAL2GOBJ(__v_msg);
|
401
406
|
|
402
|
-
#line 70 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
407
|
+
#line 70 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
403
408
|
soup_session_unpause_message(_self, msg);
|
404
409
|
|
405
410
|
return Qnil;
|
406
411
|
}
|
407
412
|
|
408
413
|
static VALUE
|
409
|
-
Session_abort(VALUE self)
|
414
|
+
Session_abort(VALUE self OPTIONAL_ATTR )
|
410
415
|
{
|
411
416
|
SoupSession *_self = ((SoupSession*)RVAL2GOBJ(self));
|
412
417
|
|
413
|
-
#line 74 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
418
|
+
#line 74 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
414
419
|
soup_session_abort(_self);
|
415
420
|
|
416
421
|
return Qnil;
|
417
422
|
}
|
418
423
|
|
419
424
|
static VALUE
|
420
|
-
SessionAsync_initialize(VALUE self)
|
425
|
+
SessionAsync_initialize(VALUE self OPTIONAL_ATTR )
|
421
426
|
{
|
422
427
|
|
423
|
-
#line 81 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
428
|
+
#line 81 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
424
429
|
INIT(self, soup_session_async_new());
|
425
430
|
|
426
431
|
return Qnil;
|
427
432
|
}
|
428
433
|
|
429
434
|
static VALUE
|
430
|
-
URI_initialize(VALUE self, VALUE __v_uri_string)
|
435
|
+
URI_initialize(VALUE self OPTIONAL_ATTR , VALUE __v_uri_string OPTIONAL_ATTR)
|
431
436
|
{
|
432
437
|
char * uri_string; char * __orig_uri_string;
|
433
438
|
__orig_uri_string = uri_string = ( NIL_P(__v_uri_string) ? NULL : StringValuePtr(__v_uri_string) );
|
434
439
|
|
435
|
-
#line 88 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
440
|
+
#line 88 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
436
441
|
INIT(self, soup_uri_new(uri_string));
|
437
442
|
|
438
443
|
return Qnil;
|
439
444
|
}
|
440
445
|
|
441
446
|
static VALUE
|
442
|
-
URI_to_s(VALUE self)
|
447
|
+
URI_to_s(VALUE self OPTIONAL_ATTR )
|
443
448
|
{
|
444
|
-
VALUE __p_retval = Qnil;
|
449
|
+
VALUE __p_retval OPTIONAL_ATTR = Qnil;
|
445
450
|
SoupURI * _self = ((SoupURI *)RVAL2BOXED(self, SOUP_TYPE_URI));
|
446
451
|
|
447
|
-
#line 91 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
452
|
+
#line 91 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
448
453
|
do { __p_retval = rb_str_new2(soup_uri_to_string(_self, FALSE)); goto out; } while(0);
|
449
454
|
out:
|
450
455
|
return __p_retval;
|
451
456
|
}
|
452
457
|
|
453
458
|
static VALUE
|
454
|
-
Message_initialize(VALUE self, VALUE __v_method, VALUE __v_uri)
|
459
|
+
Message_initialize(VALUE self OPTIONAL_ATTR , VALUE __v_method OPTIONAL_ATTR, VALUE __v_uri OPTIONAL_ATTR)
|
455
460
|
{
|
456
461
|
char * method; char * __orig_method;
|
457
462
|
char * uri; char * __orig_uri;
|
458
463
|
__orig_method = method = ( NIL_P(__v_method) ? NULL : StringValuePtr(__v_method) );
|
459
464
|
__orig_uri = uri = ( NIL_P(__v_uri) ? NULL : StringValuePtr(__v_uri) );
|
460
465
|
|
461
|
-
#line 100 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
466
|
+
#line 100 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
462
467
|
INIT(self, soup_message_new(method, uri));
|
463
468
|
|
464
469
|
return Qnil;
|
465
470
|
}
|
466
471
|
|
467
472
|
static VALUE
|
468
|
-
Message_set_request_header(VALUE self, VALUE __v_name, VALUE __v_value)
|
473
|
+
Message_set_request_header(VALUE self OPTIONAL_ATTR , VALUE __v_name OPTIONAL_ATTR, VALUE __v_value OPTIONAL_ATTR)
|
469
474
|
{
|
470
475
|
char * name; char * __orig_name;
|
471
476
|
char * value; char * __orig_value;
|
@@ -473,48 +478,48 @@ Message_set_request_header(VALUE self, VALUE __v_name, VALUE __v_value)
|
|
473
478
|
__orig_name = name = ( NIL_P(__v_name) ? NULL : StringValuePtr(__v_name) );
|
474
479
|
__orig_value = value = ( NIL_P(__v_value) ? NULL : StringValuePtr(__v_value) );
|
475
480
|
|
476
|
-
#line 104 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
481
|
+
#line 104 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
477
482
|
soup_message_headers_replace(_self->request_headers, name, value);
|
478
483
|
|
479
484
|
return self;
|
480
485
|
}
|
481
486
|
|
482
487
|
static VALUE
|
483
|
-
Message_unset_request_header(VALUE self, VALUE __v_name)
|
488
|
+
Message_unset_request_header(VALUE self OPTIONAL_ATTR , VALUE __v_name OPTIONAL_ATTR)
|
484
489
|
{
|
485
490
|
char * name; char * __orig_name;
|
486
491
|
SoupMessage *_self = ((SoupMessage*)RVAL2GOBJ(self));
|
487
492
|
__orig_name = name = ( NIL_P(__v_name) ? NULL : StringValuePtr(__v_name) );
|
488
493
|
|
489
|
-
#line 108 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
494
|
+
#line 108 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
490
495
|
soup_message_headers_remove(_self->request_headers, name);
|
491
496
|
|
492
497
|
return Qnil;
|
493
498
|
}
|
494
499
|
|
495
500
|
static VALUE
|
496
|
-
Message_set_request_body(VALUE self, VALUE __v_type, VALUE body)
|
501
|
+
Message_set_request_body(VALUE self OPTIONAL_ATTR , VALUE __v_type OPTIONAL_ATTR, VALUE body OPTIONAL_ATTR)
|
497
502
|
{
|
498
503
|
char * type; char * __orig_type;
|
499
504
|
SoupMessage *_self = ((SoupMessage*)RVAL2GOBJ(self));
|
500
505
|
__orig_type = type = ( NIL_P(__v_type) ? NULL : StringValuePtr(__v_type) );
|
501
506
|
Check_Type(body, T_STRING);
|
502
507
|
|
503
|
-
#line 112 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
508
|
+
#line 112 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
504
509
|
soup_message_set_request(_self, type, SOUP_MEMORY_COPY, RSTRING_PTR(body), RSTRING_LEN(body));
|
505
510
|
|
506
511
|
return self;
|
507
512
|
}
|
508
513
|
|
509
514
|
static VALUE
|
510
|
-
Message_set_response(VALUE self, VALUE __v_content_type, VALUE body)
|
515
|
+
Message_set_response(VALUE self OPTIONAL_ATTR , VALUE __v_content_type OPTIONAL_ATTR, VALUE body OPTIONAL_ATTR)
|
511
516
|
{
|
512
517
|
char * content_type; char * __orig_content_type;
|
513
518
|
SoupMessage *_self = ((SoupMessage*)RVAL2GOBJ(self));
|
514
519
|
__orig_content_type = content_type = ( NIL_P(__v_content_type) ? NULL : StringValuePtr(__v_content_type) );
|
515
520
|
Check_Type(body, T_STRING);
|
516
521
|
|
517
|
-
#line 116 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
522
|
+
#line 116 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
518
523
|
soup_message_set_response(_self, content_type, SOUP_MEMORY_COPY, RSTRING_PTR(body), RSTRING_LEN(body));
|
519
524
|
|
520
525
|
return self;
|
@@ -541,7 +546,7 @@ Message_set_status(int __p_argc, VALUE *__p_argv, VALUE self)
|
|
541
546
|
reason = NULL;
|
542
547
|
|
543
548
|
|
544
|
-
#line 120 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
549
|
+
#line 120 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
545
550
|
if (reason) { soup_message_set_status_full(_self, status_code, reason);
|
546
551
|
} else { soup_message_set_status(_self, status_code);
|
547
552
|
}
|
@@ -549,7 +554,7 @@ Message_set_status(int __p_argc, VALUE *__p_argv, VALUE self)
|
|
549
554
|
}
|
550
555
|
|
551
556
|
static VALUE
|
552
|
-
Message_set_redirect(VALUE self, VALUE __v_status_code, VALUE __v_redirect_uri)
|
557
|
+
Message_set_redirect(VALUE self OPTIONAL_ATTR , VALUE __v_status_code OPTIONAL_ATTR, VALUE __v_redirect_uri OPTIONAL_ATTR)
|
553
558
|
{
|
554
559
|
int status_code; int __orig_status_code;
|
555
560
|
char * redirect_uri; char * __orig_redirect_uri;
|
@@ -557,69 +562,69 @@ Message_set_redirect(VALUE self, VALUE __v_status_code, VALUE __v_redirect_uri)
|
|
557
562
|
__orig_status_code = status_code = NUM2INT(__v_status_code);
|
558
563
|
__orig_redirect_uri = redirect_uri = ( NIL_P(__v_redirect_uri) ? NULL : StringValuePtr(__v_redirect_uri) );
|
559
564
|
|
560
|
-
#line 128 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
565
|
+
#line 128 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
561
566
|
soup_message_set_redirect(_self, status_code, redirect_uri);
|
562
567
|
|
563
568
|
return self;
|
564
569
|
}
|
565
570
|
|
566
571
|
static VALUE
|
567
|
-
Message_is_keepalive_query(VALUE self)
|
572
|
+
Message_is_keepalive_query(VALUE self OPTIONAL_ATTR )
|
568
573
|
{
|
569
|
-
VALUE __p_retval = Qnil;
|
574
|
+
VALUE __p_retval OPTIONAL_ATTR = Qnil;
|
570
575
|
SoupMessage *_self = ((SoupMessage*)RVAL2GOBJ(self));
|
571
576
|
|
572
|
-
#line 132 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
577
|
+
#line 132 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
573
578
|
do { __p_retval = ((soup_message_is_keepalive(_self)) ? Qtrue : Qfalse); goto out; } while(0);
|
574
579
|
out:
|
575
580
|
return __p_retval;
|
576
581
|
}
|
577
582
|
|
578
583
|
static VALUE
|
579
|
-
Message_flags_equals(VALUE self, VALUE __v_flags)
|
584
|
+
Message_flags_equals(VALUE self OPTIONAL_ATTR , VALUE __v_flags OPTIONAL_ATTR)
|
580
585
|
{
|
581
586
|
MessageFlags flags; MessageFlags __orig_flags;
|
582
587
|
SoupMessage *_self = ((SoupMessage*)RVAL2GOBJ(self));
|
583
588
|
__orig_flags = flags = flags_ruby_to_MessageFlags((__v_flags));
|
584
589
|
|
585
|
-
#line 136 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
590
|
+
#line 136 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
586
591
|
soup_message_set_flags(_self, flags);
|
587
592
|
|
588
593
|
return __v_flags;
|
589
594
|
}
|
590
595
|
|
591
596
|
static VALUE
|
592
|
-
Message_flags(VALUE self)
|
597
|
+
Message_flags(VALUE self OPTIONAL_ATTR )
|
593
598
|
{
|
594
|
-
VALUE __p_retval = Qnil;
|
599
|
+
VALUE __p_retval OPTIONAL_ATTR = Qnil;
|
595
600
|
SoupMessage *_self = ((SoupMessage*)RVAL2GOBJ(self));
|
596
601
|
|
597
|
-
#line 140 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
602
|
+
#line 140 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
598
603
|
do { __p_retval = flags_MessageFlags_to_ruby((soup_message_get_flags(_self))); goto out; } while(0);
|
599
604
|
out:
|
600
605
|
return __p_retval;
|
601
606
|
}
|
602
607
|
|
603
608
|
static VALUE
|
604
|
-
Message_get_response_header(VALUE self, VALUE __v_name)
|
609
|
+
Message_get_response_header(VALUE self OPTIONAL_ATTR , VALUE __v_name OPTIONAL_ATTR)
|
605
610
|
{
|
606
|
-
VALUE __p_retval = Qnil;
|
611
|
+
VALUE __p_retval OPTIONAL_ATTR = Qnil;
|
607
612
|
char * name; char * __orig_name;
|
608
613
|
SoupMessage *_self = ((SoupMessage*)RVAL2GOBJ(self));
|
609
614
|
__orig_name = name = ( NIL_P(__v_name) ? NULL : StringValuePtr(__v_name) );
|
610
615
|
|
611
|
-
#line 144 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
616
|
+
#line 144 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
612
617
|
do { __p_retval = rb_str_new2(soup_message_headers_get_one(_self->response_headers, name)); goto out; } while(0);
|
613
618
|
out:
|
614
619
|
return __p_retval;
|
615
620
|
}
|
616
621
|
|
617
622
|
static VALUE
|
618
|
-
Message_each_response_header(VALUE self)
|
623
|
+
Message_each_response_header(VALUE self OPTIONAL_ATTR )
|
619
624
|
{
|
620
625
|
SoupMessage *_self = ((SoupMessage*)RVAL2GOBJ(self));
|
621
626
|
|
622
|
-
#line 148 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
627
|
+
#line 148 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
623
628
|
|
624
629
|
do {
|
625
630
|
VALUE block =
|
@@ -634,12 +639,12 @@ Message_each_response_header(VALUE self)
|
|
634
639
|
}
|
635
640
|
|
636
641
|
static VALUE
|
637
|
-
Message_response_body(VALUE self)
|
642
|
+
Message_response_body(VALUE self OPTIONAL_ATTR )
|
638
643
|
{
|
639
|
-
VALUE __p_retval = Qnil;
|
644
|
+
VALUE __p_retval OPTIONAL_ATTR = Qnil;
|
640
645
|
SoupMessage *_self = ((SoupMessage*)RVAL2GOBJ(self));
|
641
646
|
|
642
|
-
#line 154 "/home/geoff/Projects/soup/ext/soup/soup.cr"
|
647
|
+
#line 154 "/home/geoff/Projects/soup-ruby/ext/soup/soup.cr"
|
643
648
|
|
644
649
|
do {
|
645
650
|
SoupBuffer * buffer =
|
data/lib/soup/version.rb
CHANGED
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soup-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geoff Youngs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubber-generate
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.0.17
|
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: 0.0.17
|
27
27
|
description: |+
|
@@ -37,12 +37,12 @@ extensions:
|
|
37
37
|
- ext/soup/extconf.rb
|
38
38
|
extra_rdoc_files: []
|
39
39
|
files:
|
40
|
+
- README.md
|
41
|
+
- Rakefile
|
40
42
|
- ext/soup/extconf.rb
|
41
43
|
- ext/soup/soup.c
|
42
44
|
- ext/soup/soup.cr
|
43
45
|
- ext/soup/soup.rd
|
44
|
-
- Rakefile
|
45
|
-
- README.md
|
46
46
|
- lib/soup/version.rb
|
47
47
|
homepage: http://github.com/geoffyoungs/soup-ruby
|
48
48
|
licenses:
|
@@ -54,17 +54,17 @@ require_paths:
|
|
54
54
|
- lib
|
55
55
|
required_ruby_version: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- -
|
57
|
+
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: '0'
|
60
60
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
|
-
- -
|
62
|
+
- - ">="
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: '0'
|
65
65
|
requirements: []
|
66
66
|
rubyforge_project:
|
67
|
-
rubygems_version: 2.
|
67
|
+
rubygems_version: 2.5.1
|
68
68
|
signing_key:
|
69
69
|
specification_version: 4
|
70
70
|
summary: Soup bindings using rubber-generate
|