about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--.document1
-rw-r--r--Hash_Functions8
-rw-r--r--README8
-rw-r--r--ext/tdb/tdb.c11
4 files changed, 20 insertions, 8 deletions
diff --git a/.document b/.document
index e5c2c99..95b3d1e 100644
--- a/.document
+++ b/.document
@@ -1,5 +1,6 @@
 LICENSE
 README
+Hash_Functions
 TODO
 NEWS
 ChangeLog
diff --git a/Hash_Functions b/Hash_Functions
index 5289086..c10ded7 100644
--- a/Hash_Functions
+++ b/Hash_Functions
@@ -46,12 +46,12 @@ other architectures).
   for platforms where unaligned 4-byte reads can crash the machine.
 
 * :murmur2_neutral - endian/alignment-neutral version of the simple
-   implementation, half as fast according to the author.
+  implementation, half as fast according to the author.
 
 * :murmur1 - simple and fast historical version
 
 * :murmur1_aligned - according to the author, the performance of this
-   one should be as good or better than the simple version.
+  one should be as good or better than the simple version.
 
 == FNV family
 
@@ -62,6 +62,6 @@ other architectures).
 == Bernstein hashes
 
 * :djb3 - The hash currently favored by Bernstein.
-   See [http://www.cse.yorku.ca/~oz/hash.html]
+  See http://www.cse.yorku.ca/~oz/hash.html
 
-* :djb2 - See [http://www.cse.yorku.ca/~oz/hash.html]
+* :djb2 - See http://www.cse.yorku.ca/~oz/hash.html
diff --git a/README b/README
index 6307f1b..bc174f3 100644
--- a/README
+++ b/README
@@ -12,20 +12,20 @@ write to the same databases used by Samba!
 
 * Releases the GVL for slow disk operations under Ruby 1.9
 
-* Includes several {hash functions}[link:Hash_Functions]
+* Includes several {hash functions}[link:Hash_Functions.html]
   not included by upstream TDB.
 
 == Install
 
-The original tdb library from the main [site]{http://tdb.samba.org/} is
+The original tdb library from the {main site}[http://tdb.samba.org/] is
 required.  Debian users can just <code>apt-get install tdb-dev</code>.
 
 The library consists of a C extension so you'll need a C compiler
 and Ruby development libraries/headers.
 
 You may download the tarball from our
-{site}[http://bogomips.org/ruby-tdb/] and run setup.rb after unpacking
-it:
+{download site}[http://bogomips.org/ruby-tdb/files/] and run setup.rb after
+unpacking it:
 
   http://bogomips.org/ruby-tdb/files/
 
diff --git a/ext/tdb/tdb.c b/ext/tdb/tdb.c
index cfe7970..0ad7d5f 100644
--- a/ext/tdb/tdb.c
+++ b/ext/tdb/tdb.c
@@ -677,3 +677,14 @@ void Init_tdb_ext(void)
         tdb_CONST(INCOMPATIBLE_HASH);
 #endif
 }
+
+/*
+ * Document-class: TDB
+ *
+ * <code>
+ *   tdb = TDB.new("/path/to/file", flags => IO::RDWR|IO::CREAT)
+ *   tdb.store("HELLO", "world")
+ *   tdb.fetch("HELLO")  -> "world"
+ *   tdb.delete("HELLO") -> "world"
+ * </code>
+ */