Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 357483
Collapse All | Expand All

(-)Source/Swig/stype.c (-5 / +4 lines)
Lines 823-829 Link Here
823
	Insert(result, 0, "(");
823
	Insert(result, 0, "(");
824
	Append(result, ")");
824
	Append(result, ")");
825
      }
825
      }
826
      isreference = 1;
826
      if (!isfunction)
827
	isreference = 1;
827
    } else if (SwigType_isarray(element)) {
828
    } else if (SwigType_isarray(element)) {
828
      DOH *size;
829
      DOH *size;
829
      if (firstarray && !isreference) {
830
      if (firstarray && !isreference) {
Lines 869-878 Link Here
869
    cast = NewStringf("(%s)", result);
870
    cast = NewStringf("(%s)", result);
870
  }
871
  }
871
  if (name) {
872
  if (name) {
872
    if (!isfunction) {
873
    if (isreference) {
873
      if (isreference) {
874
      Append(cast, "*");
874
	Append(cast, "*");
875
      }
876
    }
875
    }
877
    Append(cast, name);
876
    Append(cast, name);
878
  }
877
  }
(-)Examples/test-suite/funcptr_cpp.i (+11 lines)
Lines 20-22 Link Here
20
%constant int (*ADD_BY_VALUE)(const int &, int) = addByValue;
20
%constant int (*ADD_BY_VALUE)(const int &, int) = addByValue;
21
%constant int * (*ADD_BY_POINTER)(const int &, int) = addByPointer;
21
%constant int * (*ADD_BY_POINTER)(const int &, int) = addByPointer;
22
%constant int & (*ADD_BY_REFERENCE)(const int &, int) = addByReference;
22
%constant int & (*ADD_BY_REFERENCE)(const int &, int) = addByReference;
23
24
25
%inline %{
26
typedef int AddByValueTypedef(const int &a, int b);
27
typedef int * AddByPointerTypedef(const int &a, int b);
28
typedef int & AddByReferenceTypedef(const int &a, int b);
29
void *typedef_call1(AddByValueTypedef *& precallback, AddByValueTypedef * postcallback) { return 0; }
30
void *typedef_call2(AddByPointerTypedef *& precallback, AddByPointerTypedef * postcallback) { return 0; }
31
void *typedef_call3(AddByReferenceTypedef *& precallback, AddByReferenceTypedef * postcallback) { return 0; }
32
%}
33

Return to bug 357483