OOP initial commit with new tracked files.
[Faustine.git] / interpretor / preprocess_stubs.cpp
1 #include <iostream>
2 #include <string>
3 #include "preprocess.hh"
4
5 extern "C" {
6 #include <caml/memory.h>
7 #include <caml/mlvalues.h>
8 #include <caml/alloc.h>
9 }
10
11 using namespace std;
12
13 /*
14 extern "C" value preProcess_cpp (value v_str){
15 CAMLparam1 (v_str);
16 CAMLlocal1 (ml_s);
17 char* s;
18 s = preProcess(String_val(v_str));
19 ml_s = caml_copy_string(s);
20 CAMLreturn (ml_s);
21 }
22 */
23
24 extern "C" value preProcess_cpp (value v_str){
25 CAMLparam1 (v_str);
26 CAMLlocal1 (ml_s);
27 string dsp_file = string(String_val(v_str));
28 char* dsp_file_c = (char*)dsp_file.c_str();
29 char* s = preProcess(dsp_file_c);
30 ml_s = caml_copy_string(s);
31 CAMLreturn (ml_s);
32 }