Changeset 13572


Ignore:
Timestamp:
Sep 21, 2019 12:21:28 PM (3 months ago)
Author:
Christian Andersson
Message:

Fixed integer return type. Related to ticket:5837

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-cw-evaluator/RuntimeLibrary/src/evaluator/jmi_evaluator.c

    r13562 r13572  
    188188}
    189189
    190 void jmi_call_integer_fcn_s(generic_funcptr fcn, double *out) {
     190void jmi_call_integer_fcn_s(generic_funcptr fcn, int *out) {
    191191    JMI_DEF(STR, arg_0)
    192192
     
    203203}
    204204
    205 void jmi_call_integer_fcn_si(generic_funcptr fcn, double *out) {
     205void jmi_call_integer_fcn_si(generic_funcptr fcn, int *out) {
    206206    JMI_DEF(STR, arg_0)
    207207    JMI_DEF(INT, arg_1)
     
    222222}
    223223
    224 void jmi_call_integer_fcn_ssi(generic_funcptr fcn, double *out) {
     224void jmi_call_integer_fcn_ssi(generic_funcptr fcn, int *out) {
    225225    JMI_DEF(STR, arg_0)
    226226    JMI_DEF(STR, arg_1)
     
    245245void jmi_call_integer_fcn(generic_funcptr fcn, const char* inputs) {
    246246    JMI_DEF(INT, i_output)
     247    JMI_DEF(INT_EXT, tmp_output)
    247248    JMCEVAL_parse(Integer, i_output);
     249   
     250    tmp_output = (int)i_output;
    248251
    249252    if (strcmp(inputs, "s,") == 0) {
    250         jmi_call_integer_fcn_s(fcn, &i_output);
     253        jmi_call_integer_fcn_s(fcn, &tmp_output);
    251254    } else if (strcmp(inputs, "s,i,") == 0) {
    252         jmi_call_integer_fcn_si(fcn, &i_output);
     255        jmi_call_integer_fcn_si(fcn, &tmp_output);
    253256    } else if (strcmp(inputs, "s,s,i,") == 0) {
    254         jmi_call_integer_fcn_ssi(fcn, &i_output);
     257        jmi_call_integer_fcn_ssi(fcn, &tmp_output);
    255258    } else {
    256259        printf(ERROR_NOT_SUPPORTED_INPUT_ARGS_MSG);
    257260        exit(ERROR_NOT_SUPPORTED_INPUT_ARGS);
    258261    }
     262   
     263    i_output = (double)tmp_output;
    259264
    260265    JMCEVAL_check("DONE");
Note: See TracChangeset for help on using the changeset viewer.