rpms/tolua++/devel tolua++-1.0.92-gcc43.patch, NONE, 1.1 tolua++.spec, 1.5, 1.6

Tim Niemueller (timn) fedora-extras-commits at redhat.com
Fri Mar 14 10:30:27 UTC 2008


Author: timn

Update of /cvs/pkgs/rpms/tolua++/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2663

Modified Files:
	tolua++.spec 
Added Files:
	tolua++-1.0.92-gcc43.patch 
Log Message:
Added patch to make tolua++ compatible with GCC 4.3

tolua++-1.0.92-gcc43.patch:

--- NEW FILE tolua++-1.0.92-gcc43.patch ---
diff -urN tolua++-1.0.92/include/tolua++.h tolua++-1.0.92.gcc43/include/tolua++.h
--- tolua++-1.0.92/include/tolua++.h	2006-04-27 05:33:40.000000000 +0200
+++ tolua++-1.0.92.gcc43/include/tolua++.h	2008-03-13 23:20:12.000000000 +0100
@@ -53,7 +53,7 @@
 #define TOLUA_NOPEER	LUA_REGISTRYINDEX /* for lua 5.1 */
 
 TOLUA_API const char* tolua_typename (lua_State* L, int lo);
-TOLUA_API void tolua_error (lua_State* L, char* msg, tolua_Error* err);
+TOLUA_API void tolua_error (lua_State* L, const char* msg, tolua_Error* err);
 TOLUA_API int tolua_isnoobj (lua_State* L, int lo, tolua_Error* err);
 TOLUA_API int tolua_isvalue (lua_State* L, int lo, int def, tolua_Error* err);
 TOLUA_API int tolua_isboolean (lua_State* L, int lo, int def, tolua_Error* err);
@@ -84,16 +84,15 @@
 TOLUA_API int tolua_register_gc (lua_State* L, int lo);
 TOLUA_API int tolua_default_collect (lua_State* tolua_S);
 
-TOLUA_API void tolua_usertype (lua_State* L, char* type);
-TOLUA_API void tolua_beginmodule (lua_State* L, char* name);
+TOLUA_API void tolua_usertype (lua_State* L, const char* type);
+TOLUA_API void tolua_beginmodule (lua_State* L, const char* name);
 TOLUA_API void tolua_endmodule (lua_State* L);
-TOLUA_API void tolua_module (lua_State* L, char* name, int hasvar);
-TOLUA_API void tolua_class (lua_State* L, char* name, char* base);
-TOLUA_API void tolua_cclass (lua_State* L, char* lname, char* name, char* base, lua_CFunction col);
-TOLUA_API void tolua_function (lua_State* L, char* name, lua_CFunction func);
-TOLUA_API void tolua_constant (lua_State* L, char* name, double value);
-TOLUA_API void tolua_variable (lua_State* L, char* name, lua_CFunction get, lua_CFunction set);
-TOLUA_API void tolua_array (lua_State* L,char* name, lua_CFunction get, lua_CFunction set);
+TOLUA_API void tolua_module (lua_State* L, const char* name, int hasvar);
+TOLUA_API void tolua_cclass (lua_State* L, const char* lname, const char* name, const char* base, lua_CFunction col);
+TOLUA_API void tolua_function (lua_State* L, const char* name, lua_CFunction func);
+TOLUA_API void tolua_constant (lua_State* L, const char* name, double value);
+TOLUA_API void tolua_variable (lua_State* L, const char* name, lua_CFunction get, lua_CFunction set);
+TOLUA_API void tolua_array (lua_State* L, const char* name, lua_CFunction get, lua_CFunction set);
 
 /* TOLUA_API void tolua_set_call_event(lua_State* L, lua_CFunction func, char* type); */
 /* TOLUA_API void tolua_addbase(lua_State* L, char* name, char* base); */
diff -urN tolua++-1.0.92/src/lib/tolua_is.c tolua++-1.0.92.gcc43/src/lib/tolua_is.c
--- tolua++-1.0.92/src/lib/tolua_is.c	2005-12-19 02:13:05.000000000 +0100
+++ tolua++-1.0.92.gcc43/src/lib/tolua_is.c	2008-03-13 23:11:27.000000000 +0100
@@ -85,7 +85,7 @@
 	return lua_tostring(L,-1);
 }
 
