Browse files

Headerized extend.h and extend.c

git-svn-id: https://svn.parrot.org/parrot/trunk@19158 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 60e555b commit be68e0dc89d327f698e693bf9d358ac947ddaf70 @petdance petdance committed Jun 20, 2007
Showing with 600 additions and 455 deletions.
  1. +327 −67 include/parrot/extend.h
  2. +273 −388 src/extend.c
View
394 include/parrot/extend.h
@@ -55,73 +55,333 @@ typedef const void * Parrot_VTABLE;
#include "parrot/extend_vtable.h" /* the auto-generated prototypes */
-PARROT_API Parrot_VTABLE Parrot_get_vtable(Parrot_Interp, Parrot_Int);
-PARROT_API Parrot_PMC Parrot_PMC_get_pmc_intkey(Parrot_Interp, Parrot_PMC, Parrot_Int);
-PARROT_API Parrot_String Parrot_PMC_get_string_intkey(Parrot_Interp, Parrot_PMC, Parrot_Int);
-PARROT_API void *Parrot_PMC_get_pointer_intkey(Parrot_Interp, Parrot_PMC, Parrot_Int);
-PARROT_API Parrot_Int Parrot_PMC_get_intval(Parrot_Interp, Parrot_PMC);
-PARROT_API Parrot_Int Parrot_PMC_get_intval_pmckey(Parrot_Interp, Parrot_PMC, Parrot_PMC);
-PARROT_API Parrot_Int Parrot_PMC_get_intval_intkey(Parrot_Interp, Parrot_PMC, Parrot_Int);
-PARROT_API Parrot_Float Parrot_PMC_get_numval(Parrot_Interp, Parrot_PMC);
-PARROT_API Parrot_Float Parrot_PMC_get_numval_intkey(Parrot_Interp, Parrot_PMC, Parrot_Int);
-PARROT_API char *Parrot_PMC_get_cstring(Parrot_Interp, Parrot_PMC);
-PARROT_API char *Parrot_PMC_get_cstring_intkey(Parrot_Interp, Parrot_PMC, Parrot_Int);
-PARROT_API char *Parrot_PMC_get_cstringn(Parrot_Interp, Parrot_PMC, Parrot_Int *);
-PARROT_API char *Parrot_PMC_get_cstringn_intkey(Parrot_Interp, Parrot_PMC, Parrot_Int *, Parrot_Int);
-
-PARROT_API void Parrot_PMC_set_vtable(Parrot_Interp, Parrot_PMC, Parrot_VTABLE);
-PARROT_API void Parrot_PMC_set_pmc_intkey(Parrot_Interp, Parrot_PMC, Parrot_Int, Parrot_PMC);
-PARROT_API void Parrot_PMC_set_pmc_pmckey(Parrot_Interp, Parrot_PMC, Parrot_PMC, Parrot_PMC);
-PARROT_API void Parrot_PMC_set_string(Parrot_Interp, Parrot_PMC, Parrot_String);
-PARROT_API void Parrot_PMC_set_string_intkey(Parrot_Interp, Parrot_PMC, Parrot_Int, Parrot_String);
-PARROT_API void Parrot_PMC_set_pointer_intkey(Parrot_Interp, Parrot_PMC, Parrot_Int, void *);
-PARROT_API void Parrot_PMC_set_cstring(Parrot_Interp, Parrot_PMC, const char *);
-PARROT_API void Parrot_PMC_set_cstring_intkey(Parrot_Interp, Parrot_PMC, Parrot_Int, const char *);
-PARROT_API void Parrot_PMC_set_cstringn(Parrot_Interp, Parrot_PMC, const char *, Parrot_Int);
-PARROT_API void Parrot_PMC_set_cstringn_intkey(Parrot_Interp, Parrot_PMC, Parrot_Int, const char *, Parrot_Int);
-PARROT_API void Parrot_PMC_set_intval(Parrot_Interp, Parrot_PMC, Parrot_Int);
-PARROT_API void Parrot_PMC_set_intval_intkey(Parrot_Interp, Parrot_PMC, Parrot_Int, Parrot_Int);
-PARROT_API void Parrot_PMC_set_numval(Parrot_Interp, Parrot_PMC, Parrot_Float);
-PARROT_API void Parrot_PMC_set_numval_intkey(Parrot_Interp, Parrot_PMC, Parrot_Int, Parrot_Float);
-PARROT_API void Parrot_PMC_push_intval(Parrot_Interp, Parrot_PMC, Parrot_Int);
-PARROT_API void Parrot_PMC_push_numval(Parrot_Interp, Parrot_PMC, Parrot_Float);
-PARROT_API void Parrot_PMC_delete_pmckey(Parrot_Interp, Parrot_PMC, Parrot_PMC);
-
-PARROT_API Parrot_PMC Parrot_PMC_new(Parrot_Interp, Parrot_Int);
-PARROT_API Parrot_PMC Parrot_PMC_null(void);
-PARROT_API Parrot_Int Parrot_PMC_typenum(Parrot_Interp, const char *);
-
-PARROT_API void Parrot_free_cstring(char *);
-
-PARROT_API void * Parrot_call_sub(Parrot_Interp, Parrot_PMC, const char *, ...);
-PARROT_API Parrot_Int Parrot_call_sub_ret_int(Parrot_Interp, Parrot_PMC,
- const char *, ...);
-PARROT_API Parrot_Float Parrot_call_sub_ret_float(Parrot_Interp, Parrot_PMC,
- const char *, ...);
-PARROT_API void * Parrot_call_method(Parrot_Interp, Parrot_PMC,
- Parrot_PMC, Parrot_String, const char *, ...);
-PARROT_API Parrot_Int Parrot_call_method_ret_int(Parrot_Interp, Parrot_PMC,
- Parrot_PMC, Parrot_String, const char *, ...);
-PARROT_API Parrot_Float Parrot_call_method_ret_float(Parrot_Interp, Parrot_PMC,
- Parrot_PMC, Parrot_String, const char *, ...);
-
-PARROT_API Parrot_Int Parrot_get_intreg(Parrot_Interp, Parrot_Int);
-PARROT_API Parrot_Float Parrot_get_numreg(Parrot_Interp, Parrot_Int);
-PARROT_API Parrot_String Parrot_get_strreg(Parrot_Interp, Parrot_Int);
-PARROT_API Parrot_PMC Parrot_get_pmcreg(Parrot_Interp, Parrot_Int);
-
-PARROT_API void Parrot_set_intreg(Parrot_Interp, Parrot_Int, Parrot_Int);
-PARROT_API void Parrot_set_numreg(Parrot_Interp, Parrot_Int, Parrot_Float);
-PARROT_API void Parrot_set_strreg(Parrot_Interp, Parrot_Int, Parrot_String);
-PARROT_API void Parrot_set_pmcreg(Parrot_Interp, Parrot_Int, Parrot_PMC);
-
-PARROT_API Parrot_String Parrot_new_string(Parrot_Interp, char *, int, const char * const, Parrot_Int);
-
-PARROT_API Parrot_Language Parrot_find_language(Parrot_Interp, char*);
-
-PARROT_API void Parrot_register_pmc(Parrot_Interp, Parrot_PMC);
-PARROT_API void Parrot_unregister_pmc(Parrot_Interp, Parrot_PMC);
-PARROT_API Parrot_PMC Parrot_get_dod_registry(Parrot_Interp);
+/* HEADERIZER BEGIN: src/extend.c */
+
+PARROT_API void * Parrot_call_method(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC sub,
+ Parrot_PMC obj,
+ Parrot_String method,
+ const char *signature,
+ ... )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_Float Parrot_call_method_ret_float(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC sub,
+ Parrot_PMC obj,
+ Parrot_String method,
+ const char *signature,
+ ... )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_Int Parrot_call_method_ret_int(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC sub,
+ Parrot_PMC obj,
+ Parrot_String method,
+ const char *signature,
+ ... )
+ __attribute__nonnull__(1);
+
+PARROT_API void* Parrot_call_sub(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC sub,
+ const char *signature,
+ ... )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_Float Parrot_call_sub_ret_float(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC sub,
+ const char *signature,
+ ... )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_Int Parrot_call_sub_ret_int(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC sub,
+ const char *signature,
+ ... )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_Language Parrot_find_language(
+ Parrot_Interp interp /*NN*/,
+ char *language )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_free_cstring( char *string );
+PARROT_API Parrot_PMC Parrot_get_dod_registry( Parrot_Interp interp /*NN*/ )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_Int Parrot_get_intreg(
+ Parrot_Interp interp /*NN*/,
+ Parrot_Int regnum )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_Float Parrot_get_numreg(
+ Parrot_Interp interp /*NN*/,
+ Parrot_Int regnum )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_PMC Parrot_get_pmcreg(
+ Parrot_Interp interp /*NN*/,
+ Parrot_Int regnum )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_String Parrot_get_strreg(
+ Parrot_Interp interp /*NN*/,
+ Parrot_Int regnum )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_VTABLE Parrot_get_vtable(
+ const Parrot_Interp interp /*NN*/,
+ Parrot_Int id )
+ __attribute__nonnull__(1)
+ __attribute__pure__
+ __attribute__warn_unused_result__;
+
+PARROT_API Parrot_String Parrot_new_string(
+ Parrot_Interp interp /*NN*/,
+ char *buffer,
+ int length,
+ const char * const encoding_name,
+ Parrot_Int flags )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_PMC_delete_pmckey(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_PMC key )
+ __attribute__nonnull__(1);
+
+PARROT_API char * Parrot_PMC_get_cstring(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc )
+ __attribute__nonnull__(1)
+ __attribute__malloc__
+ __attribute__warn_unused_result__;
+
+PARROT_API char * Parrot_PMC_get_cstring_intkey(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Int key )
+ __attribute__nonnull__(1)
+ __attribute__warn_unused_result__
+ __attribute__malloc__;
+
+PARROT_API char * Parrot_PMC_get_cstringn(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Int *length /*NN*/ )
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3)
+ __attribute__warn_unused_result__
+ __attribute__malloc__;
+
+PARROT_API char * Parrot_PMC_get_cstringn_intkey(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Int *length /*NN*/,
+ Parrot_Int key )
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3)
+ __attribute__warn_unused_result__
+ __attribute__malloc__;
+
+PARROT_API Parrot_Int Parrot_PMC_get_intval(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_Int Parrot_PMC_get_intval_intkey(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Int key )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_Int Parrot_PMC_get_intval_pmckey(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_PMC key )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_Float Parrot_PMC_get_numval(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_Float Parrot_PMC_get_numval_intkey(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Int key )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_PMC Parrot_PMC_get_pmc_intkey(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Int key )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_String Parrot_PMC_get_string_intkey(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Int key )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_PMC Parrot_PMC_new(
+ Parrot_Interp interp /*NN*/,
+ Parrot_Int type )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_PMC Parrot_PMC_null( void );
+PARROT_API void Parrot_PMC_push_intval(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Int value )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_PMC_push_numval(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Float value )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_PMC_set_cstring(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ const char *value )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_PMC_set_cstring_intkey(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Int key,
+ const char *value /*NN*/ )
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(4);
+
+PARROT_API void Parrot_PMC_set_cstringn(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ const char *value,
+ Parrot_Int length )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_PMC_set_cstringn_intkey(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Int key,
+ const char *value,
+ Parrot_Int length )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_PMC_set_intval(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Int value )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_PMC_set_intval_intkey(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Int key,
+ Parrot_Int value )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_PMC_set_numval(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Float value )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_PMC_set_numval_intkey(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Int key,
+ Parrot_Float value )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_PMC_set_pmc_intkey(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Int key,
+ Parrot_PMC value )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_PMC_set_pmc_pmckey(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_PMC key,
+ Parrot_PMC value )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_PMC_set_pointer_intkey(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Int key,
+ void *value )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_PMC_set_string(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_String value )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_PMC_set_string_intkey(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_Int key,
+ Parrot_String value )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_PMC_set_vtable(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc,
+ Parrot_VTABLE vtable )
+ __attribute__nonnull__(1);
+
+PARROT_API Parrot_Int Parrot_PMC_typenum(
+ Parrot_Interp interp /*NN*/,
+ const char *_class )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_register_pmc(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_set_intreg(
+ Parrot_Interp interp /*NN*/,
+ Parrot_Int regnum,
+ Parrot_Int value )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_set_numreg(
+ Parrot_Interp interp /*NN*/,
+ Parrot_Int regnum,
+ Parrot_Float value )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_set_pmcreg(
+ Parrot_Interp interp /*NN*/,
+ Parrot_Int regnum,
+ Parrot_PMC value )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_set_strreg(
+ Parrot_Interp interp /*NN*/,
+ Parrot_Int regnum,
+ Parrot_String value )
+ __attribute__nonnull__(1);
+
+PARROT_API void Parrot_unregister_pmc(
+ Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc )
+ __attribute__nonnull__(1);
+
+/* HEADERIZER END: src/extend.c */
#endif /* PARROT_EXTEND_H_GUARD */
View
661 src/extend.c
@@ -19,10 +19,6 @@ can.
=head2 Functions
-=over 4
-
-=cut
-
*/
/* Some internal notes. Parrot will die a horrible and bizarre death
@@ -61,23 +57,21 @@ can.
#include "parrot/parrot.h"
#include "parrot/extend.h"
-/* HEADER: none */ /* XXX a lie for the headerizer so I can work on others */
+/* HEADER: include/parrot/extend.h */
/*
-=item C<Parrot_String
-Parrot_PMC_get_string_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key)>
+FUNCDOC: Parrot_PMC_get_string_intkey
Return the integer keyed string value of the passed-in PMC
-=cut
-
*/
-PARROT_API Parrot_String
-Parrot_PMC_get_string_intkey(Parrot_Interp interp,
- Parrot_PMC pmc, Parrot_Int key) {
+PARROT_API
+Parrot_String
+Parrot_PMC_get_string_intkey(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_Int key)
+{
Parrot_String retval;
PARROT_CALLIN_START(interp);
retval = VTABLE_get_string_keyed_int(interp, pmc, key);
@@ -88,18 +82,15 @@ Parrot_PMC_get_string_intkey(Parrot_Interp interp,
/*
-=item C<void *
-Parrot_PMC_get_pointer_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key)>
+FUNCDOC: Parrot_PMC_get_pointer_intkey
Return the keyed, signed integer value of the value in the PMC.
-=cut
-
*/
-PARROT_API void *
-Parrot_PMC_get_pointer_intkey(Parrot_Interp interp, Parrot_PMC pmc,
+PARROT_API
+void *
+Parrot_PMC_get_pointer_intkey(Parrot_Interp interp /*NN*/, Parrot_PMC pmc,
Parrot_Int key) {
void *retval;
PARROT_CALLIN_START(interp);
@@ -110,18 +101,17 @@ Parrot_PMC_get_pointer_intkey(Parrot_Interp interp, Parrot_PMC pmc,
/*
-=item C<Parrot_PMC
-Parrot_PMC_get_pmc_intkey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int key)>
+FUNCDOC: Parrot_PMC_get_pmc_intkey
Return the integer keyed PMC value of the passed-in PMC
-=cut
-
*/
-PARROT_API Parrot_PMC
-Parrot_PMC_get_pmc_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key) {
+PARROT_API
+Parrot_PMC
+Parrot_PMC_get_pmc_intkey(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_Int key)
+{
Parrot_PMC retval;
PARROT_CALLIN_START(interp);
retval = VTABLE_get_pmc_keyed_int(interp, pmc, key);
@@ -131,17 +121,16 @@ Parrot_PMC_get_pmc_intkey(Parrot_Interp interp, Parrot_PMC pmc,
/*
-=item C<Parrot_Int
-Parrot_PMC_get_intval(Parrot_Interp interp, Parrot_PMC pmc)>
+FUNCDOC: Parrot_PMC_get_intval
Return the signed integer value of the value in the PMC.
-=cut
-
*/
-PARROT_API Parrot_Int
-Parrot_PMC_get_intval(Parrot_Interp interp, Parrot_PMC pmc) {
+PARROT_API
+Parrot_Int
+Parrot_PMC_get_intval(Parrot_Interp interp /*NN*/, Parrot_PMC pmc)
+{
Parrot_Int retval;
PARROT_CALLIN_START(interp);
retval = VTABLE_get_integer(interp, pmc);
@@ -151,19 +140,17 @@ Parrot_PMC_get_intval(Parrot_Interp interp, Parrot_PMC pmc) {
/*
-=item C<Parrot_Int
-Parrot_PMC_get_intval_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key)>
+FUNCDOC: Parrot_PMC_get_intval_intkey
Return the keyed, signed integer value of the value in the PMC.
-=cut
-
*/
-PARROT_API Parrot_Int
-Parrot_PMC_get_intval_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key) {
+PARROT_API
+Parrot_Int
+Parrot_PMC_get_intval_intkey(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_Int key)
+{
Parrot_Int retval;
PARROT_CALLIN_START(interp);
retval = VTABLE_get_integer_keyed_int(interp, pmc, key);
@@ -173,19 +160,17 @@ Parrot_PMC_get_intval_intkey(Parrot_Interp interp, Parrot_PMC pmc,
/*
-=item C<Parrot_Int
-Parrot_PMC_get_intval_pmckey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_PMC key)>
+FUNCDOC: Parrot_PMC_get_intval_pmckey
Return the keyed, signed integer value of the value in the PMC.
-=cut
-
*/
-PARROT_API Parrot_Int
-Parrot_PMC_get_intval_pmckey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_PMC key) {
+PARROT_API
+Parrot_Int
+Parrot_PMC_get_intval_pmckey(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_PMC key)
+{
Parrot_Int retval;
PARROT_CALLIN_START(interp);
retval = VTABLE_get_integer_keyed(interp, pmc, key);
@@ -195,17 +180,16 @@ Parrot_PMC_get_intval_pmckey(Parrot_Interp interp, Parrot_PMC pmc,
/*
-=item C<Parrot_Float
-Parrot_PMC_get_numval(Parrot_Interp interp, Parrot_PMC pmc)>
+FUNCDOC: Parrot_PMC_get_numval
Return the floating-point value of the PMC.
-=cut
-
*/
-PARROT_API Parrot_Float
-Parrot_PMC_get_numval(Parrot_Interp interp, Parrot_PMC pmc) {
+PARROT_API
+Parrot_Float
+Parrot_PMC_get_numval(Parrot_Interp interp /*NN*/, Parrot_PMC pmc)
+{
Parrot_Float retval;
PARROT_CALLIN_START(interp);
retval = VTABLE_get_number(interp, pmc);
@@ -215,19 +199,17 @@ Parrot_PMC_get_numval(Parrot_Interp interp, Parrot_PMC pmc) {
/*
-=item C<Parrot_Float
-Parrot_PMC_get_numval_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key)>
+FUNCDOC: Parrot_PMC_get_numval_intkey
Return the keyed, signed integer value of the value in the PMC.
-=cut
-
*/
-PARROT_API Parrot_Float
-Parrot_PMC_get_numval_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key) {
+PARROT_API
+Parrot_Float
+Parrot_PMC_get_numval_intkey(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_Int key)
+{
Parrot_Float retval;
PARROT_CALLIN_START(interp);
retval = VTABLE_get_number_keyed_int(interp, pmc, key);
@@ -237,21 +219,20 @@ Parrot_PMC_get_numval_intkey(Parrot_Interp interp, Parrot_PMC pmc,
/*
-=item C<char *
-Parrot_PMC_get_cstring_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key)>
+FUNCDOC: Parrot_PMC_get_cstring_intkey
Return a null-terminated string that represents the string value of the PMC.
Note that you must free this string with C<string_cstring_free()>!
-=cut
-
*/
-PARROT_API char *
-Parrot_PMC_get_cstring_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key) {
+PARROT_API
+char *
+Parrot_PMC_get_cstring_intkey(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_Int key)
+ /* WARN_UNUSED, MALLOC */
+{
STRING *intermediate;
char *retval;
@@ -265,18 +246,19 @@ Parrot_PMC_get_cstring_intkey(Parrot_Interp interp, Parrot_PMC pmc,
/*
-=item C<char *Parrot_PMC_get_cstring(Parrot_Interp interp, Parrot_PMC pmc)>
+FUNCDOC: Parrot_PMC_get_cstring
Return a null-terminated string that represents the string value of the PMC.
Note that you must free this string with C<string_cstring_free()>!
-=cut
-
*/
-PARROT_API char *
-Parrot_PMC_get_cstring(Parrot_Interp interp, Parrot_PMC pmc) {
+PARROT_API
+char *
+Parrot_PMC_get_cstring(Parrot_Interp interp /*NN*/, Parrot_PMC pmc)
+ /* MALLOC, WARN_UNUSED */
+{
STRING *intermediate;
char *retval;
@@ -290,9 +272,7 @@ Parrot_PMC_get_cstring(Parrot_Interp interp, Parrot_PMC pmc) {
/*
-=item C<char *
-Parrot_PMC_get_cstringn(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int *length)>
+FUNCDOC: Parrot_PMC_get_cstringn
Return a null-terminated string for the PMC, along with the length.
@@ -301,13 +281,14 @@ disturbing the interface.
Note that you must free the string with C<string_cstring_free()>.
-=cut
-
*/
-PARROT_API char *
-Parrot_PMC_get_cstringn(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int *length) {
+PARROT_API
+char *
+Parrot_PMC_get_cstringn(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_Int *length /*NN*/)
+ /* WARN_UNUSED, MALLOC */
+{
char *retval;
PARROT_CALLIN_START(interp);
@@ -320,9 +301,7 @@ Parrot_PMC_get_cstringn(Parrot_Interp interp, Parrot_PMC pmc,
/*
-=item C<char *
-Parrot_PMC_get_cstringn_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int *length, Parrot_Int key)>
+FUNCDOC: Parrot_PMC_get_cstringn_intkey
Return a null-terminated string for the PMC, along with the length.
@@ -331,13 +310,14 @@ disturbing the interface.
Note that you must free this string with C<string_cstring_free()>.
-=cut
-
*/
-PARROT_API char *
-Parrot_PMC_get_cstringn_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int *length, Parrot_Int key) {
+PARROT_API
+char *
+Parrot_PMC_get_cstringn_intkey(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_Int *length /*NN*/, Parrot_Int key)
+ /* WARN_UNUSED, MALLOC */
+{
char *retval;
PARROT_CALLIN_START(interp);
@@ -351,39 +331,34 @@ Parrot_PMC_get_cstringn_intkey(Parrot_Interp interp, Parrot_PMC pmc,
/*
-=item C<void
-Parrot_PMC_set_string(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_String value)>
+FUNCDOC: Parrot_PMC_set_string
Assign the passed-in Parrot string to the passed-in PMC.
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_set_string(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_String value) {
+PARROT_API
+void
+Parrot_PMC_set_string(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_String value)
+{
PARROT_CALLIN_START(interp);
VTABLE_set_string_native(interp, pmc, value);
PARROT_CALLIN_END(interp);
}
/*
-=item C<void
-Parrot_PMC_set_string_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key, Parrot_String value)>
+FUNCDOC: Parrot_PMC_set_string_intkey
Assign the passed-in Parrot string to the passed-in PMC.
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_set_string_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key, Parrot_String value)
+PARROT_API
+void
+Parrot_PMC_set_string_intkey(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_Int key, Parrot_String value)
{
PARROT_CALLIN_START(interp);
VTABLE_set_string_keyed_int(interp, pmc, key, value);
@@ -392,153 +367,140 @@ Parrot_PMC_set_string_intkey(Parrot_Interp interp, Parrot_PMC pmc,
/*
-=item C<void
-Parrot_PMC_set_pmc_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key, Parrot_PMC value)>
+FUNCDOC: Parrot_PMC_set_pmc_intkey
Assign the passed-in pmc to the passed-in slot of the passed-in PMC.
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_set_pmc_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key, Parrot_PMC value) {
+PARROT_API
+void
+Parrot_PMC_set_pmc_intkey(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_Int key, Parrot_PMC value)
+{
PARROT_CALLIN_START(interp);
VTABLE_set_pmc_keyed_int(interp, pmc, key, value);
PARROT_CALLIN_END(interp);
}
/*
-=item C<void
-Parrot_PMC_set_pmc_pmckey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_PMC key, Parrot_PMC value)>
+FUNCDOC: Parrot_PMC_set_pmc_pmckey
Assign the passed-in pmc to the passed-in slot of the passed-in PMC.
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_set_pmc_pmckey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_PMC key, Parrot_PMC value) {
+PARROT_API
+void
+Parrot_PMC_set_pmc_pmckey(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_PMC key, Parrot_PMC value)
+{
PARROT_CALLIN_START(interp);
VTABLE_set_pmc_keyed(interp, pmc, key, value);
PARROT_CALLIN_END(interp);
}
/*
-=item C<void
-Parrot_PMC_set_pointer_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key, void *value)>
+FUNCDOC: Parrot_PMC_set_pointer_intkey
Assign the passed-in pointer to the passed-in PMC.
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_set_pointer_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key, void *value) {
+PARROT_API
+void
+Parrot_PMC_set_pointer_intkey(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_Int key, void *value)
+{
PARROT_CALLIN_START(interp);
VTABLE_set_pointer_keyed_int(interp, pmc, key, value);
PARROT_CALLIN_END(interp);
}
/*
-=item C<void
-Parrot_PMC_set_intval(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int value)>
+FUNCDOC: Parrot_PMC_set_intval
Assign the passed-in Parrot integer to the passed-in PMC.
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_set_intval(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int value) {
+PARROT_API
+void
+Parrot_PMC_set_intval(Parrot_Interp interp /*NN*/, Parrot_PMC pmc, Parrot_Int value)
+{
PARROT_CALLIN_START(interp);
VTABLE_set_integer_native(interp, pmc, value);
PARROT_CALLIN_END(interp);
}
/*
-=item C<void
-Parrot_PMC_set_intval_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key, Parrot_Int value)>
+FUNCDOC: Parrot_PMC_set_intval_intkey
Assign the passed-in Parrot integer to the passed-in PMC.
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_set_intval_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key, Parrot_Int value) {
+PARROT_API
+void
+Parrot_PMC_set_intval_intkey(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_Int key, Parrot_Int value)
+{
PARROT_CALLIN_START(interp);
VTABLE_set_integer_keyed_int(interp, pmc, key, value);
PARROT_CALLIN_END(interp);
}
/*
-=item C<void
-Parrot_PMC_set_numval(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Float value)>
+FUNCDOC: Parrot_PMC_set_numval
Assign the passed-in Parrot number to the passed-in PMC.
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_set_numval(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Float value){
+PARROT_API
+void
+Parrot_PMC_set_numval(Parrot_Interp interp /*NN*/, Parrot_PMC pmc, Parrot_Float value)
+{
PARROT_CALLIN_START(interp);
VTABLE_set_number_native(interp, pmc, value);
PARROT_CALLIN_END(interp);
}
/*
-=item C<void
-Parrot_PMC_set_numval_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key, Parrot_Float value)>
+FUNCDOC: Parrot_PMC_set_numval_intkey
Assign the passed-in Parrot number to the passed-in PMC.
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_set_numval_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key, Parrot_Float value) {
+PARROT_API
+void
+Parrot_PMC_set_numval_intkey(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_Int key, Parrot_Float value)
+{
PARROT_CALLIN_START(interp);
VTABLE_set_number_keyed_int(interp, pmc, key, value);
PARROT_CALLIN_END(interp);
}
/*
-=item C<void
-Parrot_PMC_set_cstring(Parrot_Interp interp, Parrot_PMC pmc, const char *value)>
+Parrot_PMC_set_cstring
Assign the passed-in null-terminated C string to the passed-in PMC.
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_set_cstring(Parrot_Interp interp, Parrot_PMC pmc, const char *value){
+PARROT_API
+void
+Parrot_PMC_set_cstring(Parrot_Interp interp /*NN*/, Parrot_PMC pmc, const char *value)
+{
PARROT_CALLIN_START(interp);
VTABLE_set_string_native(interp, pmc,
string_from_cstring(interp, value, 0));
@@ -547,19 +509,17 @@ Parrot_PMC_set_cstring(Parrot_Interp interp, Parrot_PMC pmc, const char *value){
/*
-=item C<void
-Parrot_PMC_set_cstring_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key, const char *value)>
+Parrot_PMC_set_cstring_intkey
Assign the passed-in null-terminated C string to the passed-in PMC.
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_set_cstring_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key, const char *value) {
+PARROT_API
+void
+Parrot_PMC_set_cstring_intkey(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_Int key, const char *value /*NN*/)
+{
PARROT_CALLIN_START(interp);
VTABLE_set_string_keyed_int(interp, pmc, key,
string_from_cstring(interp, value, 0));
@@ -568,19 +528,17 @@ Parrot_PMC_set_cstring_intkey(Parrot_Interp interp, Parrot_PMC pmc,
/*
-=item C<void
-Parrot_PMC_set_cstringn(Parrot_Interp interp, Parrot_PMC pmc,
- const char *value, Parrot_Int length)>
+FUNCDOC: Parrot_PMC_set_cstringn
Assign the passed-in length-noted string to the passed-in PMC.
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_set_cstringn(Parrot_Interp interp, Parrot_PMC pmc,
- const char *value, Parrot_Int length) {
+PARROT_API
+void
+Parrot_PMC_set_cstringn(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, const char *value, Parrot_Int length)
+{
PARROT_CALLIN_START(interp);
VTABLE_set_string_native(interp, pmc,
string_from_cstring(interp, value, length));
@@ -589,81 +547,71 @@ Parrot_PMC_set_cstringn(Parrot_Interp interp, Parrot_PMC pmc,
/*
-=item C<void
-Parrot_PMC_push_intval(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int value)>
+FUNCDOC: Parrot_PMC_push_intval
Push the passed-in Parrot integer onto the passed in PMC
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_push_intval(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int value) {
+PARROT_API
+void
+Parrot_PMC_push_intval(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_Int value)
+{
PARROT_CALLIN_START(interp);
VTABLE_push_integer(interp, pmc, value);
PARROT_CALLIN_END(interp);
}
/*
-=item C<void
-Parrot_PMC_push_numval(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Float value)>
+FUNCDOC: Parrot_PMC_push_numval
Push the passed-in Parrot number onto the passed in PMC
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_push_numval(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Float value) {
+PARROT_API
+void
+Parrot_PMC_push_numval(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_Float value)
+{
PARROT_CALLIN_START(interp);
VTABLE_push_float(interp, pmc, value);
PARROT_CALLIN_END(interp);
}
/*
-=item C<void
-Parrot_PMC_delete_pmckey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_PMC key)>
+FUNCDOC: Parrot_PMC_delete_pmckey
Deletes the value associated with the passed-in PMC from the PMC.
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_delete_pmckey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_PMC key) {
+PARROT_API
+void
+Parrot_PMC_delete_pmckey(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_PMC key)
+{
PARROT_CALLIN_START(interp);
VTABLE_delete_keyed(interp, pmc, key);
PARROT_CALLIN_END(interp);
}
/*
-=item C<void
-Parrot_PMC_set_cstringn_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key,
- const char *value, Parrot_Int length)>
+FUNCDOC: Parrot_PMC_set_cstringn_intkey
Assign the passed-in length-noted string to the passed-in PMC.
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_set_cstringn_intkey(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_Int key,
- const char *value, Parrot_Int length) {
+PARROT_API
+void
+Parrot_PMC_set_cstringn_intkey(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_Int key, const char *value, Parrot_Int length)
+{
PARROT_CALLIN_START(interp);
VTABLE_set_string_keyed_int(interp, pmc, key,
string_from_cstring(interp, value, length));
@@ -672,16 +620,16 @@ Parrot_PMC_set_cstringn_intkey(Parrot_Interp interp, Parrot_PMC pmc,
/*
-=item C<Parrot_PMC Parrot_PMC_new(Parrot_Interp interp, Parrot_Int type)>
+FUNCDOC: Parrot_PMC_new
Create and return a new PMC.
-=cut
-
*/
-PARROT_API Parrot_PMC
-Parrot_PMC_new(Parrot_Interp interp, Parrot_Int type) {
+PARROT_API
+Parrot_PMC
+Parrot_PMC_new(Parrot_Interp interp /*NN*/, Parrot_Int type)
+{
Parrot_PMC newpmc;
PARROT_CALLIN_START(interp);
newpmc = pmc_new_noinit(interp, type);
@@ -692,16 +640,16 @@ Parrot_PMC_new(Parrot_Interp interp, Parrot_Int type) {
/*
-=item C<Parrot_Int Parrot_PMC_typenum(Parrot_Interp interp, const char *_class)>
+FUNCDOC: Parrot_PMC_typenum
Returns the internal identifier that represents the named class.
-=cut
-
*/
-PARROT_API Parrot_Int
-Parrot_PMC_typenum(Parrot_Interp interp, const char *_class) {
+PARROT_API
+Parrot_Int
+Parrot_PMC_typenum(Parrot_Interp interp /*NN*/, const char *_class)
+{
Parrot_Int retval;
PARROT_CALLIN_START(interp);
retval = pmc_type(interp, string_from_cstring(interp, _class, 0));
@@ -711,39 +659,37 @@ Parrot_PMC_typenum(Parrot_Interp interp, const char *_class) {
/*
-=item C<Parrot_PMC Parrot_PMC_null()>
+Parrot_PMC_null
Returns the special C<NULL> PMC.
-=cut
-
*/
-PARROT_API Parrot_PMC
-Parrot_PMC_null(void) {
+PARROT_API
+Parrot_PMC
+Parrot_PMC_null(void)
+{
return PMCNULL;
}
/*
-=item C<void Parrot_free_cstring(char *string)>
+FUNCDOC: Parrot_free_cstring
Deallocate a C string that the interpreter has handed to you.
-=cut
-
*/
-PARROT_API void
-Parrot_free_cstring(char *string) {
+PARROT_API
+void
+Parrot_free_cstring(char *string)
+{
string_cstring_free(string);
}
/*
-=item C<void*
-Parrot_call_sub(Parrot_Interp interp, Parrot_PMC sub,
- const char *signature, ...)>
+FUNCDOC: Parrot_call_sub
Call a parrot subroutine with the given function signature. The first char in
C<signature> denotes the return value. Next chars are arguments.
@@ -758,22 +704,17 @@ Signature chars are:
S ... Parrot_String
P ... Parrot_PMC
-=item C<Parrot_Int>
-Parrot_call_sub_ret_int(Parrot_Interp interp, Parrot_PMC sub,
- const char *signature, ...)>
+FUNCDOC: Parrot_call_sub_ret_int
-=item C<Parrot_Float>
-Parrot_call_sub_ret_float(Parrot_Interp interp, Parrot_PMC sub,
- const char *signature, ...)>
+FUNCDOC: Parrot_call_sub_ret_float
Like above, with Parrot_Int or Parrot_Float return result.
-=cut
-
*/
-PARROT_API void*
-Parrot_call_sub(Parrot_Interp interp, Parrot_PMC sub,
+PARROT_API
+void*
+Parrot_call_sub(Parrot_Interp interp /*NN*/, Parrot_PMC sub,
const char *signature, ...)
{
va_list ap;
@@ -791,8 +732,9 @@ Parrot_call_sub(Parrot_Interp interp, Parrot_PMC sub,
return result;
}
-PARROT_API Parrot_Int
-Parrot_call_sub_ret_int(Parrot_Interp interp, Parrot_PMC sub,
+PARROT_API
+Parrot_Int
+Parrot_call_sub_ret_int(Parrot_Interp interp /*NN*/, Parrot_PMC sub,
const char *signature, ...)
{
va_list ap;
@@ -810,8 +752,9 @@ Parrot_call_sub_ret_int(Parrot_Interp interp, Parrot_PMC sub,
return result;
}
-PARROT_API Parrot_Float
-Parrot_call_sub_ret_float(Parrot_Interp interp, Parrot_PMC sub,
+PARROT_API
+Parrot_Float
+Parrot_call_sub_ret_float(Parrot_Interp interp /*NN*/, Parrot_PMC sub,
const char *signature, ...)
{
va_list ap;
@@ -831,25 +774,19 @@ Parrot_call_sub_ret_float(Parrot_Interp interp, Parrot_PMC sub,
/*
-=item C<void* Parrot_call_method(Parrot_Interp interp, Parrot_PMC sub,
- Parrot_PMC object, Parrot_String method, const char *signature, ...)>
+FUNCDOC: Parrot_call_method
-=item C<Parrot_Int Parrot_call_method_ret_int(Parrot_Interp interp,
- Parrot_PMC sub, Parrot_PMC object, Parrot_String method,
- const char *signature, ...)>
+FUNCDOC: Parrot_call_method_ret_int
-=item C<Parrot_Float Parrot_call_method_ret_float(Parrot_Interp interp,
- Parrot_PMC sub, Parrot_PMC object, Parrot_String method,
- const char *signature, ...)>
+FUNCDOC: Parrot_call_method_ret_float
Call a parrot method for the given object.
-=cut
-
*/
-PARROT_API void *
-Parrot_call_method(Parrot_Interp interp, Parrot_PMC sub, Parrot_PMC obj,
+PARROT_API
+void *
+Parrot_call_method(Parrot_Interp interp /*NN*/, Parrot_PMC sub, Parrot_PMC obj,
Parrot_String method, const char *signature, ...)
{
void *result;
@@ -864,8 +801,9 @@ Parrot_call_method(Parrot_Interp interp, Parrot_PMC sub, Parrot_PMC obj,
return result;
}
-PARROT_API Parrot_Int
-Parrot_call_method_ret_int(Parrot_Interp interp, Parrot_PMC sub,
+PARROT_API
+Parrot_Int
+Parrot_call_method_ret_int(Parrot_Interp interp /*NN*/, Parrot_PMC sub,
Parrot_PMC obj, Parrot_String method, const char *signature, ...)
{
Parrot_Int result;
@@ -880,8 +818,9 @@ Parrot_call_method_ret_int(Parrot_Interp interp, Parrot_PMC sub,
return result;
}
-PARROT_API Parrot_Float
-Parrot_call_method_ret_float(Parrot_Interp interp, Parrot_PMC sub,
+PARROT_API
+Parrot_Float
+Parrot_call_method_ret_float(Parrot_Interp interp /*NN*/, Parrot_PMC sub,
Parrot_PMC obj, Parrot_String method, const char *signature, ...)
{
Parrot_Float result;
@@ -898,143 +837,123 @@ Parrot_call_method_ret_float(Parrot_Interp interp, Parrot_PMC sub,
/*
-=item C<Parrot_Int
-Parrot_get_intreg(Parrot_Interp interp, Parrot_Int regnum)>
+FUNCDOC: Parrot_get_intreg
Return the value of an integer register.
-=cut
-
*/
-PARROT_API Parrot_Int
-Parrot_get_intreg(Parrot_Interp interp, Parrot_Int regnum)
+PARROT_API
+Parrot_Int
+Parrot_get_intreg(Parrot_Interp interp /*NN*/, Parrot_Int regnum)
{
return REG_INT(regnum);
}
/*
-=item C<Parrot_Float
-Parrot_get_numreg(Parrot_Interp interp, Parrot_Int regnum)>
+FUNCDOC: Parrot_get_numreg
Return the value of a numeric register.
-=cut
-
*/
-PARROT_API Parrot_Float
-Parrot_get_numreg(Parrot_Interp interp, Parrot_Int regnum)
+PARROT_API
+Parrot_Float
+Parrot_get_numreg(Parrot_Interp interp /*NN*/, Parrot_Int regnum)
{
return REG_NUM(regnum);
}
/*
-=item C<Parrot_String
-Parrot_get_strreg(Parrot_Interp interp, Parrot_Int regnum)>
+FUNCDOC: Parrot_get_strreg
Return the value of a string register.
-=cut
-
*/
-PARROT_API Parrot_String
-Parrot_get_strreg(Parrot_Interp interp, Parrot_Int regnum)
+PARROT_API
+Parrot_String
+Parrot_get_strreg(Parrot_Interp interp /*NN*/, Parrot_Int regnum)
{
return REG_STR(regnum);
}
/*
-=item C<Parrot_PMC
-Parrot_get_pmcreg(Parrot_Interp interp, Parrot_Int regnum)>
+FUNCDOC: Parrot_get_pmcreg
Return the value of a PMC register.
-=cut
-
*/
-PARROT_API Parrot_PMC
-Parrot_get_pmcreg(Parrot_Interp interp, Parrot_Int regnum)
+PARROT_API
+Parrot_PMC
+Parrot_get_pmcreg(Parrot_Interp interp /*NN*/, Parrot_Int regnum)
{
return REG_PMC(regnum);
}
/*
-=item C<void
-Parrot_set_intreg(Parrot_Interp interp, Parrot_Int regnum,
- Parrot_Int value)>
+FUNCDOC: Parrot_set_intreg
Set the value of an I register.
-=cut
-
*/
-PARROT_API void
-Parrot_set_intreg(Parrot_Interp interp, Parrot_Int regnum,
+PARROT_API
+void
+Parrot_set_intreg(Parrot_Interp interp /*NN*/, Parrot_Int regnum,
Parrot_Int value)
{
REG_INT(regnum) = value;
}
/*
-=item C<void
-Parrot_set_numreg(Parrot_Interp interp, Parrot_Int regnum,
- Parrot_Float value)>
+FUNCDOC: Parrot_set_numreg
Set the value of an N register.
-=cut
-
*/
-PARROT_API void
-Parrot_set_numreg(Parrot_Interp interp, Parrot_Int regnum,
+PARROT_API
+void
+Parrot_set_numreg(Parrot_Interp interp /*NN*/, Parrot_Int regnum,
Parrot_Float value)
{
REG_NUM(regnum) = value;
}
/*
-=item C<void
-Parrot_set_strreg(Parrot_Interp interp, Parrot_Int regnum,
- Parrot_String value)>
+Parrot_set_strreg
Set the value of an S register.
-=cut
-
*/
-PARROT_API void
-Parrot_set_strreg(Parrot_Interp interp, Parrot_Int regnum,
+PARROT_API
+void
+Parrot_set_strreg(Parrot_Interp interp /*NN*/, Parrot_Int regnum,
Parrot_String value)
{
REG_STR(regnum) = value;
}
/*
-=item C<void
-Parrot_set_pmcreg(Parrot_Interp interp, Parrot_Int regnum,
- Parrot_PMC value) >
+FUNCDOC: Parrot_set_pmcreg
Set the value of a P register.
-=cut
-
*/
-PARROT_API void
-Parrot_set_pmcreg(Parrot_Interp interp, Parrot_Int regnum,
+PARROT_API
+void
+Parrot_set_pmcreg(Parrot_Interp interp /*NN*/, Parrot_Int regnum,
Parrot_PMC value)
{
REG_PMC(regnum) = value;
@@ -1045,25 +964,19 @@ Parrot_set_pmcreg(Parrot_Interp interp, Parrot_Int regnum,
*/
/*
-=item C<Parrot_String Parrot_new_string(Parrot_Interp interp,
- char *buffer, int length,
- const char * const encoding_name,
- Parrot_Int flags)>
+FUNCDOC: Parrot_new_string
Create a new Parrot string from a passed-in buffer. Pass in a 0 for
flags for right now.
A copy of the buffer is made.
-=cut
-
*/
-PARROT_API Parrot_String
-Parrot_new_string(Parrot_Interp interp,
- char *buffer, int length,
- const char * const encoding_name,
- Parrot_Int flags)
+PARROT_API
+Parrot_String
+Parrot_new_string(Parrot_Interp interp /*NN*/, char *buffer, int length,
+ const char * const encoding_name, Parrot_Int flags)
{
Parrot_String retval;
PARROT_CALLIN_START(interp);
@@ -1074,53 +987,32 @@ Parrot_new_string(Parrot_Interp interp,
/*
-=item C<Parrot_Const_Encoding
-Parrot_find_encoding(Parrot_Interp interp, char *encoding_name)>
-
-Find the magic token for an encoding, by name.
-
-=cut
-
-*/
-/*
-PARROT_API Parrot_Const_Encoding
-Parrot_find_encoding(Parrot_Interp interp,
- char *encoding_name) {
- return Parrot_encoding_lookup(encoding_name);
-}
-*/
-/*
-
-=item C<Parrot_Language
-Parrot_find_language(Parrot_Interp interp, char *language)>
+FUNCDOC: Parrot_find_language
Find the magic language token for a language, by language name.
-=cut
-
*/
-PARROT_API Parrot_Language
-Parrot_find_language(Parrot_Interp interp, char *language)
+PARROT_API
+Parrot_Language
+Parrot_find_language(Parrot_Interp interp /*NN*/, char *language)
{
return 0;
}
/*
-=item C<void
-Parrot_register_pmc(Parrot_Interp interp, Parrot_PMC pmc)>
+FUNCDOC: Parrot_register_pmc
Add a reference of the PMC to the interpreters DOD registry. This
prevents PMCs only known to extension from getting destroyed during DOD
runs.
-=cut
-
*/
-PARROT_API void
-Parrot_register_pmc(Parrot_Interp interp, Parrot_PMC pmc)
+PARROT_API
+void
+Parrot_register_pmc(Parrot_Interp interp /*NN*/, Parrot_PMC pmc)
{
PARROT_CALLIN_START(interp);
dod_register_pmc(interp, pmc);
@@ -1129,32 +1021,31 @@ Parrot_register_pmc(Parrot_Interp interp, Parrot_PMC pmc)
/*
-=item C<void
-Parrot_unregister_pmc(Parrot_Interp interp, Parrot_PMC pmc)>
+FUNCDOC: Parrot_unregister_pmc
Remove a reference of the PMC from the interpreters DOD registry. If the
reference count reaches zero, the PMC will be destroyed during the next
DOD run.
-=item C<Parrot_PMC Parrot_get_dod_registry(Parrot_Interp)>
+FUNCDOC: Parrot_get_dod_registry
Return Parrot's internal DOD registry PMC.
See also: F<src/pmc/addrregistry.pmc>.
-=cut
-
*/
-PARROT_API void
-Parrot_unregister_pmc(Parrot_Interp interp, Parrot_PMC pmc)
+PARROT_API
+void
+Parrot_unregister_pmc(Parrot_Interp interp /*NN*/, Parrot_PMC pmc)
{
PARROT_CALLIN_START(interp);
dod_unregister_pmc(interp, pmc);
PARROT_CALLIN_END(interp);
}
-PARROT_API Parrot_PMC
-Parrot_get_dod_registry(Parrot_Interp interp)
+PARROT_API
+Parrot_PMC
+Parrot_get_dod_registry(Parrot_Interp interp /*NN*/)
{
PMC *registry = interp->DOD_registry;
PARROT_CALLIN_START(interp);
@@ -1168,44 +1059,40 @@ Parrot_get_dod_registry(Parrot_Interp interp)
/*
-=item C<void
-Parrot_pmc_set_vtable(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_VTABLE vtable)>
+FUNCDOC: Parrot_pmc_set_vtable
Replaces the vtable of the PMC.
-=cut
-
*/
-PARROT_API void
-Parrot_PMC_set_vtable(Parrot_Interp interp, Parrot_PMC pmc,
- Parrot_VTABLE vtable)
+PARROT_API
+void
+Parrot_PMC_set_vtable(Parrot_Interp interp /*NN*/,
+ Parrot_PMC pmc, Parrot_VTABLE vtable)
{
+ UNUSED(interp);
+
pmc->vtable = vtable;
}
/*
-=item C<Parrot_VTABLE
-Parrot_get_vtable(Parrot_Interp interp, Parrot_Int id)>
+FUNCDOC: Parrot_get_vtable
Returns the vtable corresponding to the given PMC ID.
-=cut
-
*/
-PARROT_API Parrot_VTABLE
-Parrot_get_vtable(Parrot_Interp interp, Parrot_Int id)
+PARROT_API
+Parrot_VTABLE
+Parrot_get_vtable(const Parrot_Interp interp /*NN*/, Parrot_Int id)
+ /* PURE, WARN_UNUSED */
{
return interp->vtables[id];
}
/*
-=back
-
=head1 SEE ALSO
See F<include/parrot/extend.h> and F<docs/pdds/pdd11_extending.pod>.
@@ -1214,8 +1101,6 @@ See F<include/parrot/extend.h> and F<docs/pdds/pdd11_extending.pod>.
Initial version by Dan Sugalski.
-=cut
-
*/

0 comments on commit be68e0d

Please sign in to comment.