[docs] Update tests.pod a bit and remove a wrong comment from t/op/sprintf.t
[parrot.git] / docs / embed.pod
blobc198a4b2b2e1311d0fa92fa4e4a14243106c4ecb
1 # Copyright (C) 2001-2009, Parrot Foundation.
2 # $Id$
4 =head1 NAME
6 embed.pod - Parrot embedding system
8 =head1 SYNOPSIS
10     #include <parrot/embed.h>
11     #include <parrot/extend.h>
13     int main(int argc, char* argv[])
14     {
15         Parrot_Interp interp;
16         Parrot_PackFile pf;
18         interp = Parrot_new(NULL);
19         if (!interp) {
20             return 1;
21         }
23         pf = Parrot_pbc_read(interp, "foo.pbc", 0);
24         Parrot_pbc_load(interp, pf);
25         Parrot_runcode(interp, argc, argv);
27         Parrot_destroy(interp);
29         return 0;
30     }
32 =head1 FILES
34 =over 4
36 =item F<include/parrot/embed.h>
38 =item F<include/parrot/extend.h>
40 =back
42 =head1 DESCRIPTION
44 This is the documentation for Parrot's embedding API.
46 =head2 Data structures
48 =over 4
50 =item C<Parrot_Interp>
52 The topmost data structure in Parrot is C<Parrot_Interp>, which represents
53 a Parrot interpreter.  It is a required argument to almost every Parrot API
54 function.  The structure is opaque in an embedded environment, so you cannot
55 directly access any of its members.
57 =item C<Parrot_PackFile>
59 A Parrot packfile, the internal structure containing Parrot bytecode.
61 =item C<Parrot_String>
63 Parrot's internal string type, which contains character encoding information.
65 =item C<Parrot_PMC>
67 A Polymorphic Container.  This is the opaque external type for (PMC *).  Note
68 that this is a macro, so there can be only one C<Parrot_PMC> declaration per
69 line.
71 =item C<Parrot_Int>
73 =item C<Parrot_Float>
75 =item C<Parrot_UInt>
77 Parrot's numeric types.
79 =back
81 =head2 Constants
83 Not documented yet.
85 =head2 Type signatures
87     TODO: Write about signature strings
89 =head2 Interpreter initialization and destruction
91 =over 4
93 =item C<Parrot_Interp Parrot_new(Parrot_Interp parent)>
95 Creates a new interpreter, inheriting some data structures from a parent
96 interpreter, if supplied.  The first interpreter in any process should be
97 created with a NULL parent, and all subsequent interpreters in the same
98 process should use the first interpreter as their parent.  Failure to do so
99 may result in unpredictable errors.
101 =item C<Parrot_set_flag(PARROT_INTERP, Parrot_int flags)>
103 Sets or unsets interpreter flags.  Flags should be OR'd together.  Valid
104 flags include:
106 =over 4
108 =item PARROT_NO_FLAGS
110 =item PARROT_BOUNDS_FLAG
112 =item PARROT_GC_DEBUG_FLAG
114 =item PARROT_EXTERN_CODE_FLAG
116 =item PARROT_DESTROY_FLAG
118 =item PARROT_IS_THREAD
120 =item PARROT_THR_COPY_INTERP
122 =item PARROT_THR_THREAD_POOL
124 =item PARROT_THR_TYPE_1
126 =item PARROT_THR_TYPE_2
128 =item PARROT_THR_TYPE_3
130 =back
132 See F<interpreter.h> for the definition of these flags (TODO: document flag
133 definitions here).
135 =item C<void Parrot_set_run_core(PARROT_INTERP, Parrot_Run_core_t core)>
137 Sets the runcore for the interpreter.  Must be called before executing any
138 bytecode.  Valid runcores include:
140 =over 4
142 =item PARROT_SLOW_CORE
144 =item PARROT_FUNCTION_CORE
146 =item PARROT_FAST_CORE
148 =item PARROT_SWITCH_CORE
150 =item PARROT_CGP_CORE
152 =item PARROT_CGOTO_CORE
154 =item PARROT_EXEC_CORE
156 =item PARROT_GC_DEBUG_CORE
158 =back
160 See F<interpreter.h> for the definitive list.  If you're not sure which runcore
161 to use, don't call this function.  The default will be fine for most cases.
162 (TODO: document runcores here).
164 =item C<Parrot_set_trace(Parrot_Interp, Parrot_UInt flags)>
166 Sets the interpreter's trace flags.  Flags should be OR'd together.  Valid
167 flags are:
169 =over 4
171 =item PARROT_NO_TRACE
173 =item PARROT_TRACE_OPS_FLAG
175 =item PARROT_TRACE_FIND_METH_FLAG
177 =item PARROT_TRACE_SUB_CALL_FLAG
179 =item PARROT_ALL_TRACE_FLAGS
183 =back
185 =item C<void Parrot_set_executable_name(PARROT_INTERP, Parrot_string name)>
187 Sets the executable name of the calling process.  Note that the name is a
188 Parrot string, not a C string.
190 =item C<void Parrot_destroy(PARROT_INTERP)>
192 Destroys an interpreter.  At the time of this writing, this is a no-op.
193 See <Parrot_really_destroy()>.
195 =item C<void Parrot_really_destroy(PARROT_INTERP, int exit_code)>
197 Destroys an interpreter, regardless of the environment.  The exit code is
198 currently unused.
200 =item C<void Parrot_exit(PARROT_INTERP, int status)>
202 Destroys the interpreter and exits with an exit code of C<status>.  Before
203 exiting, the function calls all registered exit handlers in LIFO order.
204 C<Parrot_really_destroy()> is usually called as the last exit handler.
206 =item C<void Parrot_on_exit(PARROT_INTERP,
207                             void (*handler)(Parrot_Interp, int, void *), void *arg)>
209 Registers an exit handler to be called from C<Parrot_exit()> in LIFO order.
210 The handler function should accept as arguments an interpreter, an integer
211 exit code, and an argument (which can be NULL).
213 =back
215 =head2 Loading and running bytecode
217 =over 4
219 =item C<Parrot_PackFile Parrot_pbc_read(PARROT_INTERP, const char *path, const int debug)>
221 Reads Parrot bytecode or PIR from the file referenced by C<path>.  Returns
222 a packfile structure for use by C<Parrot_pbc_load()>. C<debug> should be 0.
224 =item C<void Parrot_pbc_load(PARROT_INTERP, Parrot_PackFile pf)>
226 Loads a packfile into the interpreter.  After this operation the interpreter
227 is ready to run the bytecode in the packfile.
229 =item C<void Parrot_runcode(PARROT_INTERP, int argc, char *argv[])>
231 Runs the bytecode associated with the interpreter.  Use C<argc> and C<argv[]>
232 to pass arguments to the bytecode.
234 =item C<Parrot_PackFile PackFile_new_dummy(PARROT_INTERP, char *name)>
236 Creates a "dummy" packfile in lieu of actually creating one from a bytecode
237 file on disk.
239 =item C<void Parrot_load_bytecode(PARROT_INTERP, const char *path)>
241 Reads and load Parrot bytecode or PIR from the file referenced by C<path>.
242 You should create a dummy packfile beforehand; see C<PackFile_new_dummy> for
243 details.  Due to the void return type, the behavior of this function on error
244 is unclear.
246 =back
248 =head2 Data manipulation
250 =head3 Native types
252 =over 4
254 =item C<int Parrot_PMC_typenum(PARROT_INTERP, const char *type)>
256 Returns the internal type number corresponding to C<type>.  Useful for
257 instantiating various Parrot data types.
259 =item C<char *Parrot_str_to_cstring(PARROT_INTERP, const STRING *s)>
261 XXX needs to be a formal Parrot_* API.
262 Returns the C string representation of a Parrot string.
264 =item C<STRING *Parrot_str_new(PARROT_INTERP, const char *string, int len)>
266 XXX needs to be a formal Parrot_* API.
267 Returns the Parrot string representation of a C string.
269 =item C<string_from_literal(PARROT_INTERP, const char *string)>
271 XXX needs to be a formal Parrot_* API.
272 A macro for simplifying calls to C<Parrot_str_new>.
274 =back
276 =head3 PMCs
278 =over 4
280 =item C<Parrot_PMC Parrot_PMC_new(PARROT_INTERP, int typenum)>
282 Creates a new PMC of the type identified by C<typenum>.  Use
283 C<Parrot_PMC_typenum> to obtain the correct type number.
285 =item C<void Parrot_register_pmc(Parrot_PMC pmc)>
287 Registers an externally created PMC with the garbage collector.  You MUST call
288 this for any PMCs you create outside of Parrot bytecode, otherwise your PMC
289 may be garbage collected before you are finished using it.
291 =item C<void Parrot_unregister_pmc(Parrot_PMC pmc)>
293 Unregisters an externally created PMC from the garbage collector.  You MUST call
294 this after you are finished using PMCs you create outside of Parrot bytecode,
295 or risk memory leaks.
297 =back
299 =head3 Globals
301 =over 4
303 =item C<Parrot_PMC Parrot_find_global_cur(PARROT_INTERP, Parrot_String name)>
305 Find and return a global called C<name> in the current namespace.  Returns
306 C<PMCNULL> if not found.
308 =item C<Parrot_PMC Parrot_find_global_n(PARROT_INTERP, PMC namespace, Parrot_String name)>
310 Search the namespace PMC C<namespace> for an object with name C<globalname>.
311 Return the object, or NULL if not found.
313 =item C<Parrot_PMC Parrot_find_global_s(PARROT_INTERP, Parrot_String namespace, Parrot_String name)>
315 Find and return a global called C<name> in the namespace C<namespace>.  Returns
316 C<PMCNULL> if not found.
318 =item C<void Parrot_store_global_n(PARROT_INTERP, PMC namespace, Parrot_String name, Parrot_PMC val)>
320 Store the PMC C<val> into the namespace PMC C<namespace> with name C<globalname>.
322 =item C<void Parrot_store_global_s(PARROT_INTERP, Parrot_String namespace, Parrot_String name, Parrot_PMC val)>
324 Sets the value of a global called C<name> in the namespace C<namespace>.  Does
325 nothing if the global is not found.
327 =back
329 =head3 Lexicals
331 Not documented yet.
333 =head2 Calling subroutines
335 =over 4
337 =item C<void Parrot_ext_call(PARROT_INTERP, Parrot_PMC sub, const_char *signature, varargs ...)>
339 Call a Parrot subroutine using the supplied signature. Variables to be filled
340 with return values are passed as references in the varargs list, after all
341 arguments.
343 =back
345 =head2 Objects
347 =head3 Creating and destroying objects
349 =over 4
351 =item C<Parrot_PMC Parrot_oo_get_class(PARROT_INTERP, Parrot_PMC namespace)>
353 Returns the class corresponding to the supplied namespace.
355 =item C<Parrot_PMC Parrot_PMC_instantiate(PARROT_INTERP, Parrot_PMC the_class, Parrot_PMC arg)>
357 Instantiates a new object of class C<the_class>, which can be obtained from
358 C<Parrot_oo_get_class()>.  Passes an optional PMC argument C<arg> to the
359 constructor (see init versus init_pmc).  Use C<PMCNULL> if you are not
360 supplying an argument.
362 =back
364 =head3 Calling methods
366 =over 4
368 =item C<void Parrot_ext_call(PARROT_INTERP, Parrot_PMC method, const_char *signature, varargs ...)>
370 Methods are called using the same API function as calling a subroutine. The
371 first argument should be the object that the method will be invoked on, and it
372 should have the signature "Pi".
374 =back
376 =head1 COMPILING
378 Note: This section is aimed at you if you are writing an application
379 external to parrot which links against an installed parrot library.
381 =head2 Caveats
383 Several API functions are missing prototypes in Parrot's header files.  This
384 means you may receive type warnings during compilation even though the types
385 of your arguments and return variables are correct.  In this case it is safe
386 to cast to the correct type; not doing so may cause undesired behavior.
388 =head2 Compiler and linker flags
390 Your application will need to include the appropriate header files and
391 link against parrot and its dependencies.
393 Because the location of these files can vary from platform to platform, and
394 build to build, a general method is provided to find out the necessary flags to
395 use.
397 pkg-config is a helper tool, now common on many platforms, which many packages
398 have adopted to provide the necessary compiler and linker flags required to
399 build against a library. parrot will install a file called F<parrot.pc> which
400 can be queried using pkg-config.
402 To start with, find out what version of parrot is installed by running
403 pkg-config with the C<--modversion> flag. If this command fails with an error,
404 skip to the end of this section.
406   pkg-config --modversion parrot
408 To find out the necessary C<-I> flags, use C<--cflags>:
410   pkg-config --cflags parrot
412 ... and to find the necessary C<-L> and C<-l> flags, use C<--libs>:
414   pkg-config --libs parrot
416 Where both compiling and linking are performed in one step, query both sets of
417 flags with:
419   pkg-config --cflags --libs parrot
421 The pkg-config command can be incorporated with a compile as shown here.
423   cc src/disassemble.c `pkg-config --cflags --libs parrot`
425 Most applications will probably choose to run pkg-config as part of a
426 configure script, so if you are using autoconf you could use a test
427 such as this.
429   PARROT_REQUIRED_VERSION=0.4.1
430   AC_SUBST(PARROT_REQUIRED_VERSION)
431   PKG_CHECK_MODULES(PARROT, parrot >= $PARROT_REQUIRED_VERSION,
432                     [AC_DEFINE([HAVE_PARROT], 1, [define if have parrot])])
433   AC_SUBST(PARROT_LIBS)
434   AC_SUBST(PARROT_CFLAGS)
436 If parrot has been installed system-wide, then any of the previous
437 lines should have returned the relevant flags. If it is not installed
438 in one of the standard places that pkg-config looks, then you will get
439 an error message.
441   pkg-config --libs parrot
442   Package parrot was not found in the pkg-config search path.
443   Perhaps you should add the directory containing `parrot.pc'
444   to the PKG_CONFIG_PATH environment variable
445   No package 'parrot' found
447 As stated in the error message, use an environment variable to make pkg-config
448 look in more locations.
450   export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
452 The last part of the variable will almost certainly be F<.../lib/pkgconfig>.
453 Set this variable in your login scripts if you need it to be available in
454 future.
456 =head1 EXAMPLES
458 =head2 Load bytecode as a library and run a single subroutine
460     #include <parrot/parrot.h>
461     #include <parrot/embed.h>
462     #include <parrot/extend.h>
464     int main(int argc, char *argv[])
465     {
466         Parrot_Interp interp;
467         Parrot_PackFile pf;
468         Parrot_PMC sub;
469         Parrot_String pstr;
471         interp = Parrot_new(NULL);
472         imcc_init(interp);
474         /* create a new packfile -- any name will do */
475         pf = PackFile_new_dummy(interp, "my-parrot-code");
477         pstr = string_from_literal(interp, "foo.pir");
478         Parrot_load_bytecode(interp, pstr);
480         /* find the subroutine named "foo" in the global namespace */
481         pstr = string_from_literal(interp, "foo");
482         sub = Parrot_find_global_cur(interp, pstr);
484         /* run foo(), which returns nothing */
485         Parrot_ext_call(interp, sub, "->");
487         Parrot_destroy(interp);
489         return(0);
490     }
492 =head1 EXPORTED FUNCTIONS
494 The Parrot embedding API is not finalized, and it will go through several
495 deprecation cycles before stabilizing.  Below is the comprehensive list of
496 candidates for inclusion in the Parrot embedding API.  It includes the
497 following types of functions:
499 =over 4
501 =item * The core functions documented above
503 =item * Functions required by macros
505 =item * Parrot_PMC_* VTABLE wrappers
507 =item * Miscellaneous functions whose utility outside of the core is
508 uncertain.  This includes functions used by HLLs.
510 =item * Functions that should be removed in a future deprecation cycle.  A
511 good example of this is most of the internal string_* functions, which now
512 have formal Parrot_str_* wrappers.
514 =back
516 The list may also be augmented if additional functionality is required.
518 =over 4
520 =item C<disable_event_checking>
522 =item C<enable_event_checking>
524 =item C<interpinfo>
526 =item C<interpinfo_p>
528 =item C<interpinfo_s>
530 =item C<mem_allocate_n_typed>
532 =item C<mem_allocate_n_zeroed_typed>
534 =item C<mem_allocate_zeroed_typed>
536 =item C<mem_sys_allocate>
538 =item C<mem_sys_allocate_zeroed>
540 =item C<mem_sys_free>
542 =item C<mem_sys_realloc>
544 =item C<mem_sys_realloc_zeroed>
546 =item C<PackFile_Constant_pack>
548 =item C<PackFile_ConstTable_pack>
550 =item C<PackFile_ConstTable_pack_size>
552 =item C<PackFile_destroy>
554 =item C<PackFile_find_in_const>
556 =item C<PackFile_fixup_subs>
558 =item C<PackFile_new>
560 =item C<PackFile_new_dummy>
562 =item C<PackFile_pack>
564 =item C<PackFile_pack_size>
566 =item C<Parrot_assert>
568 =item C<Parrot_block_GC_mark>
570 =item C<Parrot_block_GC_sweep>
572 =item C<Parrot_byte_index>
574 =item C<Parrot_byte_rindex>
576 =item C<Parrot_callback_C>
578 =item C<Parrot_callback_D>
580 =item C<Parrot_ext_call>
582 =item C<Parrot_char_digit_value>
584 =item C<Parrot_charset_c_name>
586 =item C<Parrot_charset_name>
588 =item C<Parrot_charset_number>
590 =item C<Parrot_charset_number_of_str>
592 =item C<Parrot_charsets_encodings_deinit>
594 =item C<Parrot_charsets_encodings_init>
596 =item C<Parrot_clear_debug>
598 =item C<Parrot_clear_flag>
600 =item C<Parrot_clear_i>
602 =item C<Parrot_clear_n>
604 =item C<Parrot_clear_p>
606 =item C<Parrot_clear_s>
608 =item C<Parrot_clear_trace>
610 =item C<Parrot_clone>
612 =item C<Parrot_compile_file>
614 =item C<Parrot_compile_string>
616 =item C<Parrot_ComposeRole>
618 =item C<Parrot_compreg>
620 =item C<Parrot_ComputeMRO_C3>
622 =item C<Parrot_confess>
624 =item C<Parrot_context_ref_trace>
626 =item C<Parrot_cx_add_handler>
628 =item C<Parrot_cx_add_handler_local>
630 =item C<Parrot_cx_broadcast_message>
632 =item C<Parrot_cx_count_handlers_local>
634 =item C<Parrot_cx_count_handlers_typed>
636 =item C<Parrot_cx_delete_handler_local>
638 =item C<Parrot_cx_delete_handler_typed>
640 =item C<Parrot_cx_delete_suspend_for_gc>
642 =item C<Parrot_cx_delete_task>
644 =item C<Parrot_cx_find_handler_for_task>
646 =item C<Parrot_cx_find_handler_local>
648 =item C<Parrot_cx_handle_tasks>
650 =item C<Parrot_cx_peek_task>
652 =item C<Parrot_cx_request_suspend_for_gc>
654 =item C<Parrot_cx_runloop_end>
656 =item C<Parrot_cx_schedule_callback>
658 =item C<Parrot_cx_schedule_repeat>
660 =item C<Parrot_cx_schedule_sleep>
662 =item C<Parrot_cx_schedule_task>
664 =item C<Parrot_cx_schedule_timer>
666 =item C<Parrot_cx_send_message>
668 =item C<Parrot_default_charset>
670 =item C<Parrot_default_encoding>
672 =item C<Parrot_del_timer_event>
674 =item C<Parrot_destroy>
676 =item C<Parrot_disassemble>
678 =item C<Parrot_do_check_events>
680 =item C<Parrot_do_handle_events>
682 =item C<Parrot_dump_dynamic_environment>
684 =item C<Parrot_encoding_c_name>
686 =item C<Parrot_encoding_name>
688 =item C<Parrot_encoding_number>
690 =item C<Parrot_encoding_number_of_str>
692 =item C<Parrot_eprintf>
694 =item C<Parrot_event_add_io_event>
696 =item C<Parrot_ex_add_c_handler>
698 =item C<Parrot_ex_build_exception>
700 =item C<Parrot_exit>
702 =item C<Parrot_ex_mark_unhandled>
704 =item C<Parrot_ex_rethrow_from_c>
706 =item C<Parrot_ex_rethrow_from_op>
708 =item C<Parrot_ex_throw_from_c>
710 =item C<Parrot_ex_throw_from_c_args>
712 =item C<Parrot_ex_throw_from_op>
714 =item C<Parrot_ex_throw_from_op_args>
716 =item C<Parrot_find_charset>
718 =item C<Parrot_find_charset_converter>
720 =item C<Parrot_find_encoding>
722 =item C<Parrot_find_encoding_converter>
724 =item C<Parrot_find_global_cur>
726 =item C<Parrot_find_global_k>
728 =item C<Parrot_find_global_n>
730 =item C<Parrot_find_global_op>
732 =item C<Parrot_find_global_s>
734 =item C<Parrot_find_language>
736 =item C<Parrot_find_method_direct>
738 =item C<Parrot_find_method_with_cache>
740 =item C<Parrot_find_name_op>
742 =item C<Parrot_float_rand>
744 =item C<Parrot_fprintf>
746 =item C<Parrot_free_context>
748 =item C<Parrot_free_cstring>
750 =item C<Parrot_freeze>
752 =item C<Parrot_freeze_at_destruct>
754 =item C<Parrot_full_sub_name>
756 =item C<parrot_gc_context>
758 =item C<Parrot_gc_gms_init>
760 =item C<parrot_gc_gms_Parrot_gc_mark_PObj_alive>
762 =item C<Parrot_gc_mark_PObj_alive>
764 =item C<Parrot_get_charset>
766 =item C<Parrot_get_ctx_HLL_namespace>
768 =item C<Parrot_get_ctx_HLL_type>
770 =item C<Parrot_get_datatype_enum>
772 =item C<Parrot_get_datatype_name>
774 =item C<Parrot_get_encoding>
776 =item C<Parrot_get_global>
778 =item C<Parrot_get_HLL_id>
780 =item C<Parrot_get_HLL_name>
782 =item C<Parrot_get_HLL_namespace>
784 =item C<Parrot_get_HLL_type>
786 =item C<Parrot_get_intreg>
788 =item C<Parrot_get_namespace_autobase>
790 =item C<Parrot_get_namespace_keyed>
792 =item C<Parrot_get_namespace_keyed_str>
794 =item C<Parrot_get_numreg>
796 =item C<Parrot_get_pmcreg>
798 =item C<Parrot_get_root_namespace>
800 =item C<Parrot_get_runtime_path>
802 =item C<Parrot_get_runtime_prefix>
804 =item C<Parrot_get_strreg>
806 =item C<Parrot_get_vtable>
808 =item C<Parrot_get_vtable_index>
810 =item C<Parrot_get_vtable_name>
812 =item C<Parrot_init_events>
814 =item C<Parrot_init_signals>
816 =item C<Parrot_init_stacktop>
818 =item C<Parrot_int_rand>
820 =item C<Parrot_invalidate_method_cache>
822 =item C<Parrot_io_accept>
824 =item C<Parrot_io_bind>
826 =item C<Parrot_io_close>
828 =item C<Parrot_io_close_filehandle>
830 =item C<Parrot_io_close_piohandle>
832 =item C<Parrot_io_connect>
834 =item C<Parrot_IOData_mark>
836 =item C<Parrot_io_eof>
838 =item C<Parrot_io_eprintf>
840 =item C<Parrot_io_fdopen>
842 =item C<Parrot_io_finish>
844 =item C<Parrot_io_flush>
846 =item C<Parrot_io_flush_filehandle>
848 =item C<Parrot_io_fprintf>
850 =item C<Parrot_io_get_buffer_end>
852 =item C<Parrot_io_get_buffer_next>
854 =item C<Parrot_io_get_buffer_start>
856 =item C<Parrot_io_getfd>
858 =item C<Parrot_io_get_file_position>
860 =item C<Parrot_io_get_file_size>
862 =item C<Parrot_io_get_flags>
864 =item C<Parrot_io_get_last_file_position>
866 =item C<Parrot_io_get_os_handle>
868 =item C<Parrot_io_init>
870 =item C<Parrot_io_is_closed>
872 =item C<Parrot_io_is_closed_filehandle>
874 =item C<Parrot_io_is_encoding>
876 =item C<Parrot_io_is_tty>
878 =item C<Parrot_io_listen>
880 =item C<Parrot_io_make_offset>
882 =item C<Parrot_io_new_pmc>
884 =item C<Parrot_io_new_socket_pmc>
886 =item C<Parrot_io_open>
888 =item C<Parrot_io_parse_open_flags>
890 =item C<Parrot_io_peek>
892 =item C<Parrot_io_poll>
894 =item C<Parrot_io_printf>
896 =item C<Parrot_io_putps>
898 =item C<Parrot_io_puts>
900 =item C<Parrot_io_readline>
902 =item C<Parrot_io_reads>
904 =item C<Parrot_io_recv>
906 =item C<Parrot_io_seek>
908 =item C<Parrot_io_send>
910 =item C<Parrot_io_set_file_position>
912 =item C<Parrot_io_set_file_size>
914 =item C<Parrot_io_set_flags>
916 =item C<Parrot_io_set_os_handle>
918 =item C<Parrot_io_socket>
920 =item C<Parrot_io_socket_is_closed>
922 =item C<Parrot_io_STDERR>
924 =item C<Parrot_io_stdhandle>
926 =item C<Parrot_io_STDIN>
928 =item C<Parrot_io_STDOUT>
930 =item C<Parrot_io_tell>
932 =item C<Parrot_io_write>
934 =item C<Parrot_is_blocked_GC_mark>
936 =item C<Parrot_is_blocked_GC_sweep>
938 =item C<Parrot_kill_event_loop>
940 =item C<Parrot_lib_add_path>
942 =item C<Parrot_lib_add_path_from_cstring>
944 =item C<Parrot_load_bytecode>
946 =item C<Parrot_load_charset>
948 =item C<Parrot_load_encoding>
950 =item C<Parrot_load_language>
952 =item C<Parrot_load_lib>
954 =item C<Parrot_locate_runtime_file>
956 =item C<Parrot_locate_runtime_file_str>
958 =item C<Parrot_make_cb>
960 =item C<Parrot_make_default_charset>
962 =item C<Parrot_make_default_encoding>
964 =item C<Parrot_make_namespace_autobase>
966 =item C<Parrot_make_namespace_keyed>
968 =item C<Parrot_make_namespace_keyed_str>
970 =item C<Parrot_mmd_cache_create>
972 =item C<Parrot_mmd_cache_destroy>
974 =item C<Parrot_mmd_cache_lookup_by_values>
976 =item C<Parrot_mmd_cache_mark>
978 =item C<Parrot_mmd_cache_store_by_values>
980 =item C<Parrot_new>
982 =item C<Parrot_new_cb_event>
984 =item C<Parrot_new_charset>
986 =item C<Parrot_new_encoding>
988 =item C<Parrot_new_string>
990 =item C<Parrot_new_suspend_for_gc_event>
992 =item C<Parrot_new_terminate_event>
994 =item C<Parrot_new_timer_event>
996 =item C<Parrot_ns_get_name>
998 =item C<Parrot_on_exit>
1000 =item C<Parrot_oo_get_class>
1002 =item C<Parrot_oo_get_class_str>
1004 =item C<Parrot_pbc_load>
1006 =item C<Parrot_pbc_read>
1008 =item C<Parrot_PMC_absolute>
1010 =item C<Parrot_PMC_add>
1012 =item C<Parrot_PMC_add_attribute>
1014 =item C<Parrot_PMC_add_float>
1016 =item C<Parrot_PMC_add_int>
1018 =item C<Parrot_PMC_add_method>
1020 =item C<Parrot_PMC_add_parent>
1022 =item C<Parrot_PMC_add_role>
1024 =item C<Parrot_PMC_add_vtable_override>
1026 =item C<Parrot_PMC_assign_pmc>
1028 =item C<Parrot_PMC_assign_string_native>
1030 =item C<Parrot_PMC_can>
1032 =item C<Parrot_PMC_clone>
1034 =item C<Parrot_PMC_clone_pmc>
1036 =item C<Parrot_PMC_cmp>
1038 =item C<Parrot_PMC_cmp_num>
1040 =item C<Parrot_PMC_cmp_pmc>
1042 =item C<Parrot_PMC_cmp_string>
1044 =item C<Parrot_PMC_concatenate>
1046 =item C<Parrot_PMC_concatenate_str>
1048 =item C<Parrot_PMC_decrement>
1050 =item C<Parrot_PMC_defined>
1052 =item C<Parrot_PMC_defined_keyed>
1054 =item C<Parrot_PMC_defined_keyed_int>
1056 =item C<Parrot_PMC_defined_keyed_str>
1058 =item C<Parrot_PMC_delete_keyed>
1060 =item C<Parrot_PMC_delete_keyed_int>
1062 =item C<Parrot_PMC_delete_keyed_str>
1064 =item C<Parrot_PMC_delete_pmckey>
1066 =item C<Parrot_PMC_delprop>
1068 =item C<Parrot_PMC_destroy>
1070 =item C<Parrot_PMC_divide>
1072 =item C<Parrot_PMC_divide_float>
1074 =item C<Parrot_PMC_divide_int>
1076 =item C<Parrot_PMC_does>
1078 =item C<Parrot_PMC_does_pmc>
1080 =item C<Parrot_PMC_elements>
1082 =item C<Parrot_PMC_exists_keyed>
1084 =item C<Parrot_PMC_exists_keyed_int>
1086 =item C<Parrot_PMC_exists_keyed_str>
1088 =item C<Parrot_PMC_find_method>
1090 =item C<Parrot_PMC_floor_divide>
1092 =item C<Parrot_PMC_floor_divide_float>
1094 =item C<Parrot_PMC_floor_divide_int>
1096 =item C<Parrot_PMC_get_attr_keyed>
1098 =item C<Parrot_PMC_get_attr_str>
1100 =item C<Parrot_PMC_get_bool>
1102 =item C<Parrot_PMC_get_class>
1104 =item C<Parrot_PMC_get_cstring>
1106 =item C<Parrot_PMC_get_cstring_intkey>
1108 =item C<Parrot_PMC_get_cstringn>
1110 =item C<Parrot_PMC_get_cstringn_intkey>
1112 =item C<Parrot_PMC_get_integer>
1114 =item C<Parrot_PMC_get_integer_keyed>
1116 =item C<Parrot_PMC_get_integer_keyed_int>
1118 =item C<Parrot_PMC_get_integer_keyed_str>
1120 =item C<Parrot_PMC_get_intval>
1122 =item C<Parrot_PMC_get_intval_intkey>
1124 =item C<Parrot_PMC_get_intval_pmckey>
1126 =item C<Parrot_PMC_get_iter>
1128 =item C<Parrot_PMC_get_namespace>
1130 =item C<Parrot_PMC_get_number>
1132 =item C<Parrot_PMC_get_number_keyed>
1134 =item C<Parrot_PMC_get_number_keyed_int>
1136 =item C<Parrot_PMC_get_number_keyed_str>
1138 =item C<Parrot_PMC_get_numval>
1140 =item C<Parrot_PMC_get_numval_intkey>
1142 =item C<Parrot_PMC_get_pmc>
1144 =item C<Parrot_PMC_get_pmc_intkey>
1146 =item C<Parrot_PMC_get_pmc_keyed>
1148 =item C<Parrot_PMC_get_pmc_keyed_int>
1150 =item C<Parrot_PMC_get_pmc_keyed_str>
1152 =item C<Parrot_PMC_get_pmc_strkey>
1154 =item C<Parrot_PMC_get_pointer>
1156 =item C<Parrot_PMC_get_pointer_intkey>
1158 =item C<Parrot_PMC_get_pointer_keyed>
1160 =item C<Parrot_PMC_get_pointer_keyed_int>
1162 =item C<Parrot_PMC_get_pointer_keyed_str>
1164 =item C<Parrot_PMC_getprop>
1166 =item C<Parrot_PMC_getprops>
1168 =item C<Parrot_PMC_get_repr>
1170 =item C<Parrot_PMC_get_string>
1172 =item C<Parrot_PMC_get_string_intkey>
1174 =item C<Parrot_PMC_get_string_keyed>
1176 =item C<Parrot_PMC_get_string_keyed_int>
1178 =item C<Parrot_PMC_get_string_keyed_str>
1180 =item C<Parrot_PMC_i_absolute>
1182 =item C<Parrot_PMC_i_add>
1184 =item C<Parrot_PMC_i_add_float>
1186 =item C<Parrot_PMC_i_add_int>
1188 =item C<Parrot_PMC_i_concatenate>
1190 =item C<Parrot_PMC_i_concatenate_str>
1192 =item C<Parrot_PMC_i_divide>
1194 =item C<Parrot_PMC_i_divide_float>
1196 =item C<Parrot_PMC_i_divide_int>
1198 =item C<Parrot_PMC_i_floor_divide>
1200 =item C<Parrot_PMC_i_floor_divide_float>
1202 =item C<Parrot_PMC_i_floor_divide_int>
1204 =item C<Parrot_PMC_i_logical_not>
1206 =item C<Parrot_PMC_i_modulus>
1208 =item C<Parrot_PMC_i_modulus_float>
1210 =item C<Parrot_PMC_i_modulus_int>
1212 =item C<Parrot_PMC_i_multiply>
1214 =item C<Parrot_PMC_i_multiply_float>
1216 =item C<Parrot_PMC_i_multiply_int>
1218 =item C<Parrot_PMC_increment>
1220 =item C<Parrot_PMC_i_neg>
1222 =item C<Parrot_PMC_init>
1224 =item C<Parrot_PMC_init_pmc>
1226 =item C<Parrot_PMC_inspect>
1228 =item C<Parrot_PMC_inspect_str>
1230 =item C<Parrot_PMC_instantiate>
1232 =item C<Parrot_PMC_invoke>
1234 =item C<Parrot_PMC_i_pow>
1236 =item C<Parrot_PMC_i_pow_float>
1238 =item C<Parrot_PMC_i_pow_int>
1240 =item C<Parrot_PMC_i_repeat>
1242 =item C<Parrot_PMC_i_repeat_int>
1244 =item C<Parrot_PMC_isa>
1246 =item C<Parrot_PMC_isa_pmc>
1248 =item C<Parrot_PMC_is_equal>
1250 =item C<Parrot_PMC_is_equal_num>
1252 =item C<Parrot_PMC_is_equal_string>
1254 =item C<Parrot_PMC_is_same>
1256 =item C<Parrot_PMC_i_subtract>
1258 =item C<Parrot_PMC_i_subtract_float>
1260 =item C<Parrot_PMC_i_subtract_int>
1262 =item C<Parrot_PMC_logical_and>
1264 =item C<Parrot_PMC_logical_not>
1266 =item C<Parrot_PMC_logical_or>
1268 =item C<Parrot_PMC_logical_xor>
1270 =item C<Parrot_PMC_mark>
1272 =item C<Parrot_PMC_modulus>
1274 =item C<Parrot_PMC_modulus_float>
1276 =item C<Parrot_PMC_modulus_int>
1278 =item C<Parrot_PMC_morph>
1280 =item C<Parrot_PMC_multiply>
1282 =item C<Parrot_PMC_multiply_float>
1284 =item C<Parrot_PMC_multiply_int>
1286 =item C<Parrot_PMC_name>
1288 =item C<Parrot_PMC_neg>
1290 =item C<Parrot_PMC_new>
1292 =item C<Parrot_PMC_newclass>
1294 =item C<Parrot_PMC_null>
1296 =item C<Parrot_PMC_pop_float>
1298 =item C<Parrot_PMC_pop_integer>
1300 =item C<Parrot_PMC_pop_pmc>
1302 =item C<Parrot_PMC_pop_string>
1304 =item C<Parrot_PMC_pow>
1306 =item C<Parrot_PMC_pow_float>
1308 =item C<Parrot_PMC_pow_int>
1310 =item C<Parrot_PMC_push_float>
1312 =item C<Parrot_PMC_push_integer>
1314 =item C<Parrot_PMC_push_intval>
1316 =item C<Parrot_PMC_push_numval>
1318 =item C<Parrot_PMC_push_pmc>
1320 =item C<Parrot_PMC_push_pmcval>
1322 =item C<Parrot_PMC_push_string>
1324 =item C<Parrot_PMC_remove_attribute>
1326 =item C<Parrot_PMC_remove_method>
1328 =item C<Parrot_PMC_remove_parent>
1330 =item C<Parrot_PMC_remove_role>
1332 =item C<Parrot_PMC_remove_vtable_override>
1334 =item C<Parrot_PMC_repeat>
1336 =item C<Parrot_PMC_repeat_int>
1338 =item C<Parrot_PMC_set_attr_keyed>
1340 =item C<Parrot_PMC_set_attr_str>
1342 =item C<Parrot_PMC_set_bignum_int>
1344 =item C<Parrot_PMC_set_bignum_num>
1346 =item C<Parrot_PMC_set_bignum_str>
1348 =item C<Parrot_PMC_set_bool>
1350 =item C<Parrot_PMC_set_cstring>
1352 =item C<Parrot_PMC_set_cstring_intkey>
1354 =item C<Parrot_PMC_set_cstringn>
1356 =item C<Parrot_PMC_set_cstringn_intkey>
1358 =item C<Parrot_PMC_set_integer_keyed>
1360 =item C<Parrot_PMC_set_integer_keyed_int>
1362 =item C<Parrot_PMC_set_integer_keyed_str>
1364 =item C<Parrot_PMC_set_integer_native>
1366 =item C<Parrot_PMC_set_integer_same>
1368 =item C<Parrot_PMC_set_intval>
1370 =item C<Parrot_PMC_set_intval_intkey>
1372 =item C<Parrot_PMC_set_number_keyed>
1374 =item C<Parrot_PMC_set_number_keyed_int>
1376 =item C<Parrot_PMC_set_number_keyed_str>
1378 =item C<Parrot_PMC_set_number_native>
1380 =item C<Parrot_PMC_set_number_same>
1382 =item C<Parrot_PMC_set_numval>
1384 =item C<Parrot_PMC_set_numval_intkey>
1386 =item C<Parrot_PMC_set_pmc>
1388 =item C<Parrot_PMC_set_pmc_intkey>
1390 =item C<Parrot_PMC_set_pmc_keyed>
1392 =item C<Parrot_PMC_set_pmc_keyed_int>
1394 =item C<Parrot_PMC_set_pmc_keyed_str>
1396 =item C<Parrot_PMC_set_pmc_pmckey>
1398 =item C<Parrot_PMC_set_pmc_strkey>
1400 =item C<Parrot_PMC_set_pointer>
1402 =item C<Parrot_PMC_set_pointer_intkey>
1404 =item C<Parrot_PMC_set_pointer_keyed>
1406 =item C<Parrot_PMC_set_pointer_keyed_int>
1408 =item C<Parrot_PMC_set_pointer_keyed_str>
1410 =item C<Parrot_PMC_setprop>
1412 =item C<Parrot_PMC_set_string>
1414 =item C<Parrot_PMC_set_string_intkey>
1416 =item C<Parrot_PMC_set_string_keyed>
1418 =item C<Parrot_PMC_set_string_keyed_int>
1420 =item C<Parrot_PMC_set_string_keyed_str>
1422 =item C<Parrot_PMC_set_string_native>
1424 =item C<Parrot_PMC_set_string_same>
1426 =item C<Parrot_PMC_set_vtable>
1428 =item C<Parrot_PMC_share>
1430 =item C<Parrot_PMC_share_ro>
1432 =item C<Parrot_PMC_shift_float>
1434 =item C<Parrot_PMC_shift_integer>
1436 =item C<Parrot_PMC_shift_pmc>
1438 =item C<Parrot_PMC_shift_string>
1440 =item C<Parrot_PMC_splice>
1442 =item C<Parrot_PMC_substr>
1444 =item C<Parrot_PMC_substr_str>
1446 =item C<Parrot_PMC_subtract>
1448 =item C<Parrot_PMC_subtract_float>
1450 =item C<Parrot_PMC_subtract_int>
1452 =item C<Parrot_PMC_typenum>
1454 =item C<Parrot_PMC_unshift_float>
1456 =item C<Parrot_PMC_unshift_integer>
1458 =item C<Parrot_PMC_unshift_pmc>
1460 =item C<Parrot_PMC_unshift_string>
1462 =item C<Parrot_pop_context>
1464 =item C<Parrot_pop_mark>
1466 =item C<Parrot_printf>
1468 =item C<Parrot_psprintf>
1470 =item C<Parrot_push_action>
1472 =item C<Parrot_push_context>
1474 =item C<Parrot_push_mark>
1476 =item C<Parrot_range_rand>
1478 =item C<Parrot_regenerate_HLL_namespaces>
1480 =item C<Parrot_register_charset>
1482 =item C<Parrot_register_charset_converter>
1484 =item C<Parrot_register_encoding>
1486 =item C<Parrot_register_HLL>
1488 =item C<Parrot_register_HLL_lib>
1490 =item C<Parrot_register_HLL_type>
1492 =item C<Parrot_register_move>
1494 =item C<Parrot_register_pmc>
1496 =item C<Parrot_run_callback>
1498 =item C<Parrot_runcode>
1500 =item C<Parrot_run_native>
1502 =item C<Parrot_schedule_event>
1504 =item C<Parrot_schedule_interp_qentry>
1506 =item C<Parrot_secret_snprintf>
1508 =item C<Parrot_set_config_hash_internal>
1510 =item C<Parrot_set_context_threshold>
1512 =item C<Parrot_set_debug>
1514 =item C<Parrot_set_executable_name>
1516 =item C<Parrot_set_flag>
1518 =item C<Parrot_set_global>
1520 =item C<Parrot_set_intreg>
1522 =item C<Parrot_set_numreg>
1524 =item C<Parrot_set_pmcreg>
1526 =item C<Parrot_set_run_core>
1528 =item C<Parrot_set_strreg>
1530 =item C<Parrot_set_trace>
1532 =item C<Parrot_setwarnings>
1534 =item C<Parrot_shared_gc_block>
1536 =item C<Parrot_shared_gc_unblock>
1538 =item C<Parrot_sleep_on_event>
1540 =item C<Parrot_snprintf>
1542 =item C<Parrot_sprintf_c>
1544 =item C<Parrot_sprintf_s>
1546 =item C<Parrot_srand>
1548 =item C<Parrot_store_global_n>
1550 =item C<Parrot_store_global_s>
1552 =item C<Parrot_store_sub_in_namespace>
1554 =item C<Parrot_str_append>
1556 =item C<Parrot_str_boolean>
1558 =item C<Parrot_str_byte_length>
1560 =item C<Parrot_str_change_charset>
1562 =item C<Parrot_str_change_encoding>
1564 =item C<Parrot_str_chopn>
1566 =item C<Parrot_str_chopn_inplace>
1568 =item C<Parrot_str_compare>
1570 =item C<Parrot_str_compose>
1572 =item C<Parrot_str_concat>
1574 =item C<Parrot_str_copy>
1576 =item C<Parrot_str_downcase>
1578 =item C<Parrot_str_downcase_inplace>
1580 =item C<Parrot_str_equal>
1582 =item C<Parrot_str_escape>
1584 =item C<Parrot_str_escape_truncate>
1586 =item C<Parrot_str_find_cclass>
1588 =item C<Parrot_str_find_index>
1590 =item C<Parrot_str_find_not_cclass>
1592 =item C<Parrot_str_finish>
1594 =item C<Parrot_str_format_data>
1596 =item C<Parrot_str_free_cstring>
1598 =item C<Parrot_str_from_int>
1600 =item C<Parrot_str_from_num>
1602 =item C<Parrot_str_indexed>
1604 =item C<Parrot_string_cstring>
1606 =item C<Parrot_str_init>
1608 =item C<Parrot_str_is_cclass>
1610 =item C<Parrot_str_join>
1612 =item C<Parrot_str_length>
1614 =item C<Parrot_str_new>
1616 =item C<Parrot_str_new_constant>
1618 =item C<Parrot_str_new_COW>
1620 =item C<Parrot_str_new_init>
1622 =item C<Parrot_str_new_noinit>
1624 =item C<Parrot_str_not_equal>
1626 =item C<Parrot_str_pin>
1628 =item C<Parrot_str_repeat>
1630 =item C<Parrot_str_replace>
1632 =item C<Parrot_str_resize>
1634 =item C<Parrot_str_reuse_COW>
1636 =item C<Parrot_str_set>
1638 =item C<Parrot_str_split>
1640 =item C<Parrot_str_substr>
1642 =item C<Parrot_str_titlecase>
1644 =item C<Parrot_str_titlecase_inplace>
1646 =item C<Parrot_str_to_cstring>
1648 =item C<Parrot_str_to_hashval>
1650 =item C<Parrot_str_to_int>
1652 =item C<Parrot_str_to_num>
1654 =item C<Parrot_str_unescape>
1656 =item C<Parrot_str_unpin>
1658 =item C<Parrot_str_upcase>
1660 =item C<Parrot_str_upcase_inplace>
1662 =item C<Parrot_str_write_COW>
1664 =item C<Parrot_sub_new_from_c_func>
1666 =item C<Parrot_test_debug>
1668 =item C<Parrot_test_flag>
1670 =item C<Parrot_test_trace>
1672 =item C<Parrot_thaw>
1674 =item C<Parrot_thaw_constants>
1676 =item C<Parrot_uint_rand>
1678 =item C<Parrot_unblock_GC_mark>
1680 =item C<Parrot_unblock_GC_sweep>
1682 =item C<Parrot_unregister_pmc>
1684 =item C<Parrot_vfprintf>
1686 =item C<Parrot_vsnprintf>
1688 =item C<Parrot_vsprintf_c>
1690 =item C<Parrot_vsprintf_s>
1692 =item C<Parrot_warn>
1694 =item C<Parrot_pmc_is_null>
1696 =item C<pmc_new>
1698 =item C<pmc_type>
1700 =item C<PObj_custom_destroy_SET>
1702 =item C<PObj_custom_mark_SET>
1704 =item C<string_capacity>
1706 =item C<string_chr>
1708 =item C<string_make>
1710 =item C<string_make_from_charset>
1712 =item C<string_max_bytes>
1714 =item C<string_ord>
1716 =item C<string_primary_encoding_for_representation>
1718 =item C<string_rep_compatible>
1720 =item C<string_to_cstring_nullable>
1722 =back
1724 =head1 SEE ALSO
1726 F<src/main.c> and F<t/src/*.t> for Parrot's use of the embedding system.
1728 L<http://pkgconfig.freedesktop.org/wiki/> A pkg-config page
1730 =cut