[Patches] [Patch #102638] A patch for gdbmmodule.c, by Damjan <arhiv@freemail.org.mk>
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 13 Dec 2000 01:34:03 -0800
Patch #102638 has been updated.
Project: python
Category: Modules
Status: Rejected
Submitted by: nobody
Assigned to : moshez
Summary: A patch for gdbmmodule.c, by Damjan <arhiv@freemail.org.mk>
Follow-Ups:
Date: 2000-Dec-13 01:34
By: moshez
Comment:
Rejected in favour of 102802.
-------------------------------------------------------
Date: 2000-Dec-12 08:17
By: nascheme
Comment:
My version of gdbm (1.7.3) does not define GDBM_SYNC and
GDBM_NOLOCK. If this patch is going to be applied then the
code should be wrapped in ifdefs. Moshe, the reference to
flags[2] should be okay although it is a strange way to
write the code. I've uploaded an alternative patch
(#102802).
-------------------------------------------------------
Date: 2000-Dec-12 06:10
By: gvanrossum
Comment:
Thanks Moshe. I'm assigning the patch to you. Feel free to upload a new version!
-------------------------------------------------------
Date: 2000-Dec-12 06:05
By: gvanrossum
Comment:
Thanks Moshe. I'm assigning the patch to you. Feel free to upload a new version!
-------------------------------------------------------
Date: 2000-Dec-12 06:03
By: moshez
Comment:
Well, from the documentation I have installed on my system (RH 6.2), this patch seems to do the right thing -- for small enough values of the right thing. First of all, 'f'
should still translate to GDBM_FAST: it's obsolete, but still supported for backwards compat. and so should we. Second, the string part seems a bit dodgy (isn't there an undefined reference of flags[2] if flags is only the string
"r", say?
-------------------------------------------------------
Date: 2000-Dec-12 05:44
By: gvanrossum
Comment:
Damjan replied via private mail:
"""
From the gdbm info page:
...The following may also be
logically or'd into the database flags: GDBM_SYNC, which causes
all database operations to be synchronized to the disk, and
GDBM_NOLOCK, which prevents the library from performing any
locking on the database file. The option GDBM_FAST is now
obsolete, since `gdbm' defaults to no-sync mode...
^^^^^^^^
(1) My patch adds two options to the gdbm.open(..) function. These are 'u' for
GDBM_NOLOCK, and 's' for GDBM_SYNC.
(2) GDBM_FAST is obsolete because gdbm defaults to GDBM_FAST, so it's removed.
I'm also thinking about adding a lock and unlock methods to the gdbm object,
but it seems that a gdbm database can only be locked and not unlocked.
"""
Can amybody else who knows more about gdbm review the patch please?
(Randomly asigned to Skip.)
-------------------------------------------------------
Date: 2000-Dec-11 12:45
By: gvanrossum
Comment:
(1) What does the patch do?
(2) Why does it remove the 'f' GDBM_FAST option?
-------------------------------------------------------
-------------------------------------------------------
For more info, visit:
http://sourceforge.net/patch/?func=detailpatch&patch_id=102638&group_id=5470