diff options
author | Sean Chittenden <seanc@FreeBSD.org> | 2002-11-17 04:49:02 +0000 |
---|---|---|
committer | Sean Chittenden <seanc@FreeBSD.org> | 2002-11-17 04:49:02 +0000 |
commit | cf19879c06b65241c187f1b0663a0db0270be14f (patch) | |
tree | 9d81065c0d4526ca5d7e0d8138a7f4769b3e9c35 /databases/ruby-cdb | |
parent | af69b97eae78071d1e2318405100b5874808c7b0 (diff) | |
download | ports-cf19879c06b65241c187f1b0663a0db0270be14f.tar.gz ports-cf19879c06b65241c187f1b0663a0db0270be14f.zip |
Patch for Ruby 1.7.
Approved by: maintainer (knu)
Notes
Notes:
svn path=/head/; revision=70284
Diffstat (limited to 'databases/ruby-cdb')
-rw-r--r-- | databases/ruby-cdb/files/patch-cdb.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/databases/ruby-cdb/files/patch-cdb.c b/databases/ruby-cdb/files/patch-cdb.c new file mode 100644 index 000000000000..90d3d3605102 --- /dev/null +++ b/databases/ruby-cdb/files/patch-cdb.c @@ -0,0 +1,48 @@ +--- cdb.c.orig Sat Nov 16 01:01:11 2002 ++++ cdb.c Sat Nov 16 01:20:25 2002 +@@ -140,11 +140,11 @@ + char *k; + struct cdb *cdb; + uint32 pos; +- unsigned int len; ++ long len; + + Get_CDB(obj, cdb); + Check_FD(cdb); +- k = str2cstr(key, &len); ++ k = rb_str2cstr(key, &len); + switch (cdb_find(cdb, k, len)) { + case 1: + return _cdb_read(cdb, cdb_datapos(cdb), cdb_datalen(cdb)); +@@ -178,13 +178,13 @@ + char *k; + VALUE key; + struct cdb *cdb; +- unsigned int len; ++ long len; + + Get_CDB(obj, cdb); + Check_FD(cdb); + + if (rb_scan_args(argc, argv, "01", &key) == 1) { +- k = str2cstr(key, &len); ++ k = rb_str2cstr(key, &len); + cdb_findstart(cdb); + + while ((ret = cdb_findnext(cdb, k, len)) == 1) +@@ -330,12 +330,12 @@ + { + struct cdb_make *cdb; + char *k, *d; +- unsigned int klen, dlen; ++ long klen, dlen; + + Get_CDBMake(obj, cdb); + Check_FD(cdb); +- k = str2cstr(key, &klen); +- d = str2cstr(data, &dlen); ++ k = rb_str2cstr(key, &klen); ++ d = rb_str2cstr(data, &dlen); + if (cdb_make_add(cdb, k, klen, d, dlen) == -1) rb_sys_fail(0); + + return obj; |