Skip to content

Commit 0ff69dc

Browse files
committed
Merge pull request #374 from waywardmonkeys/gc-init-fix
[crt, cbe]: Move GC_INIT to the runtime init.
2 parents 783fbc7 + 842e985 commit 0ff69dc

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

sources/dfmc/c-linker/c-gluefile.dylan

-3
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,13 @@ define sideways method emit-mainfile
1010
let c-file = #f;
1111
with-build-area-output (stream = ld, base: "_main", type: "c")
1212
write(stream, "#include <stdlib.h>\n");
13-
write(stream, "#include <gc/gc.h>\n\n");
1413
write(stream, "#include \"run-time.h\"\n\n");
1514

1615
format(stream, "int main (int argc, char *argv[]) {\n");
1716
format(stream, " extern void %s ();\n", glue-name(lib-name));
1817
format(stream, " extern D %s;\n", command-arguments-name());
1918
format(stream, " extern D %s;\n", command-name-name());
2019

21-
format(stream, " GC_INIT();\n");
22-
2320
write (stream, " D args = primitive_make_vector((argc > 0) ? argc - 1 : 0);\n");
2421
write (stream, " int i;\n");
2522
format(stream, " if (argc > 0)\n");

sources/dfmc/c-run-time/run-time.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4759,7 +4759,7 @@ void _Init_Run_Time ()
47594759
#endif
47604760

47614761
// initialize GC and thread subsystems
4762-
GC_init();
4762+
GC_INIT();
47634763
initialize_threads_primitives();
47644764
GC_set_max_heap_size(MAX_HEAP_SIZE);
47654765

0 commit comments

Comments
 (0)