diff options
author | Adrian Thurston <thurston@colm.net> | 2021-12-02 15:41:34 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-02 15:41:34 -0800 |
commit | d1a1e50f4a53f8faa615dd4adbe34d34297e9a2e (patch) | |
tree | f082b816a4264a8efbe47b99aa69d4b92b27b529 /test/trans.d/actparams.cc | |
parent | fc61ecb3a22b89864916ec538eaf04840e7dd6b5 (diff) | |
parent | 938c4ff209056fb332e57ba03ca56aed820824e4 (diff) | |
download | colm-d1a1e50f4a53f8faa615dd4adbe34d34297e9a2e.tar.gz |
Merge pull request #136 from viccie30/host-call-prototype
Correct prototype for host call functions in tests
Diffstat (limited to 'test/trans.d/actparams.cc')
-rw-r--r-- | test/trans.d/actparams.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/trans.d/actparams.cc b/test/trans.d/actparams.cc index d9e9d6ff..dab00b61 100644 --- a/test/trans.d/actparams.cc +++ b/test/trans.d/actparams.cc @@ -14,18 +14,18 @@ using std::cout; using std::endl; extern "C" { - colm_value_t cc_action_params_find( struct colm_program *prg, tree_t **sp, str_t *_machine, str_t *_action ); - colm_value_t cc_action_params_insert( struct colm_program *prg, tree_t **sp, str_t *_machine, str_t *_action ); + colm_value_t cc_action_params_find( struct colm_program *prg, tree_t **sp, colm_value_t _machine, colm_value_t _action ); + colm_value_t cc_action_params_insert( struct colm_program *prg, tree_t **sp, colm_value_t _machine, colm_value_t _action ); } typedef set<string> Set; typedef map< string, Set > Map; static Map machineMap; -value_t cc_action_params_find( struct colm_program *prg, tree_t **sp, str_t *_machine, str_t *_action ) +value_t cc_action_params_find( struct colm_program *prg, tree_t **sp, value_t _machine, value_t _action ) { - string machine( _machine->value->data, _machine->value->length ); - string action( _action->value->data, _action->value->length ); + string machine( ( (str_t *) _machine )->value->data, ( (str_t *) _machine )->value->length ); + string action( ( (str_t *) _action )->value->data, ( (str_t *) _action )->value->length ); // cout << "cc_action_params_find " << machine << " " << action << " "; @@ -42,10 +42,10 @@ value_t cc_action_params_find( struct colm_program *prg, tree_t **sp, str_t *_ma return (value_t) res; } -value_t cc_action_params_insert( struct colm_program *prg, tree_t **sp, str_t *_machine, str_t *_action ) +value_t cc_action_params_insert( struct colm_program *prg, tree_t **sp, value_t _machine, value_t _action ) { - string machine( _machine->value->data, _machine->value->length ); - string action( _action->value->data, _action->value->length ); + string machine( ( (str_t *) _machine )->value->data, ( (str_t *) _machine )->value->length ); + string action( ( (str_t *) _action )->value->data, ( (str_t *) _action )->value->length ); // cout << "cc_action_params_insert " << machine << " " << action << endl; |