-TOLUA_API void tolua_error (lua_State* L, char* msg, tolua_Error* err)
+TOLUA_API void tolua_error (lua_State* L, const char* msg, tolua_Error* err)
 {
 	if (msg[0] == '#')
 	{
diff -urN tolua++-1.0.92/src/lib/tolua_map.c tolua++-1.0.92.gcc43/src/lib/tolua_map.c
--- tolua++-1.0.92/src/lib/tolua_map.c	2006-03-13 23:37:49.000000000 +0100
+++ tolua++-1.0.92.gcc43/src/lib/tolua_map.c	2008-03-13 23:21:58.000000000 +0100
@@ -389,7 +389,7 @@
 	* It creates the correspoding metatable in the registry, for both 'type' and 'const type'.
 	* It maps 'const type' as being also a 'type'
 */
-TOLUA_API void tolua_usertype (lua_State* L, char* type)
+TOLUA_API void tolua_usertype (lua_State* L, const char* type)
 {
  char ctype[128] = "const ";
  strncat(ctype,type,120);
@@ -403,7 +403,7 @@
 /* Begin module
 	* It pushes the module (or class) table on the stack
 */
-TOLUA_API void tolua_beginmodule (lua_State* L, char* name)
+TOLUA_API void tolua_beginmodule (lua_State* L, const char* name)
 {
 	if (name)
 	{
@@ -426,7 +426,7 @@
 	* It creates a new module
 */
 #if 1
-TOLUA_API void tolua_module (lua_State* L, char* name, int hasvar)
+TOLUA_API void tolua_module (lua_State* L, const char* name, int hasvar)
 {
 	if (name)
 	{
@@ -462,7 +462,7 @@
 	lua_pop(L,1);               /* pop module */
 }
 #else
-TOLUA_API void tolua_module (lua_State* L, char* name, int hasvar)
+TOLUA_API void tolua_module (lua_State* L, const char* name, int hasvar)
 {
 	if (name)
 	{
@@ -518,7 +518,7 @@
 /* Map C class
 	* It maps a C class, setting the appropriate inheritance and super classes.
 */
-TOLUA_API void tolua_cclass (lua_State* L, char* lname, char* name, char* base, lua_CFunction col)
+TOLUA_API void tolua_cclass (lua_State* L, const char* lname, const char* name, const char* base, lua_CFunction col)
 {
 	char cname[128] = "const ";
 	char cbase[128] = "const ";
@@ -577,7 +577,7 @@
 /* Map function
 	* It assigns a function into the current module (or class)
 */
-TOLUA_API void tolua_function (lua_State* L, char* name, lua_CFunction func)
+TOLUA_API void tolua_function (lua_State* L, const char* name, lua_CFunction func)
 {
  lua_pushstring(L,name);
  lua_pushcfunction(L,func);
@@ -600,7 +600,7 @@
 /* Map constant number
 	* It assigns a constant number into the current module (or class)
 */
-TOLUA_API void tolua_constant (lua_State* L, char* name, double value)
+TOLUA_API void tolua_constant (lua_State* L, const char* name, double value)
 {
 	lua_pushstring(L,name);
 	tolua_pushnumber(L,value);
@@ -611,7 +611,7 @@
 /* Map variable
 	* It assigns a variable into the current module (or class)
 */
-TOLUA_API void tolua_variable (lua_State* L, char* name, lua_CFunction get, lua_CFunction set)
+TOLUA_API void tolua_variable (lua_State* L, const char* name, lua_CFunction get, lua_CFunction set)
 {
 	/* get func */
 	lua_pushstring(L,".get");
@@ -663,7 +663,7 @@
 /* Map an array
 	* It assigns an array into the current module (or class)
 */
-TOLUA_API void tolua_array (lua_State* L, char* name, lua_CFunction get, lua_CFunction set)
+TOLUA_API void tolua_array (lua_State* L, const char* name, lua_CFunction get, lua_CFunction set)
 {
 	lua_pushstring(L,".get");
 	lua_rawget(L,-2);


Index: tolua++.spec
===================================================================
RCS file: /cvs/pkgs/rpms/tolua++/devel/tolua++.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- tolua++.spec	19 Feb 2008 16:53:47 -0000	1.5
+++ tolua++.spec	14 Mar 2008 10:29:52 -0000	1.6
@@ -2,13 +2,14 @@
 
 Name:           tolua++
 Version:        1.0.92
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        A tool to integrate C/C++ code with Lua
 Group:          Development/Tools
 License:        Freely redistributable without restriction
 URL:            http://www.codenix.com/~tolua/
 Source0:        http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
 Patch0:         tolua++-1.0.92-makeso.patch
+Patch1:         tolua++-1.0.92-gcc43.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  scons
 BuildRequires:  lua-devel >= 5.1
@@ -31,6 +32,7 @@
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 sed -i 's/\r//' doc/%{name}.html
 
 
@@ -74,6 +76,9 @@
 
 
 %changelog
+* Thu Mar 13 2008 Tim Niemueller <tim at niemueller.de> - 1.0.92-7
+- Added patch to make tolua++ compatible with GCC 4.3
+
 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 1.0.92-6
 - Autorebuild for GCC 4.3
 




More information about the fedora-extras-commits mailing list