Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] db_gdbm: Fix for flags being unused (e.g. PM_REMOVABLE)



Hello,
createhash wasn't using "flags" parameter, holding e.g. PM_REMOVABLE, causing problems with scope handling

@@ -645,7 +645,7 @@ static Param createhash( char *name, int flags ) {
     Param pm;
     HashTable ht;

-    pm = createparam(name, PM_SPECIAL | PM_HASHED);
+    pm = createparam(name, flags | PM_SPECIAL | PM_HASHED);
     if (!pm) {
         return NULL;
     }

--
Sebastian Gniazdowski
psprint /at/ zdharma.org
diff --git a/Src/Modules/db_gdbm.c b/Src/Modules/db_gdbm.c
index 35254b6..2adbb2b 100644
--- a/Src/Modules/db_gdbm.c
+++ b/Src/Modules/db_gdbm.c
@@ -645,7 +645,7 @@ static Param createhash( char *name, int flags ) {
     Param pm;
     HashTable ht;
 
-    pm = createparam(name, PM_SPECIAL | PM_HASHED);
+    pm = createparam(name, flags | PM_SPECIAL | PM_HASHED);
     if (!pm) {
         return NULL;
     }


Messages sorted by: Reverse Date, Date, Thread, Author