summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/tdb.i
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-24 13:04:13 -0600
committerStefan Metzmacher <metze@samba.org>2007-12-26 11:57:04 -0600
commit6c9a2a3c52592e12d9cb0b312dbeee4311aa0c24 (patch)
tree6246085f09a047d8df872d2d53aa4e037480afa0 /source4/lib/tdb/tdb.i
parent59efa6e5d074f9f0fbc0b5fd2b5bcdc9d78b95e3 (diff)
downloadsamba-6c9a2a3c52592e12d9cb0b312dbeee4311aa0c24.tar.gz
samba-6c9a2a3c52592e12d9cb0b312dbeee4311aa0c24.tar.bz2
samba-6c9a2a3c52592e12d9cb0b312dbeee4311aa0c24.zip
r26586: Rename fetch to get for consistency with the Python dictionary interface.
(This used to be commit fadab7c60bb6dc5746cb2ee16f9c86fa0e0cdf1a)
Diffstat (limited to 'source4/lib/tdb/tdb.i')
-rw-r--r--source4/lib/tdb/tdb.i7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/lib/tdb/tdb.i b/source4/lib/tdb/tdb.i
index 933bfc7bb7..1b4742a477 100644
--- a/source4/lib/tdb/tdb.i
+++ b/source4/lib/tdb/tdb.i
@@ -158,6 +158,7 @@ typedef struct tdb_context {
int close();
int append(TDB_DATA key, TDB_DATA new_dbuf);
const char *errorstr();
+ %rename(get) fetch;
TDB_DATA fetch(TDB_DATA key);
int delete(TDB_DATA key);
int store(TDB_DATA key, TDB_DATA dbuf, int flag);
@@ -186,7 +187,7 @@ typedef struct tdb_context {
# Random access to keys, values
def __getitem__(self, key):
- result = self.fetch(key)
+ result = self.get(key)
if result is None:
raise KeyError, '%s: %s' % (key, self.errorstr())
return result
@@ -207,14 +208,14 @@ typedef struct tdb_context {
return self.exists(key) != 0
def fetch_uint32(self, key):
- data = self.fetch(key)
+ data = self.get(key)
if data is None:
return None
import struct
return struct.unpack("<L", data)[0]
def fetch_int32(self, key):
- data = self.fetch(key)
+ data = self.get(key)
if data is None:
return None
import struct