summaryrefslogtreecommitdiff
path: root/Lib/lua
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2010-04-23 06:44:47 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2010-04-23 06:44:47 +0000
commit2535297efbc72e857ac0865a4bd3e0e4ca331ca2 (patch)
tree80c195b333f01b02c3ddd4c529534d4454e57eb3 /Lib/lua
parentbdea09ed83828592b08b1151e0f14517cccd8b68 (diff)
downloadswig-2535297efbc72e857ac0865a4bd3e0e4ca331ca2.tar.gz
minor formatting change
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11995 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/lua')
-rw-r--r--Lib/lua/lua.swg2
-rw-r--r--Lib/lua/luatypemaps.swg10
-rw-r--r--Lib/lua/wchar.i8
3 files changed, 10 insertions, 10 deletions
diff --git a/Lib/lua/lua.swg b/Lib/lua/lua.swg
index 5218bf0a8..a15f14148 100644
--- a/Lib/lua/lua.swg
+++ b/Lib/lua/lua.swg
@@ -176,7 +176,7 @@ use %include <std_except.i> instead
%{lua_pushnumber(L,(lua_Number)(int)$1);SWIG_fail; %}
// strings are just sent as errors
-%typemap(throws) char*, const char*
+%typemap(throws) char *, const char *
%{lua_pushstring(L,$1);SWIG_fail;%}
// char is changed to a string
diff --git a/Lib/lua/luatypemaps.swg b/Lib/lua/luatypemaps.swg
index ae65cbfea..aff116192 100644
--- a/Lib/lua/luatypemaps.swg
+++ b/Lib/lua/luatypemaps.swg
@@ -89,7 +89,7 @@ temp=($basetype)lua_tonumber(L,$input); $1=&temp;%}
%typemap(out) const bool&
%{ lua_pushboolean(L,(int)((*$1)!=0)); SWIG_arg++;%}
-// strings (char* and char[])
+// strings (char * and char[])
%fragment("SWIG_lua_isnilstring", "header") {
int SWIG_lua_isnilstring(lua_State *L, int idx) {
int ret = lua_isstring(L, idx);
@@ -99,17 +99,17 @@ temp=($basetype)lua_tonumber(L,$input); $1=&temp;%}
}
}
-%typemap(in,checkfn="SWIG_lua_isnilstring",fragment="SWIG_lua_isnilstring") const char*, char*
+%typemap(in,checkfn="SWIG_lua_isnilstring",fragment="SWIG_lua_isnilstring") const char *, char *
%{$1 = ($ltype)lua_tostring(L, $input);%}
%typemap(in,checkfn="SWIG_lua_isnilstring",fragment="SWIG_lua_isnilstring") const char[ANY], char[ANY]
%{$1 = ($ltype)lua_tostring(L, $input);%}
-%typemap(out) const char*, char*
-%{ lua_pushstring(L,(const char*)$1); SWIG_arg++;%}
+%typemap(out) const char *, char *
+%{ lua_pushstring(L,(const char *)$1); SWIG_arg++;%}
%typemap(out) const char[ANY], char[ANY]
-%{ lua_pushstring(L,(const char*)$1); SWIG_arg++;%}
+%{ lua_pushstring(L,(const char *)$1); SWIG_arg++;%}
// char's
// currently treating chars as small strings, not as numbers
diff --git a/Lib/lua/wchar.i b/Lib/lua/wchar.i
index 02b5428be..92f7ed0e2 100644
--- a/Lib/lua/wchar.i
+++ b/Lib/lua/wchar.i
@@ -12,11 +12,11 @@
%{
#include <stdlib.h>
-wchar_t* str2wstr(const char* str, int len)
+wchar_t* str2wstr(const char *str, int len)
{
wchar_t* p;
if (str==0 || len<1) return 0;
- p=(wchar*)malloc((len+1)*sizeof(wchar_t));
+ p=(wchar *)malloc((len+1)*sizeof(wchar_t));
if (p==0) return 0;
if (mbstowcs(p, str, len)==-1)
{
@@ -28,13 +28,13 @@ wchar_t* str2wstr(const char* str, int len)
}
%}
-%typemap(in, checkfn="SWIG_lua_isnilstring", fragment="SWIG_lua_isnilstring") wchar_t*
+%typemap(in, checkfn="SWIG_lua_isnilstring", fragment="SWIG_lua_isnilstring") wchar_t *
%{
$1 = str2wstr(lua_tostring( L, $input ),lua_strlen( L, $input ));
if ($1==0) {lua_pushfstring(L,"Error in converting to wchar (arg %d)",$input);goto fail;}
%}
-%typemap(freearg) wchar_t*
+%typemap(freearg) wchar_t *
%{
free($1);
%}