mirror of
https://github.com/lua/lua
synced 2024-12-24 03:16:50 +03:00
macro 'char2int' replaced by 'cast_uchar' (used by other files)
This commit is contained in:
parent
067f761739
commit
fd5e810e08
4
lzio.c
4
lzio.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lzio.c,v 1.32 2011/02/17 17:34:16 roberto Exp roberto $
|
||||
** $Id: lzio.c,v 1.33 2011/02/23 13:13:10 roberto Exp roberto $
|
||||
** a generic input stream interface
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -29,7 +29,7 @@ int luaZ_fill (ZIO *z) {
|
||||
return EOZ;
|
||||
z->n = size - 1; /* discount char being returned */
|
||||
z->p = buff;
|
||||
return char2int(*(z->p++));
|
||||
return cast_uchar(*(z->p++));
|
||||
}
|
||||
|
||||
|
||||
|
6
lzio.h
6
lzio.h
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lzio.h,v 1.23 2011/02/17 17:34:16 roberto Exp roberto $
|
||||
** $Id: lzio.h,v 1.24 2011/02/23 13:13:10 roberto Exp roberto $
|
||||
** Buffered streams
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -17,9 +17,7 @@
|
||||
|
||||
typedef struct Zio ZIO;
|
||||
|
||||
#define char2int(c) cast(int, cast(unsigned char, (c)))
|
||||
|
||||
#define zgetc(z) (((z)->n--)>0 ? char2int(*(z)->p++) : luaZ_fill(z))
|
||||
#define zgetc(z) (((z)->n--)>0 ? cast_uchar(*(z)->p++) : luaZ_fill(z))
|
||||
|
||||
#define zungetc(z) ((z)->n++, (z)->p--)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user