curb 0.7.15 → 1.0.0

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/ext/curb.h CHANGED
@@ -9,8 +9,16 @@
9
9
  #define __CURB_H
10
10
 
11
11
  #include <ruby.h>
12
+
13
+ #ifdef HAVE_RUBY_IO_H
14
+ #include "ruby/io.h"
15
+ #else
16
+ #include "rubyio.h" // ruby 1.8
17
+ #endif
18
+
12
19
  #include <curl/curl.h>
13
20
 
21
+ #include "banned.h"
14
22
  #include "curb_config.h"
15
23
  #include "curb_easy.h"
16
24
  #include "curb_errors.h"
@@ -20,12 +28,12 @@
20
28
  #include "curb_macros.h"
21
29
 
22
30
  // These should be managed from the Rake 'release' task.
23
- #define CURB_VERSION "0.7.15"
24
- #define CURB_VER_NUM 715
25
- #define CURB_VER_MAJ 0
26
- #define CURB_VER_MIN 7
27
- #define CURB_VER_MIC 1
28
- #define CURB_VER_PATCH 5
31
+ #define CURB_VERSION "1.0.0"
32
+ #define CURB_VER_NUM 1000
33
+ #define CURB_VER_MAJ 1
34
+ #define CURB_VER_MIN 0
35
+ #define CURB_VER_MIC 0
36
+ #define CURB_VER_PATCH 0
29
37
 
30
38
 
31
39
  // Maybe not yet defined in Ruby
@@ -37,12 +45,13 @@
37
45
  #define RSTRING_PTR(x) RSTRING(x)->ptr
38
46
  #endif
39
47
 
40
- #ifndef RHASH_LEN
41
- #ifdef HAVE_RUBY19_HASH
42
- #define RHASH_LEN(hash) RHASH(hash)->ntbl->num_entries
43
- #else
44
- #define RHASH_LEN(hash) RHASH(hash)->tbl->num_entries
48
+ #ifndef RHASH_SIZE
49
+ #define RHASH_SIZE(hash) RHASH(hash)->tbl->num_entries
45
50
  #endif
51
+
52
+ // ruby 1.8 does not provide the macro
53
+ #ifndef DBL2NUM
54
+ #define DBL2NUM(dbl) rb_float_new(dbl)
46
55
  #endif
47
56
 
48
57
  extern VALUE mCurl;