[svn:parrot] r45458 - trunk/tools/dev
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Thu Apr 8 20:36:06 UTC 2010
Author: chromatic
Date: Thu Apr 8 20:36:06 2010
New Revision: 45458
URL: https://trac.parrot.org/parrot/changeset/45458
Log:
[NCI] Removed a warning about ignoring the return
value of Parrot_pcc_build_call_from_c_args() from NCI thunks. This one works.
Modified:
trunk/tools/dev/nci_thunk_gen.pir
Modified: trunk/tools/dev/nci_thunk_gen.pir
==============================================================================
--- trunk/tools/dev/nci_thunk_gen.pir Thu Apr 8 20:36:02 2010 (r45457)
+++ trunk/tools/dev/nci_thunk_gen.pir Thu Apr 8 20:36:06 2010 (r45458)
@@ -642,6 +642,7 @@
void *orig_func;
const PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * ret_object = PMCNULL;
%s
%s;
UNUSED(return_data); /* Potentially unused, at least */
@@ -836,7 +837,7 @@
final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
VTABLE_set_pointer(interp, final_destination, return_data);
}
- Parrot_pcc_build_call_from_c_args(interp, call_object, \"P\", final_destination);" },
+ ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, \"P\", final_destination);" },
"i": { "as_proto": "int", "sig_char": "I",
"return_type": "INTVAL" },
"l": { "as_proto": "long", "sig_char": "I", "return_type": "INTVAL" },
@@ -847,7 +848,7 @@
"t": { "as_proto": "char *",
"final_dest": "STRING *final_destination;",
"ret_assign": "final_destination = Parrot_str_new(interp, return_data, 0);
- Parrot_pcc_build_call_from_c_args(interp, call_object, \"S\", final_destination);",
+ ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, \"S\", final_destination);",
"sig_char": "S",
"temp_tmpl": "char *t_%i; STRING *ts_%i",
"fill_params_tmpl": ", &ts_%i",
@@ -885,7 +886,7 @@
"2": { "as_proto": "short *",
"sig_char": "P",
"return_type": "short",
- "ret_assign": "call_object = Parrot_pcc_build_call_from_c_args(interp, call_object, \"I\", return_data);",
+ "ret_assign": "ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, \"I\", return_data);",
"temp_tmpl": "PMC *t_%i; short i_%i",
"preamble_tmpl": "i_%i = VTABLE_get_integer(interp, t_%i);",
"call_param_tmpl": "&i_%i",
@@ -893,7 +894,7 @@
"3": { "as_proto": "int *",
"sig_char": "P",
"return_type": "int",
- "ret_assign": "Parrot_pcc_build_call_from_c_args(interp, call_object, \"I\", return_data);",
+ "ret_assign": "ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, \"I\", return_data);",
"temp_tmpl": "PMC *t_%i; int i_%i",
"preamble_tmpl": "i_%i = VTABLE_get_integer(interp, t_%i);",
"call_param_tmpl": "&i_%i",
@@ -901,7 +902,7 @@
"4": { "as_proto": "long *",
"sig_char": "P",
"return_type": "long",
- "ret_assign": "Parrot_pcc_build_call_from_c_args(interp, call_object, \"I\", return_data);",
+ "ret_assign": "ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, \"I\", return_data);",
"temp_tmpl": "PMC *t_%i; long i_%i",
"preamble_tmpl": "i_%i = VTABLE_get_integer(interp, t_%i);",
"call_param_tmpl": "&i_%i",
@@ -961,7 +962,7 @@
$I1 = !$I1
$I0 = $I0 || $I1 # not (not exists v[ret_assign] and exists v[sig_char])
if $I0 goto has_ret_assign
- $S0 = 'Parrot_pcc_build_call_from_c_args(interp, call_object, "'
+ $S0 = 'ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "'
$S1 = v['sig_char']
$S0 = concat $S0, $S1
$S0 = concat $S0, '", return_data);'
More information about the parrot-commits
mailing list