[Patches] [Patch #102638] A patch for gdbmmodule.c, by Damjan <arhiv@freemail.org.mk>

noreply@sourceforge.net noreply@sourceforge.net
Tue, 12 Dec 2000 06:03:13 -0800


Patch #102638 has been updated. 

Project: python
Category: Modules
Status: Open
Submitted by: nobody
Assigned to : montanaro
Summary: A patch for gdbmmodule.c, by Damjan <arhiv@freemail.org.mk>

Follow-Ups:

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