• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Baremetal Lisp interpreter and compiler for low-resource devices


Commit MetaInfo

Revision83084ed69c65cd33548af86594b3555f5f33c774 (tree)
Zeit2020-09-13 08:24:04
AutorAlaskanEmily <emily@alas...>
CommiterAlaskanEmily

Log Message

Fix a silly mistake with type hints

Ändern Zusammenfassung

Diff

--- a/sl_i.c
+++ b/sl_i.c
@@ -115,8 +115,11 @@ static void sl_i_defun(struct SL_I_Runtime *rt,
115115 while(iter != SL_S_NIL){
116116 arg_pair = SL_S_PTR_FROM_TAG(iter->head);
117117 atom = SL_S_PTR_FROM_TAG(arg_pair->head);
118- if(SL_I_LIKELY(SL_S_COMPARE_ATOMS(atom, &sl_x_nil)))
118+ if(SL_I_LIKELY(SL_S_IS_NIL(atom) ||
119+ SL_S_COMPARE_ATOMS(atom, &sl_x_nil))){
120+
119121 goto type_hint_ok;
122+ }
120123 /* Validate that we know what this type hint is. */
121124 #define SL_I_TYPE_HINT_CHECK(X) \
122125 if(SL_S_COMPARE_ATOMS(atom, &sl_x_ ## X ## _hint)) \
@@ -972,7 +975,7 @@ SL_S_FUNC(void) *SL_I_Call(struct SL_I_Runtime *rt,
972975 frame.defs[i].name = bind->args[i].name;
973976 value = SL_I_Execute(rt, args->head);
974977 hint = bind->args[i].hint;
975- if(!SL_S_COMPARE_ATOMS(hint, &sl_x_nil)){
978+ if(!(SL_S_IS_NIL(hint) || SL_S_COMPARE_ATOMS(hint, &sl_x_nil))){
976979 /* Validate the type. */
977980 #define SL_I_TYPE_ERROR "Invalid argument type for func "
978981 #define SL_I_SET_TYPE_ERROR do{ \