Module Name: src Committed By: nikita Date: Sat Apr 22 19:41:15 UTC 2023
Modified Files: src/external/mit/lua/dist/src: lvm.c Log Message: lua: formatting in lvm.c To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/external/mit/lua/dist/src/lvm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/mit/lua/dist/src/lvm.c diff -u src/external/mit/lua/dist/src/lvm.c:1.18 src/external/mit/lua/dist/src/lvm.c:1.19 --- src/external/mit/lua/dist/src/lvm.c:1.18 Fri Apr 21 17:31:33 2023 +++ src/external/mit/lua/dist/src/lvm.c Sat Apr 22 19:41:15 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: lvm.c,v 1.18 2023/04/21 17:31:33 nikita Exp $ */ +/* $NetBSD: lvm.c,v 1.19 2023/04/22 19:41:15 nikita Exp $ */ /* ** Id: lvm.c @@ -500,8 +500,8 @@ l_sinline int LEfloatint (lua_Number f, /* ** Return 'l < r', for numbers. */ -#ifndef _KERNEL l_sinline int LTnum (const TValue *l, const TValue *r) { +#ifndef _KERNEL lua_assert(ttisnumber(l) && ttisnumber(r)); if (ttisinteger(l)) { lua_Integer li = ivalue(l); @@ -517,22 +517,19 @@ l_sinline int LTnum (const TValue *l, co else /* 'l' is float and 'r' is int */ return LTfloatint(lf, ivalue(r)); } -} -#endif /* _KERNEL */ -#ifdef _KERNEL -l_sinline int LTnum (const TValue *l, const TValue *r) { +#else lua_assert(ttisnumber(l)); lua_assert(ttisnumber(r)); return ivalue(l) < ivalue(r); /* both are integers */ -} #endif /* _KERNEL */ +} /* ** Return 'l <= r', for numbers. */ -#ifndef _KERNEL l_sinline int LEnum (const TValue *l, const TValue *r) { +#ifndef _KERNEL lua_assert(ttisnumber(l) && ttisnumber(r)); if (ttisinteger(l)) { lua_Integer li = ivalue(l); @@ -548,15 +545,12 @@ l_sinline int LEnum (const TValue *l, co else /* 'l' is float and 'r' is int */ return LEfloatint(lf, ivalue(r)); } -} -#endif /* _KERNEL */ -#ifdef _KERNEL -l_sinline int LEnum (const TValue *l, const TValue *r) { +#else lua_assert(ttisinteger(l)); lua_assert(ttisinteger(r)); return ivalue(l) <= ivalue(r); /* both are integers */ -} #endif /* _KERNEL */ +} /*