Some 'unsigned int' changed to 'unsigned'

'unsigned int' is too long sometimes. (We already write 'long' instead
of 'long int'...)
diff --git a/lcode.h b/lcode.h
index 0b971fc..5b8eb29 100644
--- a/lcode.h
+++ b/lcode.h
@@ -60,7 +60,7 @@
 #define luaK_jumpto(fs,t)	luaK_patchlist(fs, luaK_jump(fs), t)
 
 LUAI_FUNC int luaK_code (FuncState *fs, Instruction i);
-LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx);
+LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned Bx);
 LUAI_FUNC int luaK_codeABCk (FuncState *fs, OpCode o, int A,
                                             int B, int C, int k);
 LUAI_FUNC int luaK_exp2const (FuncState *fs, const expdesc *e, TValue *v);
diff --git a/llimits.h b/llimits.h
index 3bcd1b7..2adbd32 100644
--- a/llimits.h
+++ b/llimits.h
@@ -91,7 +91,7 @@
 #define L_P2I	size_t
 #endif
 
-#define point2uint(p)	((unsigned int)((L_P2I)(p) & UINT_MAX))
+#define point2uint(p)	cast_uint((L_P2I)(p) & UINT_MAX)
 
 
 
diff --git a/lstate.c b/lstate.c
index 2ae76d8..c342258 100644
--- a/lstate.c
+++ b/lstate.c
@@ -320,7 +320,7 @@
 }
 
 
-LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud, unsigned int seed) {
+LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud, unsigned seed) {
   int i;
   lua_State *L;
   global_State *g;
diff --git a/lstring.c b/lstring.c
index 9570e79..a374c96 100644
--- a/lstring.c
+++ b/lstring.c
@@ -40,7 +40,7 @@
 }
 
 
