[svn:parrot] r46775 - in trunk: . include/parrot src
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Wed May 19 01:14:39 UTC 2010
Author: plobsing
Date: Wed May 19 01:14:38 2010
New Revision: 46775
URL: https://trac.parrot.org/parrot/changeset/46775
Log:
eliminate vtable hackery from embed/extend interface
TT #1588
Modified:
trunk/DEPRECATED.pod
trunk/include/parrot/extend.h
trunk/src/extend.c
Modified: trunk/DEPRECATED.pod
==============================================================================
--- trunk/DEPRECATED.pod Wed May 19 01:07:21 2010 (r46774)
+++ trunk/DEPRECATED.pod Wed May 19 01:14:38 2010 (r46775)
@@ -335,16 +335,6 @@
L<https://trac.parrot.org/parrot/ticket/1540>
-=item Parrot_VTABLE, Parrot_get_vtable, Parrot_PMC_set_vtable [eligible in 2.4]
-
-These do not expose any functionality that should be available to code outside
-of parrot core.
-
-These might get revived in some form to allow for creating new types and adding
-vtable-overrides, if that functionality becomes desired.
-
-L<https://trac.parrot.org/parrot/ticket/1588>
-
=item Parrot_str_unescape_string [experimental]
This function is an experimental addition to enhance and maybe replace
Modified: trunk/include/parrot/extend.h
==============================================================================
--- trunk/include/parrot/extend.h Wed May 19 01:07:21 2010 (r46774)
+++ trunk/include/parrot/extend.h Wed May 19 01:14:38 2010 (r46775)
@@ -52,7 +52,6 @@
typedef void * Parrot_CharType;
typedef const void * Parrot_Const_Encoding;
typedef const void * Parrot_Const_CharType;
-typedef const void * Parrot_VTABLE;
#endif
@@ -111,11 +110,6 @@
__attribute__nonnull__(1);
PARROT_EXPORT
-PARROT_PURE_FUNCTION
-Parrot_VTABLE Parrot_get_vtable(PARROT_INTERP, Parrot_Int id)
- __attribute__nonnull__(1);
-
-PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
Parrot_String Parrot_new_string(PARROT_INTERP,
@@ -137,11 +131,6 @@
Parrot_PMC Parrot_PMC_null(void);
PARROT_EXPORT
-void Parrot_PMC_set_vtable(SHIM_INTERP,
- Parrot_PMC pmc,
- Parrot_VTABLE vtable);
-
-PARROT_EXPORT
Parrot_Int Parrot_PMC_typenum(PARROT_INTERP,
ARGIN_NULLOK(const char *_class))
__attribute__nonnull__(1);
@@ -215,8 +204,6 @@
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_get_strreg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_Parrot_get_vtable __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_new_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_PMC_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -224,7 +211,6 @@
#define ASSERT_ARGS_Parrot_PMC_newclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_PMC_null __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_Parrot_PMC_set_vtable __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_PMC_typenum __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_printf __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Modified: trunk/src/extend.c
==============================================================================
--- trunk/src/extend.c Wed May 19 01:07:21 2010 (r46774)
+++ trunk/src/extend.c Wed May 19 01:14:38 2010 (r46775)
@@ -574,44 +574,6 @@
/*
-=item C<void Parrot_PMC_set_vtable(PARROT_INTERP, Parrot_PMC pmc, Parrot_VTABLE
-vtable)>
-
-Replaces the vtable of the PMC.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-void
-Parrot_PMC_set_vtable(SHIM_INTERP, Parrot_PMC pmc, Parrot_VTABLE vtable)
-{
- ASSERT_ARGS(Parrot_PMC_set_vtable)
- pmc->vtable = vtable;
-}
-
-/*
-
-=item C<Parrot_VTABLE Parrot_get_vtable(PARROT_INTERP, Parrot_Int id)>
-
-Returns the vtable corresponding to the given PMC ID.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-Parrot_VTABLE
-Parrot_get_vtable(PARROT_INTERP, Parrot_Int id)
-{
- ASSERT_ARGS(Parrot_get_vtable)
- return interp->vtables[id];
-}
-
-/*
-
=item C<Parrot_PMC Parrot_sub_new_from_c_func(PARROT_INTERP, void (*func(void)),
const char * signature)>
More information about the parrot-commits
mailing list