Commit c1a696d90fd2c584709b638d4d3e77030b79f251
Fixed Ruby 1.8.5 compatibility.
Thanks to Mike Pomraning for the patch.Coda Hale committed on 3/11/2009, 7:40:33 PM
Parent: 18178defdd85fcde985e0f010666d8aa54819a48
Files changed
ext/bcrypt_ext.c | changed |
ext/bcrypt_ext.c | ||
---|---|---|
@@ -6,8 +6,14 @@ | ||
6 | 6 | |
7 | 7 | VALUE mBCrypt; |
8 | 8 | VALUE cBCryptEngine; |
9 | 9 | |
10 | +/* Define RSTRING_PTR for Ruby 1.8.5, ruby-core's idea of a point release is | |
11 | + insane. */ | |
12 | + | |
13 | + | |
14 | + | |
15 | + | |
10 | 16 | /* Given a logarithmic cost parameter, generates a salt for use with +bc_crypt+. |
11 | 17 | */ |
12 | 18 | static VALUE bc_salt(VALUE self, VALUE cost, VALUE seed) { |
13 | 19 | return rb_str_new2((char *)bcrypt_gensalt(NUM2INT(cost), (u_int8_t *)RSTRING_PTR(seed))); |
Built with git-ssb-web