]> git.lizzy.rs Git - nothing.git/commitdiff
ebisp/repl: Use constructor to create scope, not an explicit initializer
authorAlastair Bridgewater <alastair.bridgewater@gmail.com>
Sun, 20 Jan 2019 02:45:52 +0000 (21:45 -0500)
committerAlastair Bridgewater <alastair.bridgewater@gmail.com>
Sun, 20 Jan 2019 03:35:11 +0000 (22:35 -0500)
  * This looks to be a lingering bit of code duplication, probably
created before the constructor.  Just use the constructor.

src/ebisp/repl.c

index b429014a7ad3935519e50e59ba607c2677a74e8d..2be4b1a47feb11f028238a2e3ea9beb5af411b1f 100644 (file)
@@ -45,9 +45,7 @@ int main(int argc, char *argv[])
     char buffer[REPL_BUFFER_MAX + 1];
 
     Gc *gc = create_gc();
-    struct Scope scope = {
-        .expr = CONS(gc, NIL(gc), NIL(gc))
-    };
+    struct Scope scope = create_scope(gc);
 
     load_std_library(gc, &scope);
     load_repl_runtime(gc, &scope);