コミットメタ情報

リビジョンbc6d843f3fbf45f8535c462c9cc06766cd560156 (tree)
日時2018-12-07 05:05:28
作者Agustina Arzille <avarzille@rise...>
コミッターAgustina Arzille

ログメッセージ

Small fixes in char reading and tuple len

変更サマリ

差分

diff -r 4e914212d0df -r bc6d843f3fbf io.cpp
--- a/io.cpp Wed Dec 05 15:51:25 2018 -0300
+++ b/io.cpp Thu Dec 06 17:05:28 2018 -0300
@@ -905,7 +905,13 @@
905905 schar tmp;
906906 if (!this->src->sgetc (this->interp, tmp))
907907 raise_eos (this->interp);
908- else if (!isspace (tmp.uc))
908+ else if (tmp.uc <= 0x7f && !symchar_p (tmp.uc) && got)
909+ {
910+ this->src->ungetuc (tmp.buf, tmp.len);
911+ this->bufp[this->bufcnt] = '\0';
912+ break;
913+ }
914+ else if (!isspace (tmp.uc) && (symchar_p (tmp.uc) || !got))
909915 {
910916 if (!got)
911917 cv = tmp;
diff -r 4e914212d0df -r bc6d843f3fbf tuple.cpp
--- a/tuple.cpp Wed Dec 05 15:51:25 2018 -0300
+++ b/tuple.cpp Thu Dec 06 17:05:28 2018 -0300
@@ -490,7 +490,8 @@
490490
491491 uint32_t len_o (interpreter *, object tx)
492492 {
493- return ((uint32_t)*root_plen (as_tuple(tx)->head));
493+ auto ret = *root_plen(as_tuple(tx)->head);
494+ return (ret < 0 ? 0 : (uint32_t)ret);
494495 }
495496
496497 void tuple_clr (interpreter *interp, object tx)
旧リポジトリブラウザで表示