Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Andreas HAttel (dilfridge)" <dilfridge@g.o>
Subject: gentoo-x86 commit in dev-lang/swig/files: swig-2.0.4-typedef.patch
Date: Sun, 13 Nov 2011 12:04:42 +0000 (UTC)
dilfridge    11/11/13 12:04:42

  Added:                swig-2.0.4-typedef.patch
  Log:
  Backport upstream fix for bug 357483, acked by pchrist
  
  (Portage version: 2.1.10.34/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  dev-lang/swig/files/swig-2.0.4-typedef.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/swig/files/swig-2.0.4-typedef.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/swig/files/swig-2.0.4-typedef.patch?rev=1.1&content-type=text/plain

Index: swig-2.0.4-typedef.patch
===================================================================
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; }
+%}
+





Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in dev-lang/swig: ChangeLog swig-2.0.4-r1.ebuild
Next by thread:
gentoo-x86 commit in dev-lang/ekopath: ChangeLog
Previous by date:
gentoo-x86 commit in dev-lang/swig: ChangeLog swig-2.0.4-r1.ebuild
Next by date:
dev/dilfridge:master commit in: dev-python/pivy/


Updated Jun 26, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.