[svn:parrot] r45120 - in trunk: include/parrot src/pmc
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Tue Mar 23 01:06:27 UTC 2010
Author: plobsing
Date: Tue Mar 23 01:06:27 2010
New Revision: 45120
URL: https://trac.parrot.org/parrot/changeset/45120
Log:
nci_sub_t => nci_thunk_t and moves to header file
Modified:
trunk/include/parrot/nci.h
trunk/src/pmc/nci.pmc
Modified: trunk/include/parrot/nci.h
==============================================================================
--- trunk/include/parrot/nci.h Tue Mar 23 00:54:56 2010 (r45119)
+++ trunk/include/parrot/nci.h Tue Mar 23 01:06:27 2010 (r45120)
@@ -15,6 +15,8 @@
#include "parrot/parrot.h"
+typedef void (*nci_thunk_t)(PARROT_INTERP, PMC *);
+
PMC *build_call_func(PARROT_INTERP, NOTNULL(STRING *signature));
void Parrot_nci_load_core_thunks(PARROT_INTERP);
Modified: trunk/src/pmc/nci.pmc
==============================================================================
--- trunk/src/pmc/nci.pmc Tue Mar 23 00:54:56 2010 (r45119)
+++ trunk/src/pmc/nci.pmc Tue Mar 23 01:06:27 2010 (r45120)
@@ -18,8 +18,6 @@
*/
-typedef INTVAL (*nci_sub_t)(PARROT_INTERP, PMC *);
-
void pcc_params(PARROT_INTERP, STRING *sig, Parrot_NCI_attributes * const nci_info,
size_t sig_length);
void pcc_params(PARROT_INTERP, STRING *sig, Parrot_NCI_attributes * const nci_info,
@@ -100,10 +98,10 @@
}
/* actually build the NCI thunk */
-static nci_sub_t build_func(PARROT_INTERP, PMC *, Parrot_NCI_attributes *);
+static nci_thunk_t build_func(PARROT_INTERP, PMC *, Parrot_NCI_attributes *);
static
-nci_sub_t build_func(PARROT_INTERP, PMC *pmc, Parrot_NCI_attributes *nci_info)
+nci_thunk_t build_func(PARROT_INTERP, PMC *pmc, Parrot_NCI_attributes *nci_info)
{
STRING *key = nci_info->signature;
size_t key_length = Parrot_str_byte_length(interp, key);
@@ -117,7 +115,7 @@
nci_info->fb_info = build_call_func(interp, key);
nci_info->func = F2DPTR(VTABLE_get_pointer(interp, nci_info->fb_info));
- return (nci_sub_t)nci_info->func;
+ return (nci_thunk_t)nci_info->func;
}
@@ -299,15 +297,15 @@
VTABLE opcode_t *invoke(void *next) {
Parrot_NCI_attributes * const nci_info = PARROT_NCI(SELF);
- nci_sub_t func;
+ nci_thunk_t func;
char *sig_str;
void *orig_func;
PMC *cont;
GET_ATTR_orig_func(INTERP, SELF, orig_func);
func = PObj_flag_TEST(private2, SELF)
- ? (nci_sub_t) D2FPTR(orig_func)
- : (nci_sub_t) D2FPTR(nci_info->func);
+ ? (nci_thunk_t) D2FPTR(orig_func)
+ : (nci_thunk_t) D2FPTR(nci_info->func);
if (!func) {
/* build the thunk only when necessary */
More information about the parrot-commits
mailing list