ghazel-curb 0.6.2.2 → 0.6.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/ext/curb_easy.c +15 -0
  2. data/ext/curb_macros.h +1 -1
  3. metadata +1 -1
data/ext/curb_easy.c CHANGED
@@ -26,6 +26,21 @@ static VALUE rbstrAmp;
26
26
  VALUE cCurlEasy;
27
27
 
28
28
 
29
+ /* XXX: This is copy/pasted from ruby 1.8.7 for compatibility with ruby 1.8.6 */
30
+
31
+ VALUE
32
+ rb_hash_lookup_187(hash, key)
33
+ VALUE hash, key;
34
+ {
35
+ VALUE val;
36
+
37
+ if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
38
+ return Qnil; /* without Hash#default */
39
+ }
40
+ return val;
41
+ }
42
+
43
+
29
44
  /* ================== CURL HANDLER FUNCS ==============*/
30
45
 
31
46
  /* These handle both body and header data */
data/ext/curb_macros.h CHANGED
@@ -12,7 +12,7 @@
12
12
  #define rb_easy_set(key,val) rb_hash_aset(rbce->opts, rb_easy_hkey(key) , val)
13
13
  #define rb_easy_get(key) rb_hash_aref(rbce->opts, rb_easy_hkey(key))
14
14
  #define rb_easy_del(key) rb_hash_delete(rbce->opts, rb_easy_hkey(key))
15
- #define rb_easy_nil(key) (rb_hash_lookup(rbce->opts, rb_easy_hkey(key)) == Qnil)
15
+ #define rb_easy_nil(key) (rb_hash_lookup_187(rbce->opts, rb_easy_hkey(key)) == Qnil)
16
16
  #define rb_easy_type_check(key,type) (rb_type(rb_hash_aref(rbce->opts, rb_easy_hkey(key))) == type)
17
17
 
18
18
  // TODO: rb_sym_to_s may not be defined?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ghazel-curb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2.2
4
+ version: 0.6.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Bamford