diff options
author | Adrian Thurston <thurston@colm.net> | 2021-09-09 17:36:18 -0700 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2021-09-09 17:36:18 -0700 |
commit | 159c9a44359291ce5954d4779988b79f6cef0341 (patch) | |
tree | e81cfee20de0cf85bea3e08c6e9b59e358564ef9 | |
parent | 0efb9a4774b3e3c830b44d6e70c5936e7a0be499 (diff) | |
download | ragel-159c9a44359291ce5954d4779988b79f6cef0341.tar.gz |
need to use Bytes.to_string on buffer objects
Now need to convert the buffer to a string before passing to functions that
expect string.
-rw-r--r-- | test/ragel.d/trans-ocaml.lm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ragel.d/trans-ocaml.lm b/test/ragel.d/trans-ocaml.lm index 6cec5ad4..57e094fb 100644 --- a/test/ragel.d/trans-ocaml.lm +++ b/test/ragel.d/trans-ocaml.lm @@ -50,7 +50,7 @@ int rw_ocaml_factor( Factor: indep::factor ) case [`buffer] { send Out - "String.sub buffer 0 blen.contents" + "( String.sub ( Bytes.to_string buffer ) 0 blen.contents )" } case [`blen] { @@ -183,7 +183,7 @@ int rw_ocaml_print_stmt( Stmt: indep::print_stmt ) else if match Stmt [`print_buf `;] { send Out - "print_string( String.sub buffer 0 blen.contents ); + "print_string( String.sub ( Bytes.to_string buffer ) 0 blen.contents ); } else if match Stmt [`print_str expr `;] { |