From 5c2d599b89c01c879f685655545a5e212a5cdcd2 Mon Sep 17 00:00:00 2001 From: Sebastian Maneth Date: Fri, 2 Nov 2012 15:09:35 +0100 Subject: [PATCH] added a dummy print function to the lexindex class so that program terminates now.. :) --- src/lexindex_stub.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lexindex_stub.cpp b/src/lexindex_stub.cpp index 0a9df0f..2118e2e 100644 --- a/src/lexindex_stub.cpp +++ b/src/lexindex_stub.cpp @@ -1,4 +1,4 @@ -a#include +#include #include #include #include @@ -18,7 +18,6 @@ struct myclass { } myobject; //define a type for the lexicographic index - class lex_index { public: //The tag IDs @@ -29,8 +28,11 @@ public: vector::iterator tagVectorIt; vector tag2Vector; vector::iterator tag2VectorIt; + void print(); }; +void lex_index::print(){printf("Print called\n");} + // class prefix_treeNode { // public: // std::map Children; @@ -134,6 +136,7 @@ ML_BINDING value caml_build_lex_index(value vtree, value vtag, value vtag2) //Uncomment the following and comment the failwith line //LEXINDEX(vindex) = ... return a lex_index* .... + LEXINDEX(vindex)=mylindex; } ML_BINDING value caml_print_lex_index(value vindex) @@ -142,6 +145,7 @@ ML_BINDING value caml_print_lex_index(value vindex) lex_index* index = LEXINDEX(vindex); //Print the index to the terminal - caml_failwith("print_lex_index not implemented"); + // caml_failwith("print_lex_index not implemented"); + index->print(); CAMLreturn (Val_unit); } -- 2.17.1