You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by fu...@apache.org on 2013/04/11 02:19:30 UTC
svn commit: r1466743 - /httpd/httpd/trunk/modules/lua/lua_request.c
Author: fuankg
Date: Thu Apr 11 00:19:30 2013
New Revision: 1466743
URL: http://svn.apache.org/r1466743
Log:
Fixed Lua r:stat() time values.
Modified:
httpd/httpd/trunk/modules/lua/lua_request.c
Modified: httpd/httpd/trunk/modules/lua/lua_request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_request.c?rev=1466743&r1=1466742&r2=1466743&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_request.c (original)
+++ httpd/httpd/trunk/modules/lua/lua_request.c Thu Apr 11 00:19:30 2013
@@ -1208,23 +1208,23 @@ static int lua_ap_stat(lua_State *L)
lua_newtable(L);
lua_pushstring(L, "mtime");
- lua_pushinteger(L, file_info.mtime);
+ lua_pushinteger(L, (ptrdiff_t)(file_info.mtime / 1000000));
lua_settable(L, -3);
lua_pushstring(L, "atime");
- lua_pushinteger(L, file_info.atime);
+ lua_pushinteger(L, (ptrdiff_t)(file_info.atime / 1000000));
lua_settable(L, -3);
lua_pushstring(L, "ctime");
- lua_pushinteger(L, file_info.ctime);
+ lua_pushinteger(L, (ptrdiff_t)(file_info.ctime / 1000000));
lua_settable(L, -3);
lua_pushstring(L, "size");
- lua_pushinteger(L, file_info.size);
+ lua_pushinteger(L, (ptrdiff_t)file_info.size);
lua_settable(L, -3);
lua_pushstring(L, "filetype");
- lua_pushinteger(L, file_info.filetype);
+ lua_pushinteger(L, (ptrdiff_t)file_info.filetype);
lua_settable(L, -3);
return 1;