From ff8f6b5c66a2bba42f5f7c134ea8128ddb46dc3c Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 23 Apr 2010 18:16:31 +0000 Subject: [PATCH] minor formatting changes git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11996 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/typemaps/cstrings.swg | 3 +-- Lib/typemaps/strings.swg | 15 ++++++--------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Lib/typemaps/cstrings.swg b/Lib/typemaps/cstrings.swg index c60ef6496..7fe6a3f8f 100644 --- a/Lib/typemaps/cstrings.swg +++ b/Lib/typemaps/cstrings.swg @@ -147,8 +147,7 @@ */ %define Name ## _mutable(TYPEMAP,EXP...) -%typemap(in,noblock=1,fragment=#SWIG_AsCharPtrAndSize) TYPEMAP - (int res, Char* t = 0, size_t n = 0, int alloc = 0, size_t expansion = 0) { +%typemap(in,noblock=1,fragment=#SWIG_AsCharPtrAndSize) TYPEMAP (int res, Char *t = 0, size_t n = 0, int alloc = 0, size_t expansion = 0) { #if #EXP != "" expansion += EXP; #endif diff --git a/Lib/typemaps/strings.swg b/Lib/typemaps/strings.swg index 04fa28f5d..7c5f59ae2 100644 --- a/Lib/typemaps/strings.swg +++ b/Lib/typemaps/strings.swg @@ -54,7 +54,7 @@ /* out */ -%typemap(out,noblock=1,fragment=#SWIG_FromCharPtr) Char *, const Char* { +%typemap(out,noblock=1,fragment=#SWIG_FromCharPtr) Char *, const Char * { %set_output(SWIG_FromCharPtr((const Char *)$1)); } @@ -98,7 +98,7 @@ /* varout */ -%typemap(varout,noblock=1,fragment=#SWIG_FromCharPtr) Char*, const Char* { +%typemap(varout,noblock=1,fragment=#SWIG_FromCharPtr) Char *, const Char * { %set_varoutput(SWIG_FromCharPtr($1)); } @@ -165,8 +165,7 @@ /* directorout */ -%typemap(directorout,noblock=1,fragment=#SWIG_AsCharPtr,warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) - Char * (int res, Char* buf = 0, int alloc = SWIG_NEWOBJ) { +%typemap(directorout,noblock=1,fragment=#SWIG_AsCharPtr,warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) Char * (int res, Char *buf = 0, int alloc = SWIG_NEWOBJ) { res = SWIG_AsCharPtr($input, &buf, &alloc); if (!SWIG_IsOK(res)) { %dirout_fail(res, "$type"); @@ -184,9 +183,7 @@ } -%typemap(directorout,noblock=1,fragment=#SWIG_AsCharPtr,warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) - Char * const& (int res, Char* buf = 0, int alloc = SWIG_NEWOBJ), - Char const* const& (int res, Char* buf = 0, int alloc = SWIG_NEWOBJ) { +%typemap(directorout,noblock=1,fragment=#SWIG_AsCharPtr,warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) Char *const& (int res, Char *buf = 0, int alloc = SWIG_NEWOBJ), Char const*const& (int res, Char *buf = 0, int alloc = SWIG_NEWOBJ) { res = SWIG_AsCharPtr($input, &buf, &alloc); if (!SWIG_IsOK(res)) { %dirout_fail(res, "$type"); @@ -226,8 +223,8 @@ * Unknown size const Character array Char[ANY] handling * ------------------------------------------------------------ */ -%apply Char* { Char [] }; -%apply const Char* { const Char [] }; +%apply Char * { Char [] }; +%apply const Char * { const Char [] }; %typemap(varin,noblock=1,warning="462:Unable to set variable of type Char []") Char [] {