[Python-modules-commits] r14330 - in packages/shiboken/trunk/debian (4 files)

odyx-guest at users.alioth.debian.org odyx-guest at users.alioth.debian.org
Tue Aug 31 12:53:12 UTC 2010


    Date: Tuesday, August 31, 2010 @ 12:53:10
  Author: odyx-guest
Revision: 14330

  - u_46ab0d6_generated_original_name_with_star_for_object_classes.patch
    Import from upstream for bug #311.
  - u_1eda671_fix_type_resolver_algorithm.patch: Import from upstream for
    bug #243.

Added:
  packages/shiboken/trunk/debian/patches/u_46ab0d6_generated_original_name_with_star_for_object_classes.patch
Modified:
  packages/shiboken/trunk/debian/changelog
  packages/shiboken/trunk/debian/patches/series
  packages/shiboken/trunk/debian/patches/u_1eda671_fix_type_resolver_algorithm.patch

Modified: packages/shiboken/trunk/debian/changelog
===================================================================
--- packages/shiboken/trunk/debian/changelog	2010-08-31 12:47:13 UTC (rev 14329)
+++ packages/shiboken/trunk/debian/changelog	2010-08-31 12:53:10 UTC (rev 14330)
@@ -1,13 +1,16 @@
 shiboken (0.4.0-1~exp1) experimental; urgency=low
 
   * Patches: 
-    - u_1eda671_fix_type_resolver_algorithm.patch: Import from upstream
+    - u_46ab0d6_generated_original_name_with_star_for_object_classes.patch
+      Import from upstream for bug #311.
+    - u_1eda671_fix_type_resolver_algorithm.patch: Import from upstream for
+      bug #243.
 
   * Bump libapiextractor B-D to 0.7.0-1~exp2, to correct qtgui_qwidget test
     segfault in pyside, together with the above patch.
   * Update symbols file.
 
- -- Didier Raboud <didier at raboud.com>  Tue, 31 Aug 2010 12:39:01 +0200
+ -- Didier Raboud <didier at raboud.com>  Tue, 31 Aug 2010 14:51:37 +0200
 
 shiboken (0.4.0-1~exp0) experimental; urgency=low
 

Modified: packages/shiboken/trunk/debian/patches/series
===================================================================
--- packages/shiboken/trunk/debian/patches/series	2010-08-31 12:47:13 UTC (rev 14329)
+++ packages/shiboken/trunk/debian/patches/series	2010-08-31 12:53:10 UTC (rev 14330)
@@ -1,2 +1,3 @@
+u_46ab0d6_generated_original_name_with_star_for_object_classes.patch
 u_1eda671_fix_type_resolver_algorithm.patch
 allowCustomShibokenPostfix.patch

Modified: packages/shiboken/trunk/debian/patches/u_1eda671_fix_type_resolver_algorithm.patch
===================================================================
--- packages/shiboken/trunk/debian/patches/u_1eda671_fix_type_resolver_algorithm.patch	2010-08-31 12:47:13 UTC (rev 14329)
+++ packages/shiboken/trunk/debian/patches/u_1eda671_fix_type_resolver_algorithm.patch	2010-08-31 12:53:10 UTC (rev 14330)
@@ -37,8 +37,8 @@
 
 Index: shiboken/cppgenerator.cpp
 ===================================================================
---- shiboken.orig/cppgenerator.cpp	2010-08-03 19:29:13.000000000 +0200
-+++ shiboken/cppgenerator.cpp	2010-08-31 11:44:17.000000000 +0200
+--- shiboken.orig/cppgenerator.cpp	2010-08-31 14:50:48.000000000 +0200
++++ shiboken/cppgenerator.cpp	2010-08-31 14:50:53.000000000 +0200
 @@ -367,7 +367,7 @@
      writeClassDefinition(s, metaClass);
      s << endl;
