1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-21 15:09:02 +00:00

Upgrading to Lua 5.2.1. (Should be harmless upgrade, bug-fix only.)

This commit is contained in:
batrick
2012-06-16 06:02:57 +00:00
parent 8ad2c789b9
commit 9a0e881b2b
36 changed files with 926 additions and 606 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lmathlib.c,v 1.80 2011/07/05 12:49:35 roberto Exp $
** $Id: lmathlib.c,v 1.81 2012/05/18 17:47:53 roberto Exp $
** Standard mathematical library
** See Copyright Notice in lua.h
*/
@@ -17,17 +17,17 @@
#include "lualib.h"
#undef PI
#define PI (3.14159265358979323846)
#define RADIANS_PER_DEGREE (PI/180.0)
/* macro 'l_tg' allows the addition of an 'l' or 'f' to all math operations */
#if !defined(l_tg)
#define l_tg(x) (x)
#endif
#undef PI
#define PI (l_tg(3.1415926535897932384626433832795))
#define RADIANS_PER_DEGREE (PI/180.0)
static int math_abs (lua_State *L) {
lua_pushnumber(L, l_tg(fabs)(luaL_checknumber(L, 1)));