-unsigned int luaS_hash (const char *str, size_t l, unsigned int seed) {
+unsigned luaS_hash (const char *str, size_t l, unsigned seed) {
   unsigned int h = seed ^ cast_uint(l);
   for (; l > 0; l--)
     h ^= ((h<<5) + (h>>2) + cast_byte(str[l - 1]));
@@ -48,7 +48,7 @@
 }
 
 
-unsigned int luaS_hashlongstr (TString *ts) {
+unsigned luaS_hashlongstr (TString *ts) {
   lua_assert(ts->tt == LUA_VLNGSTR);
   if (ts->extra == 0) {  /* no hash? */
     size_t len = ts->u.lnglen;
@@ -155,7 +155,7 @@
 ** creates a new string object
 */
 static TString *createstrobj (lua_State *L, size_t totalsize, int tag,
-                              unsigned int h) {
+                              unsigned h) {
   TString *ts;
   GCObject *o;
   o = luaC_newobj(L, tag, totalsize);
diff --git a/lstring.h b/lstring.h
index e321bd4..b7226d8 100644
--- a/lstring.h
+++ b/lstring.h
@@ -43,8 +43,8 @@
 #define eqshrstr(a,b)	check_exp((a)->tt == LUA_VSHRSTR, (a) == (b))
 
 
-LUAI_FUNC unsigned int luaS_hash (const char *str, size_t l, unsigned int seed);
-LUAI_FUNC unsigned int luaS_hashlongstr (TString *ts);
+LUAI_FUNC unsigned luaS_hash (const char *str, size_t l, unsigned seed);
+LUAI_FUNC unsigned luaS_hashlongstr (TString *ts);
 LUAI_FUNC int luaS_eqlngstr (TString *a, TString *b);
 LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
 LUAI_FUNC void luaS_clearcache (global_State *g);
diff --git a/ltable.c b/ltable.c
index f62f36b..ef19a5c 100644
--- a/ltable.c
+++ b/ltable.c
@@ -358,8 +358,8 @@
 ** elements in the array part, then elements in the hash part. The
 ** beginning of a traversal is signaled by 0.
 */
-static unsigned int findindex (lua_State *L, Table *t, TValue *key,
-                               unsigned int asize) {
+static unsigned findindex (lua_State *L, Table *t, TValue *key,
+                               unsigned asize) {
   unsigned int i;
   if (ttisnil(key)) return 0;  /* first iteration */
   i = ttisinteger(key) ? arrayindex(ivalue(key)) : 0;
@@ -462,7 +462,7 @@
 ** will go to the array part; return the optimal size.  (The condition
 ** 'twotoi > 0' in the for loop stops the loop if 'twotoi' overflows.)
 */
-static unsigned int computesizes (unsigned int nums[], unsigned int *pna) {
+static unsigned computesizes (unsigned nums[], unsigned *pna) {
   int i;
   unsigned int twotoi;  /* 2^i (candidate for optimal size) */
   unsigned int a = 0;  /* number of elements smaller than 2^i */
@@ -506,7 +506,7 @@
 ** number of keys that will go into corresponding slice and return
 ** total number of non-nil keys.
 */
-static unsigned int numusearray (const Table *t, unsigned int *nums) {
+static unsigned numusearray (const Table *t, unsigned *nums) {
   int lg;
   unsigned int ttlg;  /* 2^lg */
   unsigned int ause = 0;  /* summation of 'nums' */
@@ -533,7 +533,7 @@
 }
 
 
-static int numusehash (const Table *t, unsigned int *nums, unsigned int *pna) {
+static int numusehash (const Table *t, unsigned *nums, unsigned *pna) {
   int totaluse = 0;  /* total number of elements */
   int ause = 0;  /* elements added to 'nums' (can go to array part) */
   int i = sizenode(t);
@@ -567,8 +567,8 @@
 
 
 static ArrayCell *resizearray (lua_State *L , Table *t,
-                               unsigned int oldasize,
-                               unsigned int newasize) {
+                               unsigned oldasize,
+                               unsigned newasize) {
   size_t oldasizeb = concretesize(oldasize);
   size_t newasizeb = concretesize(newasize);
   void *a = luaM_reallocvector(L, t->array, oldasizeb, newasizeb, lu_byte);
@@ -583,7 +583,7 @@
 ** comparison ensures that the shift in the second one does not
 ** overflow.
 */
-static void setnodevector (lua_State *L, Table *t, unsigned int size) {
+static void setnodevector (lua_State *L, Table *t, unsigned size) {
   if (size == 0) {  /* no elements to hash part? */
     t->node = cast(Node *, dummynode);  /* use common 'dummynode' */
     t->lsizenode = 0;
@@ -695,8 +695,8 @@
 ** nils and reinserts the elements of the old hash back into the new
 ** parts of the table.
 */
-void luaH_resize (lua_State *L, Table *t, unsigned int newasize,
-                                          unsigned int nhsize) {
+void luaH_resize (lua_State *L, Table *t, unsigned newasize,
+                                          unsigned nhsize) {
   Table newt;  /* to keep the new hash part */
   unsigned int oldasize = setlimittosize(t);
   ArrayCell *newarray;
diff --git a/ltable.h b/ltable.h
index 1f2ea3e..4734bd5 100644
--- a/ltable.h
+++ b/ltable.h
@@ -151,13 +151,13 @@
 LUAI_FUNC void luaH_finishset (lua_State *L, Table *t, const TValue *key,
                                               TValue *value, int hres);
 LUAI_FUNC Table *luaH_new (lua_State *L);
-LUAI_FUNC void luaH_resize (lua_State *L, Table *t, unsigned int nasize,
-                                                    unsigned int nhsize);
-LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, unsigned int nasize);
+LUAI_FUNC void luaH_resize (lua_State *L, Table *t, unsigned nasize,
+                                                    unsigned nhsize);
+LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, unsigned nasize);
 LUAI_FUNC void luaH_free (lua_State *L, Table *t);
 LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key);
 LUAI_FUNC lua_Unsigned luaH_getn (Table *t);
-LUAI_FUNC unsigned int luaH_realasize (const Table *t);
+LUAI_FUNC unsigned luaH_realasize (const Table *t);
 
 
 #if defined(LUA_DEBUG)
diff --git a/ltablib.c b/ltablib.c
index 4c3f690..a402dae 100644
--- a/ltablib.c
+++ b/ltablib.c
@@ -329,8 +329,7 @@
 /*
 ** Quicksort algorithm (recursive function)
 */
-static void auxsort (lua_State *L, IdxT lo, IdxT up,
-                                   unsigned int rnd) {
+static void auxsort (lua_State *L, IdxT lo, IdxT up, unsigned rnd) {
   while (lo < up) {  /* loop for tail recursion */
     IdxT p;  /* Pivot index */
     IdxT n;  /* to be used later */
diff --git a/ltests.c b/ltests.c
index 1a34870..4780673 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1008,7 +1008,7 @@
     lua_pushinteger(L, t->alimit);
     return 3;
   }
-  else if ((unsigned int)i < asize) {
+  else if (cast_uint(i) < asize) {
     lua_pushinteger(L, i);
     arr2obj(t, i + 1, s2v(L->top.p));
     api_incr_top(L);