Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 261 lines (228 sloc) 8.202 kB
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
1 #include "parrot/parrot.h"
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
2 #include "parrot/embed.h"
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
3 #include "parrot/api.h"
1b6d1ce @Whiteknight start breaking up the embedding stuff into multiple files. Add embed_…
Whiteknight authored
4 #include "embed_private.h"
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
5
3f8ed92 @Whiteknight fix some file references and run headerizer to see my work so far
Whiteknight authored
6 /* HEADERIZER HFILE: include/parrot/api.h */
7
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
8 PARROT_API
9 PARROT_CANNOT_RETURN_NULL
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
10 Parrot_Int
11 Parrot_api_make_interpreter(ARGIN_NULLOK(PMC *parent), Parrot_Int flags, ARGIN_NULLOK(Parrot_Init_Args *args), ARGOUT(PMC **interp))
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
12 {
f2252b4 @Whiteknight remove the two-stage initialization dance. We can now initialize an i…
Whiteknight authored
13 ASSERT_ARGS(Parrot_api_make_interpreter)
4a128d5 @Whiteknight lots of little changes
Whiteknight authored
14 int alt_stacktop;
c1ab56e More fixes, almost there
Mariano Wahlmann authored
15 Parrot_Interp interp_raw;
f2252b4 @Whiteknight remove the two-stage initialization dance. We can now initialize an i…
Whiteknight authored
16 void *stacktop_ptr = &alt_stacktop;
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
17 PMC * iglobals;
3ea891c First round of syntax error fixes
Mariano Wahlmann authored
18
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
19 Parrot_set_config_hash();
f2252b4 @Whiteknight remove the two-stage initialization dance. We can now initialize an i…
Whiteknight authored
20 {
c1ab56e More fixes, almost there
Mariano Wahlmann authored
21 const Parrot_Interp parent_raw = PMC_IS_NULL(parent) ? NULL : GET_RAW_INTERP(parent);
3ea891c First round of syntax error fixes
Mariano Wahlmann authored
22 interp_raw = allocate_interpreter(parent_raw, flags);
f2252b4 @Whiteknight remove the two-stage initialization dance. We can now initialize an i…
Whiteknight authored
23 if (args) {
3ea891c First round of syntax error fixes
Mariano Wahlmann authored
24 if (args->stacktop)
f2252b4 @Whiteknight remove the two-stage initialization dance. We can now initialize an i…
Whiteknight authored
25 stacktop_ptr = args->stacktop;
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
26 if (args->gc_system)
27 Parrot_gc_set_system_type(interp_raw, args->gc_system);
f2252b4 @Whiteknight remove the two-stage initialization dance. We can now initialize an i…
Whiteknight authored
28 if (args->gc_threshold)
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
29 interp_raw->gc_threshold = args->gc_threshold;
f2252b4 @Whiteknight remove the two-stage initialization dance. We can now initialize an i…
Whiteknight authored
30 if (args->hash_seed)
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
31 interp_raw->hash_seed = args->hash_seed;
f2252b4 @Whiteknight remove the two-stage initialization dance. We can now initialize an i…
Whiteknight authored
32 }
33 }
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
34 initialize_interpreter(interp_raw, stacktop_ptr);
35 iglobals = interp_raw->iglobals;
c1ab56e More fixes, almost there
Mariano Wahlmann authored
36 *interp = VTABLE_get_pmc_keyed_int(interp_raw, parent_raw->iglobals, (Parrot_Int)IGLOBALS_INTERPRETER);
f2252b4 @Whiteknight remove the two-stage initialization dance. We can now initialize an i…
Whiteknight authored
37 return !PMC_IS_NULL(*interp);
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
38 }
39
40 PARROT_API
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
41 Parrot_Int
3ea891c First round of syntax error fixes
Mariano Wahlmann authored
42 Parrot_api_set_runcore(ARGIN(PMC *interp_pmc), Parrot_Run_core_t core, Parrot_UInt trace)
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
43 {
44 ASSERT_ARGS(Parrot_api_set_runcore)
3ea891c First round of syntax error fixes
Mariano Wahlmann authored
45 EMBED_API_CALLIN(interp_pmc, interp)
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
46 if (trace)
47 core = PARROT_SLOW_CORE;
48 Parrot_set_trace(interp, (Parrot_trace_flags)trace);
49 Parrot_set_run_core(interp, core);
50 EMBED_API_CALLOUT(interp_pmc, interp)
51 }
52
53 PARROT_API
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
54 Parrot_Int
55 Parrot_api_debug_flag(ARGMOD(PMC *interp_pmc), Parrot_Int flags, Parrot_Int set)
f68bf56 @Whiteknight add Parrot_api_flag and Parrot_api_debug_flag. Use these in main.c in…
Whiteknight authored
56 {
57 ASSERT_ARGS(Parrot_api_debug_flag)
c1ab56e More fixes, almost there
Mariano Wahlmann authored
58 EMBED_API_CALLIN(interp_pmc, interp)
f68bf56 @Whiteknight add Parrot_api_flag and Parrot_api_debug_flag. Use these in main.c in…
Whiteknight authored
59 if (set)
60 interp->debug_flags |= flags;
61 else
62 interp->debug_flags &= ~flags;
63 EMBED_API_CALLOUT(interp_pmc, interp);
64 }
65
66 PARROT_API
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
67 Parrot_Int
68 Parrot_api_flag(ARGMOD(PMC *interp_pmc), Parrot_Int flags, Parrot_Int set)
f68bf56 @Whiteknight add Parrot_api_flag and Parrot_api_debug_flag. Use these in main.c in…
Whiteknight authored
69 {
70 ASSERT_ARGS(Parrot_api_flag)
c1ab56e More fixes, almost there
Mariano Wahlmann authored
71 EMBED_API_CALLIN(interp_pmc, interp)
f68bf56 @Whiteknight add Parrot_api_flag and Parrot_api_debug_flag. Use these in main.c in…
Whiteknight authored
72 if (set) {
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
73 Interp_flags_SET(interp, flags);
74 if (flags & (PARROT_BOUNDS_FLAG | PARROT_PROFILE_FLAG))
f68bf56 @Whiteknight add Parrot_api_flag and Parrot_api_debug_flag. Use these in main.c in…
Whiteknight authored
75 Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, "slow"));
76 }
77 else
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
78 Interp_flags_CLEAR(interp, flags);
f68bf56 @Whiteknight add Parrot_api_flag and Parrot_api_debug_flag. Use these in main.c in…
Whiteknight authored
79 EMBED_API_CALLOUT(interp_pmc, interp);
80 }
81
82 PARROT_API
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
83 Parrot_Int
f68bf56 @Whiteknight add Parrot_api_flag and Parrot_api_debug_flag. Use these in main.c in…
Whiteknight authored
84 Parrot_api_set_executable_name(ARGMOD(PMC *interp_pmc), ARGIN(const char * name))
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
85 {
86 ASSERT_ARGS(Parrot_api_set_executable_name)
c1ab56e More fixes, almost there
Mariano Wahlmann authored
87 EMBED_API_CALLIN(interp_pmc, interp)
1a692e9 @Whiteknight _set_executable_name takes a C string instead of a Parrot string, for…
Whiteknight authored
88 STRING * const name_str = Parrot_str_new(interp, name, 0);
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
89 PMC * const name_pmc = Parrot_pmc_new(interp, enum_class_String);
1a692e9 @Whiteknight _set_executable_name takes a C string instead of a Parrot string, for…
Whiteknight authored
90 VTABLE_set_string_native(interp, name_pmc, name_str);
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
91 VTABLE_set_pmc_keyed_int(interp, interp->iglobals, IGLOBALS_EXECUTABLE,
92 name_pmc);
4a128d5 @Whiteknight lots of little changes
Whiteknight authored
93 EMBED_API_CALLOUT(interp_pmc, interp);
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
94 }
95
96 PARROT_API
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
97 Parrot_Int
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
98 Parrot_api_destroy_interpreter(ARGIN(PMC *interp_pmc))
99 {
100 ASSERT_ARGS(Parrot_api_destroy_interpreter)
c1ab56e More fixes, almost there
Mariano Wahlmann authored
101 EMBED_API_CALLIN(interp_pmc, interp)
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
102 Parrot_destroy(interp);
1a692e9 @Whiteknight _set_executable_name takes a C string instead of a Parrot string, for…
Whiteknight authored
103 Parrot_exit(interp, 0);
4a128d5 @Whiteknight lots of little changes
Whiteknight authored
104 EMBED_API_CALLOUT(interp_pmc, interp);
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
105 }
106
107 /*
108
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
109 =item C<PARROT_API Parrot_Int Parrot_api_load_bytecode_file(PMC *interp_pmc,
110 const char *filename, PMC **pbc)>
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
111
d4e8708 @Whiteknight add a failure macro for when an API call fails. Implement a few more …
Whiteknight authored
112 Load a bytecode file and return a bytecode PMC.
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
113
114 =cut
115
116 */
117
118 PARROT_API
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
119 Parrot_Int
d4e8708 @Whiteknight add a failure macro for when an API call fails. Implement a few more …
Whiteknight authored
120 Parrot_api_load_bytecode_file(ARGMOD(PMC *interp_pmc), ARGIN(const char *filename), ARGOUT(PMC **pbc))
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
121 {
122 ASSERT_ARGS(Parrot_api_load_bytecode_file)
c1ab56e More fixes, almost there
Mariano Wahlmann authored
123 EMBED_API_CALLIN(interp_pmc, interp)
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
124 PackFile * const pf = Parrot_pbc_read(interp, filename, 0);
125 if (!pf)
d4e8708 @Whiteknight add a failure macro for when an API call fails. Implement a few more …
Whiteknight authored
126 EMBED_API_FAILURE(interp_pmc, interp);
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
127 *pbc = Parrot_pmc_new(interp, enum_class_Packfile);
d4e8708 @Whiteknight add a failure macro for when an API call fails. Implement a few more …
Whiteknight authored
128 VTABLE_set_pointer(interp, *pbc, pf);
c1ab56e More fixes, almost there
Mariano Wahlmann authored
129 EMBED_API_CALLOUT(interp_pmc, interp)
d4e8708 @Whiteknight add a failure macro for when an API call fails. Implement a few more …
Whiteknight authored
130 }
131
132 PARROT_API
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
133 Parrot_Int
d4e8708 @Whiteknight add a failure macro for when an API call fails. Implement a few more …
Whiteknight authored
134 Parrot_api_run_bytecode(ARGMOD(PMC *interp_pmc), ARGIN(PMC *pbc), ARGIN(PMC *mainargs))
135 {
136 ASSERT_ARGS(Parrot_api_run_bytecode)
c1ab56e More fixes, almost there
Mariano Wahlmann authored
137 EMBED_API_CALLIN(interp_pmc, interp)
138 PackFile * const pf = (PackFile *)VTABLE_get_pointer(interp, pbc);
d4e8708 @Whiteknight add a failure macro for when an API call fails. Implement a few more …
Whiteknight authored
139 if (!pf)
140 EMBED_API_FAILURE(interp_pmc, interp);
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
141 Parrot_pbc_load(interp, pf);
d4e8708 @Whiteknight add a failure macro for when an API call fails. Implement a few more …
Whiteknight authored
142 PackFile_fixup_subs(interp, PBC_IMMEDIATE, NULL);
143 PackFile_fixup_subs(interp, PBC_POSTCOMP, NULL);
144 PackFile_fixup_subs(interp, PBC_MAIN, NULL);
c1ab56e More fixes, almost there
Mariano Wahlmann authored
145 EMBED_API_CALLOUT(interp_pmc, interp)
687438e @Whiteknight add in the prototype embedding API functions I've been playing with
Whiteknight authored
146 }
4a128d5 @Whiteknight lots of little changes
Whiteknight authored
147
d4e8708 @Whiteknight add a failure macro for when an API call fails. Implement a few more …
Whiteknight authored
148 PARROT_API
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
149 Parrot_Int
150 Parrot_api_build_argv_array(ARGMOD(PMC *interp_pmc), Parrot_Int argc, ARGIN(char **argv), ARGOUT(PMC **args))
d4e8708 @Whiteknight add a failure macro for when an API call fails. Implement a few more …
Whiteknight authored
151 {
152 ASSERT_ARGS(Parrot_api_build_argv_array)
c1ab56e More fixes, almost there
Mariano Wahlmann authored
153 EMBED_API_CALLIN(interp_pmc, interp)
d4e8708 @Whiteknight add a failure macro for when an API call fails. Implement a few more …
Whiteknight authored
154 PMC * const userargv = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
155 Parrot_Int i;
d4e8708 @Whiteknight add a failure macro for when an API call fails. Implement a few more …
Whiteknight authored
156
157 for (i = 0; i < argc; ++i) {
158 /* Run through argv, adding everything to the array */
159 STRING * const arg = Parrot_str_new_init(interp, argv[i], strlen(argv[i]),
160 Parrot_utf8_encoding_ptr, PObj_external_FLAG);
161 VTABLE_push_string(interp, userargv, arg);
162 }
163 *args = userargv;
c1ab56e More fixes, almost there
Mariano Wahlmann authored
164 EMBED_API_CALLOUT(interp_pmc, interp)
d4e8708 @Whiteknight add a failure macro for when an API call fails. Implement a few more …
Whiteknight authored
165 }
9d25cd4 @Whiteknight change the imcc_run function to return a PackFile PMC so we can use i…
Whiteknight authored
166
167 PARROT_API
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
168 Parrot_Int
169 Parrot_api_set_warnings(ARGMOD(PMC *interp_pmc), Parrot_Int flags)
9d25cd4 @Whiteknight change the imcc_run function to return a PackFile PMC so we can use i…
Whiteknight authored
170 {
171 ASSERT_ARGS(Parrot_api_set_warnings)
c1ab56e More fixes, almost there
Mariano Wahlmann authored
172 EMBED_API_CALLIN(interp_pmc, interp)
9d25cd4 @Whiteknight change the imcc_run function to return a PackFile PMC so we can use i…
Whiteknight authored
173 /* Activates the given warnings. (Macro from warnings.h.) */
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
174 PARROT_WARNINGS_on(interp, flags);
c1ab56e More fixes, almost there
Mariano Wahlmann authored
175 EMBED_API_CALLOUT(interp_pmc, interp)
9d25cd4 @Whiteknight change the imcc_run function to return a PackFile PMC so we can use i…
Whiteknight authored
176 }
177
178 PARROT_API
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
179 Parrot_Int
9d25cd4 @Whiteknight change the imcc_run function to return a PackFile PMC so we can use i…
Whiteknight authored
180 Parrot_api_set_output_file(ARGMOD(PMC *interp_pmc), ARGIN(const char * filename))
181 {
182 ASSERT_ARGS(Parrot_api_set_output_file)
c1ab56e More fixes, almost there
Mariano Wahlmann authored
183 EMBED_API_CALLIN(interp_pmc, interp)
9d25cd4 @Whiteknight change the imcc_run function to return a PackFile PMC so we can use i…
Whiteknight authored
184 if (!filename && !interp->output_file)
185 interp->output_file = "-";
186 else
187 interp->output_file = filename;
c1ab56e More fixes, almost there
Mariano Wahlmann authored
188 EMBED_API_CALLOUT(interp_pmc, interp)
9d25cd4 @Whiteknight change the imcc_run function to return a PackFile PMC so we can use i…
Whiteknight authored
189 }
190
191 PARROT_API
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
192 Parrot_Int
9d25cd4 @Whiteknight change the imcc_run function to return a PackFile PMC so we can use i…
Whiteknight authored
193 Parrt_api_add_library_search_path(ARGMOD(PMC *interp_pmc), ARGIN(const char *path))
194 {
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
195 //ASSERT_ARGS(Parrot_api_add_library_search_path)
c1ab56e More fixes, almost there
Mariano Wahlmann authored
196 EMBED_API_CALLIN(interp_pmc, interp)
9d25cd4 @Whiteknight change the imcc_run function to return a PackFile PMC so we can use i…
Whiteknight authored
197 Parrot_lib_add_path_from_cstring(interp, path, PARROT_LIB_PATH_LIBRARY);
c1ab56e More fixes, almost there
Mariano Wahlmann authored
198 EMBED_API_CALLOUT(interp_pmc, interp)
9d25cd4 @Whiteknight change the imcc_run function to return a PackFile PMC so we can use i…
Whiteknight authored
199 }
200
201 PARROT_API
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
202 Parrot_Int
9d25cd4 @Whiteknight change the imcc_run function to return a PackFile PMC so we can use i…
Whiteknight authored
203 Parrt_api_add_include_search_path(ARGMOD(PMC *interp_pmc), ARGIN(const char *path))
204 {
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
205 //ASSERT_ARGS(Parrot_api_add_include_search_path)
c1ab56e More fixes, almost there
Mariano Wahlmann authored
206 EMBED_API_CALLIN(interp_pmc, interp)
9d25cd4 @Whiteknight change the imcc_run function to return a PackFile PMC so we can use i…
Whiteknight authored
207 Parrot_lib_add_path_from_cstring(interp, path, PARROT_LIB_PATH_INCLUDE);
c1ab56e More fixes, almost there
Mariano Wahlmann authored
208 EMBED_API_CALLOUT(interp_pmc, interp)
9d25cd4 @Whiteknight change the imcc_run function to return a PackFile PMC so we can use i…
Whiteknight authored
209 }
210
211 PARROT_API
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
212 Parrot_Int
9d25cd4 @Whiteknight change the imcc_run function to return a PackFile PMC so we can use i…
Whiteknight authored
213 Parrt_api_add_dynext_search_path(ARGMOD(PMC *interp_pmc), ARGIN(const char *path))
214 {
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
215 //ASSERT_ARGS(Parrot_api_add_dynext_search_path)
c1ab56e More fixes, almost there
Mariano Wahlmann authored
216 EMBED_API_CALLIN(interp_pmc, interp)
9d25cd4 @Whiteknight change the imcc_run function to return a PackFile PMC so we can use i…
Whiteknight authored
217 Parrot_lib_add_path_from_cstring(interp, path, PARROT_LIB_PATH_DYNEXT);
c1ab56e More fixes, almost there
Mariano Wahlmann authored
218 EMBED_API_CALLOUT(interp_pmc, interp)
9d25cd4 @Whiteknight change the imcc_run function to return a PackFile PMC so we can use i…
Whiteknight authored
219 }
3259cda First cut of Parrot_api_set_stdhandles API function
Mariano Wahlmann authored
220
221 /*
222
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
223 =item C<PARROT_API Parrot_Int Parrot_api_set_stdhandles(PMC *interp_pmc,
224 Parrot_Int stdin, Parrot_Int stdout, Parrot_Int stderr)>
3259cda First cut of Parrot_api_set_stdhandles API function
Mariano Wahlmann authored
225
226 Set the std file descriptors for the embedded interpreter. Any file descriptor
227 passed as argument and set to C<PIO_INVALID_HANDLE> is ignored.
228
229 =cut
230
231 */
232
233 PARROT_API
e98ef02 @Whiteknight lots of fixes. We still don't build completely, but we are much close…
Whiteknight authored
234 Parrot_Int
235 Parrot_api_set_stdhandles(ARGIN(PMC *interp_pmc), Parrot_Int stdin, Parrot_Int stdout, Parrot_Int stderr)
3259cda First cut of Parrot_api_set_stdhandles API function
Mariano Wahlmann authored
236 {
237 ASSERT_ARGS(Parrot_api_set_stdhandles)
c1ab56e More fixes, almost there
Mariano Wahlmann authored
238 EMBED_API_CALLIN(interp_pmc, interp)
3ea891c First round of syntax error fixes
Mariano Wahlmann authored
239 void *dummy;
3259cda First cut of Parrot_api_set_stdhandles API function
Mariano Wahlmann authored
240
241 if(PIO_INVALID_HANDLE != (PIOHANDLE)stdin) {
242 PMC * const pmc = Parrot_pmc_new(interp, enum_class_FileHandle);
bce0e57 Fix typo in stdin branch
Mariano Wahlmann authored
243 Parrot_io_set_os_handle(interp, pmc, (PIOHANDLE)stdin);
3ea891c First round of syntax error fixes
Mariano Wahlmann authored
244 dummy = (void *)Parrot_io_stdhandle(interp,PIO_STDIN_FILENO,pmc);
3259cda First cut of Parrot_api_set_stdhandles API function
Mariano Wahlmann authored
245 }
246
247 if(PIO_INVALID_HANDLE != (PIOHANDLE)stdout) {
248 PMC * const pmc = Parrot_pmc_new(interp, enum_class_FileHandle);
3e24c1d Fix typos on stdout & stderr branches
Mariano Wahlmann authored
249 Parrot_io_set_os_handle(interp, pmc, (PIOHANDLE)stdout);
3ea891c First round of syntax error fixes
Mariano Wahlmann authored
250 dummy = (void *)Parrot_io_stdhandle(interp,PIO_STDOUT_FILENO,pmc);
3259cda First cut of Parrot_api_set_stdhandles API function
Mariano Wahlmann authored
251 }
252
253 if(PIO_INVALID_HANDLE != (PIOHANDLE)stderr) {
254 PMC * const pmc = Parrot_pmc_new(interp, enum_class_FileHandle);
3e24c1d Fix typos on stdout & stderr branches
Mariano Wahlmann authored
255 Parrot_io_set_os_handle(interp, pmc, (PIOHANDLE)stderr);
3ea891c First round of syntax error fixes
Mariano Wahlmann authored
256 dummy = (void *)Parrot_io_stdhandle(interp,PIO_STDERR_FILENO,pmc);
3259cda First cut of Parrot_api_set_stdhandles API function
Mariano Wahlmann authored
257 }
258
c1ab56e More fixes, almost there
Mariano Wahlmann authored
259 EMBED_API_CALLOUT(interp_pmc, interp)
3259cda First cut of Parrot_api_set_stdhandles API function
Mariano Wahlmann authored
260 }
Something went wrong with that request. Please try again.