WhatsThis update
[mussa.git] / py / glsequence.cpp
index cd432443db3849cb52d33951ef8118d5b38798cb..c90149496efe39e4d920a03f313a407c72a616db 100644 (file)
@@ -1,5 +1,6 @@
 #include <boost/python.hpp>
 using namespace boost::python;
+#include <boost/shared_ptr.hpp>
 
 #include "alg/annotation_colors.hpp"
 #include "alg/glsequence.hpp"
@@ -7,13 +8,16 @@ using namespace boost::python;
 
 void export_glsequence()
 {
-  class_<GlSequence>("GlSequence", init<Sequence &, AnnotationColors &>())
+  class_<GlSequence>("GlSequence", 
+      init<
+        boost::shared_ptr<Sequence>, 
+        boost::shared_ptr<AnnotationColors> 
+      >())
     .def(init<GlSequence &>())
     .def("draw", &GlSequence::draw)
-    .def("sequence", &GlSequence::sequence, 
-                  return_internal_reference<>())
+    .def("sequence", &GlSequence::sequence )
     .add_property("x", &GlSequence::x, &GlSequence::setX)
     .add_property("y", &GlSequence::y, &GlSequence::setY)
-    .add_property("length", &GlSequence::length)
+    .add_property("size", &GlSequence::size)
   ;
 }