@@ -56,7 +56,7 @@
      bool firstClass = true;
      foreach (const AbstractMetaClass* baseClass, getAllAncestors(metaClass)) {
          s << INDENT << (!firstClass ? "else " : "") << "if (desiredType == reinterpret_cast<SbkBaseWrapperType*>(" << cpythonTypeNameExt(baseClass->typeEntry()) << "))\n";
-@@ -3199,8 +3198,8 @@
+@@ -3202,8 +3201,8 @@
      if (metaClass->baseClass())
          s << INDENT << pyTypeName << ".super.ht_type.tp_base = " << cpythonTypeNameExt(metaClass->baseClass()->typeEntry()) << ';' << endl;
      // Multiple inheritance
@@ -66,7 +66,7 @@
          s << INDENT << pyTypeName << ".super.ht_type.tp_bases = PyTuple_Pack(";
          s << baseClasses.size();
          s << ',' << endl;
-@@ -3221,21 +3220,11 @@
+@@ -3224,21 +3223,11 @@
      // Set typediscovery struct or fill the struct of another one
      if (metaClass->isPolymorphic()) {
          s << INDENT << "// Fill type discovery information"  << endl;
@@ -93,7 +93,7 @@
              }
          }
          s << endl;
-@@ -3307,16 +3296,8 @@
+@@ -3310,16 +3299,8 @@
  void CppGenerator::writeTypeDiscoveryFunction(QTextStream& s, const AbstractMetaClass* metaClass)
  {
      QString polymorphicExpr = metaClass->typeEntry()->polymorphicIdValue();
@@ -110,7 +110,7 @@
  
      if (!metaClass->baseClass()) {
          s << INDENT << "TypeResolver* typeResolver = TypeResolver::get(typeid(*reinterpret_cast<"
-@@ -3326,13 +3307,31 @@
+@@ -3329,13 +3310,31 @@
              Indentation indent(INDENT);
              s << INDENT << "return reinterpret_cast<SbkBaseWrapperType*>(typeResolver->pythonType());" << endl;
          }
@@ -145,8 +145,8 @@
      s << "}\n\n";
 Index: shiboken/libshiboken/basewrapper.cpp
 ===================================================================
---- shiboken.orig/libshiboken/basewrapper.cpp	2010-08-03 19:29:13.000000000 +0200
-+++ shiboken/libshiboken/basewrapper.cpp	2010-08-31 11:44:17.000000000 +0200
+--- shiboken.orig/libshiboken/basewrapper.cpp	2010-08-31 14:50:48.000000000 +0200
++++ shiboken/libshiboken/basewrapper.cpp	2010-08-31 14:50:53.000000000 +0200
 @@ -264,11 +264,19 @@
  PyObject* SbkBaseWrapper_New(SbkBaseWrapperType* instanceType,
                               void* cptr,
@@ -170,7 +170,7 @@
  
      SbkBaseWrapper* self = reinterpret_cast<SbkBaseWrapper*>(SbkBaseWrapper_TpNew(reinterpret_cast<PyTypeObject*>(instanceType), 0, 0));
      self->cptr[0] = cptr;
-@@ -609,22 +617,6 @@
+@@ -613,22 +621,6 @@
  
  }
  
@@ -195,8 +195,8 @@
      public:
 Index: shiboken/libshiboken/basewrapper.h
 ===================================================================
---- shiboken.orig/libshiboken/basewrapper.h	2010-08-03 19:29:13.000000000 +0200
-+++ shiboken/libshiboken/basewrapper.h	2010-08-31 11:44:17.000000000 +0200
+--- shiboken.orig/libshiboken/basewrapper.h	2010-08-31 14:50:38.000000000 +0200
++++ shiboken/libshiboken/basewrapper.h	2010-08-31 14:50:53.000000000 +0200
 @@ -56,6 +56,7 @@
  /// Function signature for the multiple inheritance information initializers that should be provided by classes with multiple inheritance.
  typedef int* (*MultipleInheritanceInitFunction)(const void*);
@@ -249,8 +249,8 @@
  SbkBaseWrapper_TpNew(PyTypeObject* subtype, PyObject*, PyObject*);
 Index: shiboken/libshiboken/bindingmanager.cpp
 ===================================================================
---- shiboken.orig/libshiboken/bindingmanager.cpp	2010-08-03 19:29:13.000000000 +0200
-+++ shiboken/libshiboken/bindingmanager.cpp	2010-08-31 11:44:17.000000000 +0200
+--- shiboken.orig/libshiboken/bindingmanager.cpp	2010-08-31 14:50:39.000000000 +0200
++++ shiboken/libshiboken/bindingmanager.cpp	2010-08-31 14:50:53.000000000 +0200
 @@ -33,16 +33,71 @@
   */
  
@@ -351,8 +351,8 @@
  
 Index: shiboken/libshiboken/bindingmanager.h
 ===================================================================
---- shiboken.orig/libshiboken/bindingmanager.h	2010-08-03 19:29:13.000000000 +0200
-+++ shiboken/libshiboken/bindingmanager.h	2010-08-31 11:44:17.000000000 +0200
+--- shiboken.orig/libshiboken/bindingmanager.h	2010-08-31 14:50:38.000000000 +0200
++++ shiboken/libshiboken/bindingmanager.h	2010-08-31 14:50:53.000000000 +0200
 @@ -42,6 +42,7 @@
  {
  
@@ -372,8 +372,8 @@
      // disable copy
 Index: shiboken/libshiboken/conversions.h
 ===================================================================
---- shiboken.orig/libshiboken/conversions.h	2010-08-03 19:29:13.000000000 +0200
-+++ shiboken/libshiboken/conversions.h	2010-08-31 11:44:17.000000000 +0200
+--- shiboken.orig/libshiboken/conversions.h	2010-08-31 14:50:38.000000000 +0200
++++ shiboken/libshiboken/conversions.h	2010-08-31 14:50:53.000000000 +0200
 @@ -38,6 +38,7 @@
  #include <Python.h>
  #include <limits>
@@ -397,8 +397,8 @@
  // Base Conversions ----------------------------------------------------------
 Index: shiboken/tests/libother/CMakeLists.txt
 ===================================================================
---- shiboken.orig/tests/libother/CMakeLists.txt	2010-08-03 19:29:13.000000000 +0200
-+++ shiboken/tests/libother/CMakeLists.txt	2010-08-31 11:44:17.000000000 +0200
+--- shiboken.orig/tests/libother/CMakeLists.txt	2010-08-31 14:50:38.000000000 +0200
++++ shiboken/tests/libother/CMakeLists.txt	2010-08-31 14:50:54.000000000 +0200
 @@ -4,6 +4,7 @@
  number.cpp
  otherderived.cpp
@@ -410,7 +410,7 @@
 Index: shiboken/tests/libother/othermultiplederived.cpp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ shiboken/tests/libother/othermultiplederived.cpp	2010-08-31 11:44:17.000000000 +0200
++++ shiboken/tests/libother/othermultiplederived.cpp	2010-08-31 14:50:54.000000000 +0200
 @@ -0,0 +1,56 @@
 +/*
 + * This file is part of the Shiboken Python Binding Generator project.
@@ -470,8 +470,8 @@
 +
 Index: shiboken/tests/libsample/multiple_derived.h
 ===================================================================
---- shiboken.orig/tests/libsample/multiple_derived.h	2010-08-03 19:29:13.000000000 +0200
-+++ shiboken/tests/libsample/multiple_derived.h	2010-08-31 11:44:17.000000000 +0200
+--- shiboken.orig/tests/libsample/multiple_derived.h	2010-08-31 14:50:38.000000000 +0200
++++ shiboken/tests/libsample/multiple_derived.h	2010-08-31 14:50:54.000000000 +0200
 @@ -36,6 +36,7 @@
  #define MDERIVED_H
  
@@ -500,8 +500,8 @@
      int m_value;
 Index: shiboken/tests/samplebinding/typediscovery_test.py
 ===================================================================
---- shiboken.orig/tests/samplebinding/typediscovery_test.py	2010-08-03 19:29:13.000000000 +0200
-+++ shiboken/tests/samplebinding/typediscovery_test.py	2010-08-31 11:44:17.000000000 +0200
+--- shiboken.orig/tests/samplebinding/typediscovery_test.py	2010-08-31 14:50:38.000000000 +0200
++++ shiboken/tests/samplebinding/typediscovery_test.py	2010-08-31 14:50:54.000000000 +0200
 @@ -29,6 +29,7 @@
  import unittest
  
@@ -531,8 +531,8 @@
  
 Index: shiboken/tests/libother/othermultiplederived.h
 ===================================================================
---- shiboken.orig/tests/libother/othermultiplederived.h	2010-08-03 19:29:13.000000000 +0200
-+++ shiboken/tests/libother/othermultiplederived.h	2010-08-31 11:47:04.000000000 +0200
+--- shiboken.orig/tests/libother/othermultiplederived.h	2010-08-31 14:50:38.000000000 +0200
++++ shiboken/tests/libother/othermultiplederived.h	2010-08-31 14:50:54.000000000 +0200
 @@ -37,6 +37,7 @@
  
  #include "libothermacros.h"

Added: packages/shiboken/trunk/debian/patches/u_46ab0d6_generated_original_name_with_star_for_object_classes.patch
===================================================================
--- packages/shiboken/trunk/debian/patches/u_46ab0d6_generated_original_name_with_star_for_object_classes.patch	                        (rev 0)
+++ packages/shiboken/trunk/debian/patches/u_46ab0d6_generated_original_name_with_star_for_object_classes.patch	2010-08-31 12:53:10 UTC (rev 14330)
@@ -0,0 +1,57 @@
+From 47ab0d6bb7203c9a33c53d1b6d93f6305413c8e4 Mon Sep 17 00:00:00 2001
+From: Renato Filho <renato.filho at openbossa.org>
+Date: Thu, 26 Aug 2010 11:47:55 -0300
+Subject: [PATCH] Generated original_name with "*" for object classes.
+
+Use base type original_name to derived classes.
+Fixes bug #311.
+
+Reviewer: Luciano Wolf <luciano.wolf at openbossa.org>
+          Hugo Parente Lima <hugo.pl at gmail.com>
+---
+ cppgenerator.cpp            |    5 ++++-
+ libshiboken/basewrapper.cpp |    8 ++++++--
+ 2 files changed, 10 insertions(+), 3 deletions(-)
+
+Index: shiboken/cppgenerator.cpp
+===================================================================
+--- shiboken.orig/cppgenerator.cpp	2010-08-31 14:50:38.000000000 +0200
++++ shiboken/cppgenerator.cpp	2010-08-31 14:50:48.000000000 +0200
+@@ -2404,7 +2404,10 @@
+     s << INDENT << "/*cpp_dtor*/            " << cpp_dtor << ',' << endl;
+     s << INDENT << "/*is_multicpp*/         0," << endl;
+     s << INDENT << "/*is_user_type*/        0," << endl;
+-    s << INDENT << "/*original_name*/       \"" << metaClass->qualifiedCppName() << "\"," << endl;
++    QString suffix;
++    if (metaClass->typeEntry()->isObject() || metaClass->typeEntry()->isQObject())
++        suffix = "*";
++    s << INDENT << "/*original_name*/       \"" << metaClass->qualifiedCppName() << suffix << "\"," << endl;
+     s << INDENT << "/*user_data*/           0" << endl;
+     s << "};" << endl;
+     s << "} //extern"  << endl;
+Index: shiboken/libshiboken/basewrapper.cpp
+===================================================================
+--- shiboken.orig/libshiboken/basewrapper.cpp	2010-08-31 14:50:38.000000000 +0200
++++ shiboken/libshiboken/basewrapper.cpp	2010-08-31 14:50:48.000000000 +0200
+@@ -304,7 +304,8 @@
+     Shiboken::AutoDecRef emptyTuple(PyTuple_New(0));
+     SbkBaseWrapper* self = reinterpret_cast<SbkBaseWrapper*>(PyBaseObject_Type.tp_new(subtype, emptyTuple, 0));
+ 
+-    int numBases = reinterpret_cast<SbkBaseWrapperType*>(subtype)->is_multicpp ? getNumberOfCppBaseClasses(subtype) : 1;
++    SbkBaseWrapperType* sbkType = reinterpret_cast<SbkBaseWrapperType*>(subtype);
++    int numBases = sbkType->is_multicpp ? getNumberOfCppBaseClasses(subtype) : 1;
+     self->cptr = new void*[numBases];
+     std::memset(self->cptr, 0, sizeof(void*)*numBases);
+     self->hasOwnership = 1;
+@@ -542,7 +543,10 @@
+         newType->cpp_dtor = 0;
+         newType->is_multicpp = 1;
+     }
+-    newType->original_name = "";
++    if (bases.size() == 1)
++        newType->original_name = bases.front()->original_name;
++    else
++        newType->original_name = "object";
+     newType->user_data = 0;
+     newType->d_func = 0;
+     newType->is_user_type = 1;




More information about the Python-modules-commits mailing list