Skip to content

Commit ccd0eff

Browse files
authored
Merge pull request #715 from Dyalog/714-allow-localised-names
Version 4.1.3: Allow Link.Create to ignore local names in calling stack.
2 parents f28c2cc + 1330dba commit ccd0eff

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

StartupSession/Link/Create.aplf

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
msg←{opts}Create args;ns;dir;arrow;container;emptydir;emptyns;fail;hasdir;hasns;links;nc;nsref;nsrefs;overwrite;rawns;rsi;warnmsg;xsi;⎕IO;⎕ML;dircreated;DEBUG;setconfig;setopts;z;json;config;rc;isfile;actname;actclass;leaf;file;fulltarget;singlefile;singlenc;nohold;m;nsgiven;up;parts;ext;name;type;suppliedopts
1+
msg←{opts}Create args;ns;dir;arrow;container;emptydir;emptyns;fail;hasdir;hasns;links;nc;nsref;nsrefs;overwrite;rawns;rsi;warnmsg;xsi;⎕IO;⎕ML;dircreated;DEBUG;setconfig;setopts;z;json;config;rc;isfile;actname;actclass;leaf;file;fulltarget;singlefile;singlenc;nohold;m;nsgiven;up;parts;ext;name;type;suppliedopts;names;onstack;local
22
⎕IO ⎕ML←1 1
33
preProcessOpts ⍝ Make sure opts is a namespace
44
(container ns dir nsgiven)←preProcessNsDir args
@@ -69,7 +69,13 @@ NOHOLD:
6969
:EndIf
7070
emptyns←1
7171
:Else
72-
emptyns←0∊⍴U.ListNames nsref←⍎ns
72+
emptyns←0=≢names←U.ListNames nsref←⍎ns
73+
:If ~emptyns
74+
onstack←((ns,'.')∘,¨names)∊⎕XSI ⍝ Name on the stack
75+
local←{∨/⊃nsref.⎕STATE ⍵}¨names ⍝ Localised on the stack
76+
names/⍨←onstack⍱local ⍝ ... are allowed in target ns
77+
:EndIf
78+
7379
:If ~opts.(preloaded∨flatten)
7480
:If ~emptyns ⍝ some APL names defined
7581
:AndIf ~emptydir ⍝ some dir/files defined

StartupSession/Link/Version.aplf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version←Version
2-
version←'4.1.2'
2+
version←'4.1.3'

0 commit comments

Comments
 (0)