summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Chittenden <seanc@FreeBSD.org>2002-11-17 04:49:02 +0000
committerSean Chittenden <seanc@FreeBSD.org>2002-11-17 04:49:02 +0000
commitcf19879c06b65241c187f1b0663a0db0270be14f (patch)
tree9d81065c0d4526ca5d7e0d8138a7f4769b3e9c35
parenti386-freebsd -> PERL_ARCH (diff)
Patch for Ruby 1.7.
Approved by: maintainer (knu)
Notes
Notes: svn path=/head/; revision=70284
-rw-r--r--databases/ruby-cdb/files/patch-cdb.c48
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;