Index: Source/Swig/stype.c =================================================================== --- Source/Swig/stype.c (Revision 12813) +++ Source/Swig/stype.c (Revision 12814) @@ -823,7 +823,8 @@ Insert(result, 0, "("); Append(result, ")"); } - isreference = 1; + if (!isfunction) + isreference = 1; } else if (SwigType_isarray(element)) { DOH *size; if (firstarray && !isreference) { @@ -869,10 +870,8 @@ cast = NewStringf("(%s)", result); } if (name) { - if (!isfunction) { - if (isreference) { - Append(cast, "*"); - } + if (isreference) { + Append(cast, "*"); } Append(cast, name); } Index: Examples/test-suite/funcptr_cpp.i =================================================================== --- Examples/test-suite/funcptr_cpp.i (Revision 12813) +++ Examples/test-suite/funcptr_cpp.i (Revision 12814) @@ -20,3 +20,14 @@ %constant int (*ADD_BY_VALUE)(const int &, int) = addByValue; %constant int * (*ADD_BY_POINTER)(const int &, int) = addByPointer; %constant int & (*ADD_BY_REFERENCE)(const int &, int) = addByReference; + + +%inline %{ +typedef int AddByValueTypedef(const int &a, int b); +typedef int * AddByPointerTypedef(const int &a, int b); +typedef int & AddByReferenceTypedef(const int &a, int b); +void *typedef_call1(AddByValueTypedef *& precallback, AddByValueTypedef * postcallback) { return 0; } +void *typedef_call2(AddByPointerTypedef *& precallback, AddByPointerTypedef * postcallback) { return 0; } +void *typedef_call3(AddByReferenceTypedef *& precallback, AddByReferenceTypedef * postcallback) { return 0; } +%} +