summaryrefslogtreecommitdiff
path: root/Resource/Init/gs_setpd.ps
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2019-06-25 10:43:30 +0100
committerChris Liddell <chris.liddell@artifex.com>2019-07-02 11:47:05 +0100
commit94cc50cf64e0899c5d415e6ac1e6ea725fc13502 (patch)
treeef034916353250c147c81ffb5b846798c03a7f72 /Resource/Init/gs_setpd.ps
parent871b8d8d5a26205a7a3c05ea9abf060a272fd6fb (diff)
downloadghostpdl-94cc50cf64e0899c5d415e6ac1e6ea725fc13502.tar.gz
Fix DELAYBIND
We now undefine a *lot* of non-standard/internal operators (and other things) as we go, and often we rely on bind to ensure that the names are replaced with the operator objects rather than names. This falls over when DELAYBIND is in force, and the call to .bindnow happens *after* the undefining occurs. To solve this, all the undefining happens through a procedure: .addtoundeflist. Under normal operation, that simply undefines as we go, and things work the same as always. Under DELAYBIND .addtoundeflist accumulates a list of names to undefine, and the dictionaries from where they should be removed, and on the .bindnow call, then .applyundeflist is called which rattles through the lists removing the names from the dictionaries.
Diffstat (limited to 'Resource/Init/gs_setpd.ps')
-rw-r--r--Resource/Init/gs_setpd.ps9
1 files changed, 5 insertions, 4 deletions
diff --git a/Resource/Init/gs_setpd.ps b/Resource/Init/gs_setpd.ps
index f84a495e3..6c998ee59 100644
--- a/Resource/Init/gs_setpd.ps
+++ b/Resource/Init/gs_setpd.ps
@@ -674,7 +674,7 @@ SETPDDEBUG { (Result of putting.) = pstack flush } if
} ifelse
}
forall pop
-} bind executeonly odef
+} .bind executeonly odef
currentdict /0Policy undef
currentdict /1Policy undef
@@ -1003,7 +1003,7 @@ SETPDDEBUG { (Installing.) = pstack flush } if
//.postinstall exec
} ifelse
setglobal % return to original VM allocation mode
-} bind executeonly odef
+} .bind executeonly odef
% We break out the code after calling the Install procedure into a
% separate procedure, since it is executed even if Install causes an error.
@@ -1035,9 +1035,10 @@ SETPDDEBUG { (Installing.) = pstack flush } if
/.makecurrentpagedevice
/.mergespecial
/.requiredattrs
+ /.applypolicies
% /.uninstallpagedevice % (called from C code)
-]
-{currentdict exch .forceundef} forall
+] dup currentdict .undefinternalnames
+systemdict .undefinternalnames
end % level2dict
.setlanguagelevel