curb 0.9.3 → 1.0.5

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,11 +28,11 @@
20
28
  #include "curb_macros.h"
21
29
 
22
30
  // These should be managed from the Rake 'release' task.
23
- #define CURB_VERSION "0.9.3"
24
- #define CURB_VER_NUM 903
25
- #define CURB_VER_MAJ 0
26
- #define CURB_VER_MIN 3
27
- #define CURB_VER_MIC 0
31
+ #define CURB_VERSION "1.0.5"
32
+ #define CURB_VER_NUM 1005
33
+ #define CURB_VER_MAJ 1
34
+ #define CURB_VER_MIN 0
35
+ #define CURB_VER_MIC 5
28
36
  #define CURB_VER_PATCH 0
29
37
 
30
38
 
@@ -41,6 +49,11 @@
41
49
  #define RHASH_SIZE(hash) RHASH(hash)->tbl->num_entries
42
50
  #endif
43
51
 
52
+ // ruby 1.8 does not provide the macro
53
+ #ifndef DBL2NUM
54
+ #define DBL2NUM(dbl) rb_float_new(dbl)
55
+ #endif
56
+
44
57
  extern VALUE mCurl;
45
58
 
46
59
  extern void Init_curb_core();