diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-04-25 11:10:00 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-04-25 11:10:00 -0300 |
| commit | bced00ab9efcdc68982b5e3787f277b86ea3cde8 (patch) | |
| tree | 85901ada4296ac533b2169b922885f7fc9d9e415 /fallback.c | |
| parent | 25116a306598b8f30606552a4570f752ac141397 (diff) | |
| download | lua-bced00ab9efcdc68982b5e3787f277b86ea3cde8.tar.gz lua-bced00ab9efcdc68982b5e3787f277b86ea3cde8.tar.bz2 lua-bced00ab9efcdc68982b5e3787f277b86ea3cde8.zip | |
lua_Reference is int, so say so.
Diffstat (limited to 'fallback.c')
| -rw-r--r-- | fallback.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -3,7 +3,7 @@ | |||
| 3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | char *rcs_fallback="$Id: fallback.c,v 1.23 1996/03/21 16:31:32 roberto Exp roberto $"; | 6 | char *rcs_fallback="$Id: fallback.c,v 1.24 1996/04/22 18:00:37 roberto Exp roberto $"; |
| 7 | 7 | ||
| 8 | #include <stdio.h> | 8 | #include <stdio.h> |
| 9 | #include <string.h> | 9 | #include <string.h> |
| @@ -122,7 +122,7 @@ static struct ref { | |||
| 122 | } *refArray = NULL; | 122 | } *refArray = NULL; |
| 123 | static int refSize = 0; | 123 | static int refSize = 0; |
| 124 | 124 | ||
| 125 | lua_Reference luaI_ref (Object *object, int lock) | 125 | int luaI_ref (Object *object, int lock) |
| 126 | { | 126 | { |
| 127 | int i; | 127 | int i; |
| 128 | int oldSize; | 128 | int oldSize; |
| @@ -144,14 +144,14 @@ lua_Reference luaI_ref (Object *object, int lock) | |||
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | 146 | ||
| 147 | void lua_unref (lua_Reference ref) | 147 | void lua_unref (int ref) |
| 148 | { | 148 | { |
| 149 | if (ref >= 0 && ref < refSize) | 149 | if (ref >= 0 && ref < refSize) |
| 150 | refArray[ref].status = FREE; | 150 | refArray[ref].status = FREE; |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | 153 | ||
| 154 | Object *luaI_getref (lua_Reference ref) | 154 | Object *luaI_getref (int ref) |
| 155 | { | 155 | { |
| 156 | static Object nul = {LUA_T_NIL, {0}}; | 156 | static Object nul = {LUA_T_NIL, {0}}; |
| 157 | if (ref == -1) | 157 | if (ref == -1) |
