Permalink
Browse files

moved Parrot_PMC_newclass to oo.c and renamed to Parrot_oo_new_class_pmc

  • Loading branch information...
trishume committed Nov 23, 2011
1 parent ffca829 commit 7a4a967ccece5901157d82452cb3b89685207722
Showing with 31 additions and 29 deletions.
  1. +1 −1 docs/embed.pod
  2. +0 −6 include/parrot/extend.h
  3. +9 −0 include/parrot/oo.h
  4. +1 −1 ports/debian/libparrot3.3.0.symbols
  5. +0 −20 src/extend.c
  6. +19 −0 src/oo.c
  7. +1 −1 t/src/extend_vtable.t
View
@@ -1224,7 +1224,7 @@ The list may also be augmented if additional functionality is required.
=item C<Parrot_PMC_new>
-=item C<Parrot_PMC_newclass>
+=item C<Parrot_oo_new_class_pmc>
=item C<Parrot_PMC_null>
View
@@ -115,10 +115,6 @@ PARROT_EXPORT
Parrot_PMC Parrot_PMC_new(PARROT_INTERP, Parrot_Int type)
__attribute__nonnull__(1);
-PARROT_EXPORT
-Parrot_PMC Parrot_PMC_newclass(PARROT_INTERP, Parrot_PMC classtype)
- __attribute__nonnull__(1);
-
PARROT_EXPORT
PARROT_PURE_FUNCTION
PARROT_CAN_RETURN_NULL
@@ -203,8 +199,6 @@ int Parrot_vfprintf(PARROT_INTERP,
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_PMC_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#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_typenum __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
View
@@ -134,6 +134,12 @@ PARROT_WARN_UNUSED_RESULT
PMC * Parrot_oo_get_class_str(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
__attribute__nonnull__(1);
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+PMC * Parrot_oo_new_class_pmc(PARROT_INTERP, ARGIN(PMC *classtype))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
void destroy_object_cache(PARROT_INTERP)
__attribute__nonnull__(1);
@@ -212,6 +218,9 @@ INTVAL Parrot_oo_register_type(PARROT_INTERP,
, PARROT_ASSERT_ARG(key))
#define ASSERT_ARGS_Parrot_oo_get_class_str __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_oo_new_class_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(classtype))
#define ASSERT_ARGS_destroy_object_cache __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_init_object_cache __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -474,7 +474,6 @@ libparrot.so.3.3.0 libparrot3.3.0 #MINVER#
Parrot_PMC_name@Base 3.3.0
Parrot_PMC_neg@Base 3.3.0
Parrot_PMC_new@Base 3.3.0
- Parrot_PMC_newclass@Base 3.3.0
Parrot_PMC_null@Base 3.3.0
Parrot_PMC_pop_float@Base 3.3.0
Parrot_PMC_pop_integer@Base 3.3.0
@@ -1166,6 +1165,7 @@ libparrot.so.3.3.0 libparrot3.3.0 #MINVER#
Parrot_oo_find_vtable_override_for_class@Base 3.3.0
Parrot_oo_get_class@Base 3.3.0
Parrot_oo_get_class_str@Base 3.3.0
+ Parrot_oo_new_class_pmc@Base 3.3.0
Parrot_pa_destroy@Base 3.3.0
Parrot_pa_is_owned@Base 3.3.0
Parrot_pa_new@Base 3.3.0
View
@@ -685,26 +685,6 @@ Parrot_unregister_string(PARROT_INTERP, Parrot_String s)
/*
-=item C<Parrot_PMC Parrot_PMC_newclass(PARROT_INTERP, Parrot_PMC classtype)>
-
-Create a class with the type given
-
-TODO: Clean this up, move this to src/oo.c
-
-=cut
-
-*/
-
-PARROT_EXPORT
-Parrot_PMC
-Parrot_PMC_newclass(PARROT_INTERP, Parrot_PMC classtype)
-{
- ASSERT_ARGS(Parrot_PMC_newclass)
- return Parrot_pmc_new_init(interp, enum_class_Class, classtype);
-}
-
-/*
-
=back
=head1 SEE ALSO
View
@@ -442,6 +442,25 @@ Parrot_oo_get_class_str(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
}
}
+/*
+
+=item C<PMC * Parrot_oo_new_class_pmc(PARROT_INTERP, PMC *classtype)>
+
+Create a class with the type given
+
+=cut
+
+*/
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+PMC *
+Parrot_oo_new_class_pmc(PARROT_INTERP, ARGIN(PMC *classtype))
+{
+ ASSERT_ARGS(Parrot_oo_new_class_pmc)
+ return Parrot_pmc_new_init(interp, enum_class_Class, classtype);
+}
+
/*
View
@@ -131,7 +131,7 @@ void dotest(Parrot_Interp interp, void *unused)
string = createstring(interp,"Object");
Parrot_PMC_assign_string_native(interp, pmc_string, string);
- object = Parrot_PMC_newclass(interp, pmc_string);
+ object = Parrot_oo_new_class_pmc(interp, pmc_string);
CODE

0 comments on commit 7a4a967

Please sign in to comment.