parrotcode: Parrot extension interface | |
Contents | C |
src/extend.c - Parrot extension interface
These are the functions that parrot extensions (i.e. parrot subroutines written in C, or some other compiled language, rather than in parrot bytecode) may access.
There is a deliberate distancing from the internals here. Don't go peeking inside -- you've as much access as bytecode does, but no more, so we can provide backwards compatibility for as long as we possibly can.
Parrot_String Parrot_PMC_get_string_intkey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int key)
void *Parrot_PMC_get_pointer_intkey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int key)
Parrot_PMC Parrot_PMC_get_pmc_intkey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int key)
Parrot_Int Parrot_PMC_get_intval(Parrot_Interp interp, Parrot_PMC pmc)
Parrot_Int Parrot_PMC_get_intval_intkey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int key)
Parrot_Int Parrot_PMC_get_intval_pmckey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_PMC key)
Parrot_Float Parrot_PMC_get_numval(Parrot_Interp interp, Parrot_PMC pmc)
Parrot_Float Parrot_PMC_get_numval_intkey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int key)
char *Parrot_PMC_get_cstring_intkey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int key)
string_cstring_free()
!char *Parrot_PMC_get_cstring(Parrot_Interp interp, Parrot_PMC pmc)
string_cstring_free()
!char *Parrot_PMC_get_cstringn(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int *length)
string_cstring_free()
.char *Parrot_PMC_get_cstringn_intkey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int *length, Parrot_Int key)
string_cstring_free()
.void Parrot_PMC_set_string(Parrot_Interp interp, Parrot_PMC pmc, Parrot_String value)
void Parrot_PMC_set_string_intkey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int key, Parrot_String value)
void Parrot_PMC_set_pmc_intkey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int key, Parrot_PMC value)
void Parrot_PMC_set_pmc_pmckey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_PMC key, Parrot_PMC value)
void Parrot_PMC_set_pointer_intkey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int key, void *value)
void Parrot_PMC_set_intval(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int value)
void Parrot_PMC_set_intval_intkey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int key, Parrot_Int value)
void Parrot_PMC_set_numval(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Float value)
void Parrot_PMC_set_numval_intkey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int key, Parrot_Float value)
void Parrot_PMC_set_cstring(Parrot_Interp interp, Parrot_PMC pmc, const char *value)
void Parrot_PMC_set_cstring_intkey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int key, const char *value)
void Parrot_PMC_set_cstringn(Parrot_Interp interp, Parrot_PMC pmc, const char *value, Parrot_Int length)
void Parrot_PMC_push_intval(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int value)
void Parrot_PMC_push_numval(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Float value)
void Parrot_PMC_delete_pmckey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_PMC key)
void Parrot_PMC_set_cstringn_intkey(Parrot_Interp interp, Parrot_PMC pmc, Parrot_Int key, const char *value, Parrot_Int length)
Parrot_PMC Parrot_PMC_new(Parrot_Interp interp, Parrot_Int type)
Parrot_Int Parrot_PMC_typenum(Parrot_Interp interp, const char *_class)
Parrot_PMC Parrot_PMC_null()
NULL
PMC.void Parrot_free_cstring(char *string)
void *Parrot_call_sub(Parrot_Interp interp, Parrot_PMC sub, const char *signature, ...)
signature
denotes the return value.
Next chars are arguments. v ... void return
I ... Parrot_Int
N ... Parrot_Float
S ... Parrot_String
P ... Parrot_PMC
Parrot_Int
Parrot_call_sub_ret_int(Parrot_Interp interp, Parrot_PMC sub, const char *signature, ...)>Parrot_Float
Parrot_call_sub_ret_float(Parrot_Interp interp, Parrot_PMC sub, const char *signature, ...)>void *Parrot_call_method(Parrot_Interp interp, Parrot_PMC sub, Parrot_PMC object, Parrot_String method, const char *signature, ...)
Parrot_Int Parrot_call_method_ret_int(Parrot_Interp interp, Parrot_PMC sub, Parrot_PMC object, Parrot_String method, const char *signature, ...)
Parrot_Float Parrot_call_method_ret_float(Parrot_Interp interp, Parrot_PMC sub, Parrot_PMC object, Parrot_String method, const char *signature, ...)
Parrot_Int Parrot_get_intreg(Parrot_Interp interp, Parrot_Int regnum)
Parrot_Float Parrot_get_numreg(Parrot_Interp interp, Parrot_Int regnum)
Parrot_String Parrot_get_strreg(Parrot_Interp interp, Parrot_Int regnum)
Parrot_PMC Parrot_get_pmcreg(Parrot_Interp interp, Parrot_Int regnum)
void Parrot_set_intreg(Parrot_Interp interp, Parrot_Int regnum, Parrot_Int value)
void Parrot_set_numreg(Parrot_Interp interp, Parrot_Int regnum, Parrot_Float value)
void Parrot_set_strreg(Parrot_Interp interp, Parrot_Int regnum, Parrot_String value)
void Parrot_set_pmcreg(Parrot_Interp interp, Parrot_Int regnum, Parrot_PMC value)
Parrot_String Parrot_new_string(Parrot_Interp interp, char *buffer, int length, const char *const encoding_name, Parrot_Int flags)
Parrot_Const_Encoding Parrot_find_encoding(Parrot_Interp interp, char *encoding_name)
Parrot_Language Parrot_find_language(Parrot_Interp interp, char *language)
void Parrot_register_pmc(Parrot_Interp interp, Parrot_PMC pmc)
void Parrot_unregister_pmc(Parrot_Interp interp, Parrot_PMC pmc)
Parrot_PMC Parrot_get_dod_registry(Parrot_Interp)
void Parrot_pmc_set_vtable(Parrot_Interp interp, Parrot_PMC pmc, Parrot_VTABLE vtable)
Parrot_VTABLE Parrot_get_vtable(Parrot_Interp interp, Parrot_Int id)
See include/parrot/extend.h and docs/pdds/pdd11_extending.pod.
Initial version by Dan Sugalski.
|