tagged release 0.7.1
[parrot.git] / include / parrot / library.h
bloba82b7c433240ce5c24f58b4a851743d9559876f7
1 /* library.h
2 * Copyright (C) 2004, The Perl Foundation.
3 * SVN Info
4 * $Id$
5 * Overview:
6 * Contains accessor functions for the _parrotlib bytecode interface
7 * Data Structure and Algorithms:
8 * History:
9 * Notes:
10 * References:
13 #ifndef PARROT_LIBRARY_H_GUARD
14 #define PARROT_LIBRARY_H_GUARD
16 typedef enum {
17 PARROT_RUNTIME_FT_LIBRARY = 0x0001,
18 PARROT_RUNTIME_FT_INCLUDE = 0x0002,
19 PARROT_RUNTIME_FT_DYNEXT = 0x0004,
20 PARROT_RUNTIME_FT_PBC = 0x0010,
21 PARROT_RUNTIME_FT_PASM = 0x0100,
22 PARROT_RUNTIME_FT_PIR = 0x0200,
23 PARROT_RUNTIME_FT_PAST = 0x0400,
24 PARROT_RUNTIME_FT_SOURCE = 0x0F00
25 } enum_runtime_ft;
27 typedef enum {
28 PARROT_LIB_PATH_INCLUDE, /* .include "foo" */
29 PARROT_LIB_PATH_LIBRARY, /* load_bytecode "bar" */
30 PARROT_LIB_PATH_DYNEXT, /* loadlib "baz" */
31 PARROT_LIB_DYN_EXTS, /* ".so", ".dylib" .. */
32 /* must be last: */
33 PARROT_LIB_PATH_SIZE
34 } enum_lib_paths;
36 /* HEADERIZER BEGIN: src/library.c */
37 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
39 PARROT_API
40 void Parrot_add_library_path(PARROT_INTERP,
41 ARGIN(const char *path),
42 enum_lib_paths which)
43 __attribute__nonnull__(1)
44 __attribute__nonnull__(2);
46 PARROT_API
47 PARROT_MALLOC
48 PARROT_CANNOT_RETURN_NULL
49 char* Parrot_get_runtime_prefix(PARROT_INTERP)
50 __attribute__nonnull__(1);
52 PARROT_API
53 PARROT_WARN_UNUSED_RESULT
54 PARROT_CAN_RETURN_NULL
55 PARROT_MALLOC
56 char* Parrot_locate_runtime_file(PARROT_INTERP,
57 ARGIN(const char *file_name),
58 enum_runtime_ft type)
59 __attribute__nonnull__(1)
60 __attribute__nonnull__(2);
62 PARROT_API
63 PARROT_WARN_UNUSED_RESULT
64 PARROT_CAN_RETURN_NULL
65 STRING* Parrot_locate_runtime_file_str(PARROT_INTERP,
66 ARGMOD(STRING *file),
67 enum_runtime_ft type)
68 __attribute__nonnull__(1)
69 __attribute__nonnull__(2)
70 FUNC_MODIFIES(*file);
72 void parrot_init_library_paths(PARROT_INTERP)
73 __attribute__nonnull__(1);
75 PARROT_IGNORABLE_RESULT
76 PARROT_CANNOT_RETURN_NULL
77 STRING * parrot_split_path_ext(PARROT_INTERP,
78 ARGMOD(STRING *in),
79 ARGOUT(STRING **wo_ext),
80 ARGOUT(STRING **ext))
81 __attribute__nonnull__(1)
82 __attribute__nonnull__(2)
83 __attribute__nonnull__(3)
84 __attribute__nonnull__(4)
85 FUNC_MODIFIES(*in)
86 FUNC_MODIFIES(*wo_ext)
87 FUNC_MODIFIES(*ext);
89 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
90 /* HEADERIZER END: src/library.c */
92 #endif /* PARROT_LIBRARY_H_GUARD */
95 * Local variables:
96 * c-file-style: "parrot"
97 * End:
98 * vim: expandtab shiftwidth=4: