Author: mdiep
Date: Tue Apr 24 08:37:00 2007
New Revision: 18320
Modified:
trunk/DEPRECATED.pod
trunk/include/parrot/interpreter.h
trunk/lib/Parrot/Pmc2c.pm
trunk/src/inter_misc.c
trunk/src/pmc/iterator.pmc
trunk/src/pmc/parrotinterpreter.pmc
trunk/src/pmc/parrotio.pmc
trunk/src/pmc/parrotthread.pmc
Log:
#40801: [TODO] Rename enter_nci_method to something better
1) Rename enter_nci_method to register_nci_method (something better)
2) Make enter_nci_method an alias to register_nci_method
3) Add enter_nci_method to DEPRECATED.pod
Modified: trunk/DEPRECATED.pod
==============================================================================
--- trunk/DEPRECATED.pod (original)
+++ trunk/DEPRECATED.pod Tue Apr 24 08:37:00 2007
@@ -9,6 +9,17 @@
/me giggles
-- Chip Salzenberg
+=head1 Deprecated C APIs
+
+=over 4
+
+=item enter_nci_method
+
+This function is being renamed to register_nci_method. The original name was
+confusing (see #40801).
+
+=back
+
=head1 Deprecated methods
=over 4
Modified: trunk/include/parrot/interpreter.h
==============================================================================
--- trunk/include/parrot/interpreter.h (original)
+++ trunk/include/parrot/interpreter.h Tue Apr 24 08:37:00 2007
@@ -531,7 +531,9 @@
void clone_interpreter(Parrot_Interp dest, Parrot_Interp self,
Parrot_clone_flags flags);
PARROT_API void enter_nci_method(Interp *, const int type,
- void *func, const char *name, const char *proto);
+ void *func, const char *name, const char *proto);
+PARROT_API void register_nci_method(Interp *, const int type,
+ void *func, const char *name, const char *proto);
PARROT_API void register_raw_nci_method_in_ns(Parrot_Interp interp, const int
type,
void *func, const char *name);
PARROT_API void Parrot_mark_method_writes(Interp *, int type, const char
*name);
Modified: trunk/lib/Parrot/Pmc2c.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c.pm (original)
+++ trunk/lib/Parrot/Pmc2c.pm Tue Apr 24 08:37:00 2007
@@ -1010,7 +1010,7 @@
}
else {
$cout .= <<"EOC";
- enter_nci_method(interp, entry,
+ register_nci_method(interp, entry,
F2DPTR(Parrot_${classname}_$method->{meth}),
"$symbol_name", "$proto");
EOC
Modified: trunk/src/inter_misc.c
==============================================================================
--- trunk/src/inter_misc.c (original)
+++ trunk/src/inter_misc.c Tue Apr 24 08:37:00 2007
@@ -26,8 +26,8 @@
/*
=item C<void
-enter_nci_method(Parrot_Interp interp, int type,
- void *func, const char *name, const char *proto)>
+register_nci_method(Parrot_Interp interp, int type,
+ void *func, const char *name, const char *proto)>
Create an entry in the C<nci_method_table> for the given NCI method of PMC
class C<type>.
@@ -39,7 +39,14 @@
void
enter_nci_method(Parrot_Interp interp, const int type, void *func,
- const char *name, const char *proto)
+ const char *name, const char *proto)
+{
+ register_nci_method(interp, type, func, name, proto);
+}
+
+void
+register_nci_method(Parrot_Interp interp, const int type, void *func,
+ const char *name, const char *proto)
{
PMC * const method = pmc_new(interp, enum_class_NCI);
/* create call func */
Modified: trunk/src/pmc/iterator.pmc
==============================================================================
--- trunk/src/pmc/iterator.pmc (original)
+++ trunk/src/pmc/iterator.pmc Tue Apr 24 08:37:00 2007
@@ -26,7 +26,7 @@
if (pass) {
/* Make the shift_pmc vtable function available as
* a method named "next" */
- enter_nci_method(INTERP, enum_class_Iterator,
+ register_nci_method(INTERP, enum_class_Iterator,
F2DPTR(Parrot_Iterator_shift_pmc), "next", "PJO");
}
}
Modified: trunk/src/pmc/parrotinterpreter.pmc
==============================================================================
--- trunk/src/pmc/parrotinterpreter.pmc (original)
+++ trunk/src/pmc/parrotinterpreter.pmc Tue Apr 24 08:37:00 2007
@@ -184,12 +184,12 @@
/*
* TODO unify and fix signatures
*/
- enter_nci_method(INTERP, typ,
+ register_nci_method(INTERP, typ,
F2DPTR(pt_thread_yield), "yield", "v");
/*
* misc functions
*/
- enter_nci_method(INTERP, typ,
+ register_nci_method(INTERP, typ,
F2DPTR(recursion_limit), "recursion_limit", "iJOi");
}
Modified: trunk/src/pmc/parrotio.pmc
==============================================================================
--- trunk/src/pmc/parrotio.pmc (original)
+++ trunk/src/pmc/parrotio.pmc Tue Apr 24 08:37:00 2007
@@ -306,15 +306,15 @@
void class_init() {
if (pass) {
- enter_nci_method(INTERP, enum_class_ParrotIO,
+ register_nci_method(INTERP, enum_class_ParrotIO,
F2DPTR(PIO_flush), "flush", "vJO");
- enter_nci_method(INTERP, enum_class_ParrotIO,
+ register_nci_method(INTERP, enum_class_ParrotIO,
F2DPTR(PIO_setbuf), "setbuf", "iJOi");
- enter_nci_method(INTERP, enum_class_ParrotIO,
+ register_nci_method(INTERP, enum_class_ParrotIO,
F2DPTR(PIO_setlinebuf), "setlinebuf", "iJO");
- enter_nci_method(INTERP, enum_class_ParrotIO,
+ register_nci_method(INTERP, enum_class_ParrotIO,
F2DPTR(PIO_puts), "puts", "iJOt");
- enter_nci_method(INTERP, enum_class_ParrotIO,
+ register_nci_method(INTERP, enum_class_ParrotIO,
F2DPTR(PIO_eof), "eof", "iJO");
}
}
Modified: trunk/src/pmc/parrotthread.pmc
==============================================================================
--- trunk/src/pmc/parrotthread.pmc (original)
+++ trunk/src/pmc/parrotthread.pmc Tue Apr 24 08:37:00 2007
@@ -103,10 +103,10 @@
int typ = enum_class_ParrotThread;
if (pass) {
- enter_nci_method(INTERP, typ,
+ register_nci_method(INTERP, typ,
F2DPTR(do_thread_run), "run", "IJOIP@");
/* XXX appropriate name given that this won't clone globals? */
- enter_nci_method(INTERP, typ,
+ register_nci_method(INTERP, typ,
F2DPTR(do_thread_run_clone_default), "run_clone", "IJOP@");
}
}