1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-17 15:57:12 +00:00

Rename 'get' opcode to 'in', add new 'get' opcode.

This makes the names of the opcodes match their implied functionality.
We also rename the C functions to match the opcodes and source level
functionality.
This commit is contained in:
Calvin Rose
2019-12-02 21:15:08 -06:00
parent 3a14aad615
commit cecc7e6b9d
9 changed files with 39 additions and 30 deletions

View File

@@ -156,7 +156,7 @@ bad:
}
/* Gets a value and returns. Can panic. */
Janet janet_get(Janet ds, Janet key) {
Janet janet_in(Janet ds, Janet key) {
Janet value;
switch (janet_type(ds)) {
default:
@@ -207,7 +207,7 @@ Janet janet_get(Janet ds, Janet key) {
return value;
}
Janet janet_get_permissive(Janet ds, Janet key) {
Janet janet_get(Janet ds, Janet key) {
JanetType t = janet_type(ds);
switch (t) {
default: