lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, 12 Jan 2021 13:39:32 +0100, Thorkil Naur
> 
> LUA_VERSION_MAJOR is a string:
> 
> >  #define LUA_VERSION_MAJOR	"5"
> 
> So using it as a number in C is an error.
> 
> Best
> Thorkil

Oh, I'm very embarrassed for my carelessness...
Thank you for reply, Thorkil.

Here is a another patch, and it builds successfully.

Regards,

Lem



---------------- cut here ----------------
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Lemures Lemniscati <lemures.lemniscati@gmail.com>
Date: Tue, 12 Jan 2021 21:49:40 +0900
Subject: [PATCH] Fix LUA_VERSION_RELEASE_NUM and LUA_VERSION_NUM


diff --git a/lua.h b/lua.h
index c9d64d7f..336fc77c 100644
--- a/lua.h
+++ b/lua.h
@@ -20,8 +20,8 @@
 #define LUA_VERSION_MINOR	"4"
 #define LUA_VERSION_RELEASE	"2"
 
-#define LUA_VERSION_NUM			504
-#define LUA_VERSION_RELEASE_NUM		(LUA_VERSION_NUM * 100 + 0)
+#define LUA_VERSION_RELEASE_NUM	50402
+#define LUA_VERSION_NUM		(LUA_VERSION_RELEASE_NUM / 100)
 
 #define LUA_VERSION	"Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR
 #define LUA_RELEASE	LUA_VERSION "." LUA_VERSION_RELEASE

---------------- cut here ----------------
#!/bin/sh
/usr/bin/env base64 -d << __END__ \
> 0001-Fix-LUA_VERSION_RELEASE_NUM-and-LUA_VERSION_NUM.patch
RnJvbSAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBMZW11cmVzIExlbW5pc2NhdGkgPGxlbXVyZXMubGVtbmlzY2F0
aUBnbWFpbC5jb20+CkRhdGU6IFR1ZSwgMTIgSmFuIDIwMjEgMjE6NDk6NDAgKzA5MDAKU3ViamVj
dDog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