Ticket #1795: extra_thunks.c.patch

File extra_thunks.c.patch, 2.8 KB (added by ronaldws, 4 years ago)

Output file from extra_thunks.nci and nci_thunk_gen.pir.

  • src/nci/extra_thunks.c

     
    26402640 
    26412641} 
    26422642static void 
    2643 pcf_p_tiB3P(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) 
     2643pcf_p_tiV3P(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) 
    26442644{ 
    2645     typedef void *(* func_t)(char *, int, char **, int *, PMC *); 
     2645    typedef void *(* func_t)(char *, int, void **, int *, PMC *); 
    26462646    func_t fn_pointer; 
    26472647    void *orig_func; 
    26482648    PMC * const ctx         = CURRENT_CONTEXT(interp); 
     
    26532653 
    26542654    char *t_0; STRING *ts_0; 
    26552655    INTVAL t_1; 
    2656     char *t_2; STRING *ts_2; 
     2656    PMC *t_2; void *v_2; 
    26572657    PMC *t_3; int i_3; 
    26582658    PMC * t_4; 
    26592659    UNUSED(return_data); /* Potentially unused, at least */ 
    2660     Parrot_pcc_fill_params_from_c_args(interp, call_object, "SISPP", &ts_0, &t_1, &ts_2, &t_3, &t_4); 
    2661     t_0 = STRING_IS_NULL(ts_0) ? (char *)NULL : Parrot_str_to_cstring(interp, ts_0);t_2 = STRING_IS_NULL(ts_2) ? (char *) NULL : Parrot_str_to_cstring(interp, ts_2);i_3 = VTABLE_get_integer(interp, t_3); 
     2660    Parrot_pcc_fill_params_from_c_args(interp, call_object, "SIPPP", &ts_0, &t_1, &t_2, &t_3, &t_4); 
     2661    t_0 = STRING_IS_NULL(ts_0) ? (char *)NULL : Parrot_str_to_cstring(interp, ts_0);v_2 = VTABLE_get_pointer(interp, t_2);i_3 = VTABLE_get_integer(interp, t_3); 
    26622662    GETATTR_NCI_orig_func(interp, nci, orig_func); 
    26632663    fn_pointer = (func_t)D2FPTR(orig_func); 
    2664     return_data =  (void *)(*fn_pointer)(t_0, t_1, &t_2, &i_3, t_4); 
     2664    return_data =  (void *)(*fn_pointer)(t_0, t_1, &v_2, &i_3, t_4); 
    26652665    if (return_data != NULL) { 
    26662666                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct); 
    26672667                             VTABLE_set_pointer(interp, final_destination, return_data); 
     
    26692669                          ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination); 
    26702670    if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0); 
    26712671 
    2672 if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2); 
     2672VTABLE_set_pointer(interp, t_2, v_2); 
    26732673VTABLE_set_integer_native(interp, t_3, i_3); 
    26742674 
    26752675} 
     
    71217121    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppttttitl"), temp_pmc); 
    71227122 
    71237123    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); 
    7124     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_tiB3P); 
    7125     VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ptiB3P"), temp_pmc); 
     7124    VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_tiV3P); 
     7125    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ptiV3P"), temp_pmc); 
    71267126 
    71277127    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); 
    71287128    VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_tip3P);