Skip to content

Commit b74a358

Browse files
committed
Move warning after initialization
We can't call Scm_Warn in symbol initialization, for other runtime hasn't been fully booted.
1 parent d67560a commit b74a358

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/core.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,15 @@ void Scm_Init(const char *signature)
279279
#endif
280280

281281
Scm__FinishModuleInitialization();
282+
283+
/* Warn users that the compatibility is broken.
284+
This needs to be here after all initialization is done. */
285+
if (Scm_GetEnv("GAUCHE_KEYWORD_DISJOINT") != NULL) {
286+
Scm_Warn("GAUCHE_KEYWORD_DISJOINT is set, but disjoint keyword type is "
287+
"no longer supported. See 'Keyword and symbol integration' "
288+
"in the reference manual for the details.");
289+
}
290+
282291
runtime_state = SCM_RUNTIME_INITIALIZED;
283292
}
284293

src/symbol.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,4 @@ void Scm__InitSymbol(void)
421421
SCM_INTERNAL_MUTEX_INIT(obtable_mutex);
422422
obtable = SCM_HASH_TABLE(Scm_MakeHashTableSimple(SCM_HASH_STRING, 4096));
423423
init_builtin_syms();
424-
425-
if (Scm_GetEnv("GAUCHE_KEYWORD_DISJOINT") != NULL) {
426-
Scm_Warn("GAUCHE_KEYWORD_DISJOINT is set, but disjoint keyword type is "
427-
"no longer supported. If your code depends on a disjoint "
428-
"keyword type, please update your code.");
429-
}
430424
}

0 commit comments

Comments
 (0)