Skip to content

Commit 12454ff

Browse files
committed
CHANGE: rename protect/permanently to protect/lock (wip)
1 parent 83cd939 commit 12454ff

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/boot/natives.reb

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ protect: native [
226226
/words "Process list as words (and path words)"
227227
/values "Process list of values (implied GET)"
228228
/hide "Hide variables (avoid binding and lookup)"
229-
/permanently "Protect permanently (unprotect will fail)"
229+
/lock "Protect permanently (unprotect will fail)"
230230
]
231231

232232
unprotect: native [

src/core/n-control.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ enum {
3838
PROT_HIDE,
3939
PROT_WORD,
4040
PROT_WORDS,
41-
PROT_PERMANENTLY
41+
PROT_LOCK
4242
};
4343

4444

@@ -109,7 +109,7 @@ enum {
109109

110110
if (GET_FLAG(flags, PROT_SET)) {
111111
PROTECT_SERIES(series);
112-
if (GET_FLAG(flags, PROT_PERMANENTLY)) LOCK_SERIES(series);
112+
if (GET_FLAG(flags, PROT_LOCK)) LOCK_SERIES(series);
113113
}
114114
else
115115
//unprotect series only when not locked (using protect/permanently)
@@ -143,7 +143,7 @@ enum {
143143
// protecting...
144144
if (!GET_FLAG(flags, PROT_WORDS)) {
145145
PROTECT_SERIES(series);
146-
if (GET_FLAG(flags, PROT_PERMANENTLY))
146+
if (GET_FLAG(flags, PROT_LOCK))
147147
LOCK_SERIES(series);
148148
}
149149
} else {
@@ -222,7 +222,7 @@ enum {
222222
if (D_REF(5)) SET_FLAG(flags, PROT_HIDE);
223223
else SET_FLAG(flags, PROT_WORD); // there is no unhide
224224

225-
if (D_REF(6)) SET_FLAG(flags, PROT_PERMANENTLY);
225+
if (D_REF(6)) SET_FLAG(flags, PROT_LOCK);
226226

227227
if (IS_WORD(val) || IS_PATH(val)) {
228228
Protect_Word_Value(val, flags); // will unmark if deep

0 commit comments

Comments
 (0)