Changeset 3127 for code/branches/pch/src/tolua/lua/array.lua
- Timestamp:
- Jun 9, 2009, 4:29:42 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pch/src/tolua/lua/array.lua
r2710 r3127 102 102 -- return value 103 103 local t,ct = isbasic(self.type) 104 local push_func = get_push_function(t) 104 105 if t then 105 106 output(' tolua_push'..t..'(tolua_S,(',ct,')'..self:getvalue(class,static)..');') … … 107 108 t = self.type 108 109 if self.ptr == '&' or self.ptr == '' then 109 output(' tolua_pushusertype(tolua_S,(void*)&'..self:getvalue(class,static)..',"',t,'");')110 else 111 output(' tolua_pushusertype(tolua_S,(void*)'..self:getvalue(class,static)..',"',t,'");')110 output(' ',push_func,'(tolua_S,(void*)&'..self:getvalue(class,static)..',"',t,'");') 111 else 112 output(' ',push_func,'(tolua_S,(void*)'..self:getvalue(class,static)..',"',t,'");') 112 113 end 113 114 end … … 193 194 output('tolua_to'..t,'(tolua_S,3,',def,'));') 194 195 else 195 output('tolua_tousertype(tolua_S,3,',def,'));') 196 local to_func = get_to_function(self.type) 197 output(to_func,'(tolua_S,3,',def,'));') 196 198 end 197 199 output(' return 0;') … … 203 205 204 206 function classArray:register (pre) 207 if not self:check_public_access() then 208 return 209 end 210 205 211 pre = pre or '' 206 212 if self.csetname then
Note: See TracChangeset
for help on using the changeset viewer.