summaryrefslogtreecommitdiff
path: root/llimits.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-03 11:03:21 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-03 11:03:21 -0300
commit1088cde03c5551bab90e211e979b11278d666cd5 (patch)
treec89d322dcbeff8cd3779a32e8fc182656b212ef3 /llimits.h
parent6759f3ec5e845db6d2637f401d82d707411e41ed (diff)
downloadlua-1088cde03c5551bab90e211e979b11278d666cd5.tar.gz
lua-1088cde03c5551bab90e211e979b11278d666cd5.tar.bz2
lua-1088cde03c5551bab90e211e979b11278d666cd5.zip
easier way to change type Number
Diffstat (limited to 'llimits.h')
-rw-r--r--llimits.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/llimits.h b/llimits.h
index 80acda78..a164d766 100644
--- a/llimits.h
+++ b/llimits.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llimits.h,v 1.14 2000/08/29 14:48:16 roberto Exp roberto $ 2** $Id: llimits.h,v 1.15 2000/09/29 12:42:13 roberto Exp roberto $
3** Limits, basic types, and some other "installation-dependent" definitions 3** Limits, basic types, and some other "installation-dependent" definitions
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -41,6 +41,13 @@
41 41
42typedef LUA_NUM_TYPE Number; 42typedef LUA_NUM_TYPE Number;
43 43
44/* function to convert a Number to a string */
45#define lua_number2str(s,n) sprintf((s), "%.16g", (n))
46
47/* function to convert a string to a Number */
48#define lua_str2number(s,p) strtod((s), (p))
49
50
44 51
45typedef unsigned long lint32; /* unsigned int with at least 32 bits */ 52typedef unsigned long lint32; /* unsigned int with at least 32 bits */
46 53