zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] db_gdbm: Fix for flags being unused (e.g. PM_REMOVABLE)
@ 2017-05-25  5:15 Sebastian Gniazdowski
  0 siblings, 0 replies; only message in thread
From: Sebastian Gniazdowski @ 2017-05-25  5:15 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

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

[-- Attachment #2: gdbm_flags.diff.txt --]
[-- Type: text/plain, Size: 411 bytes --]

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;
     }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-25  5:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-25  5:15 [PATCH] db_gdbm: Fix for flags being unused (e.g. PM_REMOVABLE) Sebastian Gniazdowski

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).