mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-21 18:06:50 +00:00
python: do not use libc internal symbol in test
This commit is contained in:
parent
6775b4077d
commit
7eb6ef226f
@ -49,9 +49,6 @@ int main()
|
|||||||
{
|
{
|
||||||
using namespace Genode;
|
using namespace Genode;
|
||||||
|
|
||||||
FILE fp;
|
|
||||||
::memset(&fp, 0x0, sizeof(fp));
|
|
||||||
|
|
||||||
char *name;
|
char *name;
|
||||||
if (!process_config(&name)) {
|
if (!process_config(&name)) {
|
||||||
Genode::error("no script found");
|
Genode::error("no script found");
|
||||||
@ -59,10 +56,8 @@ int main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
Genode::log("Found script: ", Genode::Cstring(name));
|
Genode::log("Found script: ", Genode::Cstring(name));
|
||||||
fp._file = open(name, 0, 0);
|
FILE* fp = fopen(name, "r");
|
||||||
fp._read = __sread;
|
//fp._flags = __SRD;
|
||||||
fp._cookie = &fp;
|
|
||||||
fp._flags = __SRD;
|
|
||||||
Py_SetProgramName(name);
|
Py_SetProgramName(name);
|
||||||
//don't need the 'site' module
|
//don't need the 'site' module
|
||||||
Py_NoSiteFlag = 1;
|
Py_NoSiteFlag = 1;
|
||||||
@ -71,7 +66,7 @@ int main()
|
|||||||
Py_Initialize();
|
Py_Initialize();
|
||||||
|
|
||||||
Genode::log("Starting python ...");
|
Genode::log("Starting python ...");
|
||||||
PyRun_SimpleFile(&fp, name);
|
PyRun_SimpleFile(fp, name);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user