Skip to content

Commit

Permalink
Update Python.hx
Browse files Browse the repository at this point in the history
  • Loading branch information
Vortex2Oblivion authored Jan 8, 2024
1 parent 614a7ee commit c2b2bc1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions hxpy/Python.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ package hxpy;

@:buildXml("<include name='${haxelib:hxpy}/hxpy/Build.xml' />")
@:include("Python.h")
@:cppFileCode('
#include <string>
#include <iostream>
using std::string;
using namespace std;
')
@:keep
/**
* Class that contains most of the variables and functions in hxpy!
Expand Down Expand Up @@ -68,10 +74,6 @@ extern class Python
*/
public static inline function runSimpleFile(filetoParse:String):Void {
untyped __cpp__('
#include <string>
#include <iostream>
using std::string;
using namespace std;
PyObject *obj = Py_BuildValue("s", filetoParse.c_str());
FILE* PScriptFile = _Py_fopen_obj(obj, "r+");
if(PScriptFile){
Expand Down

0 comments on commit c2b2bc1

Please sign in to comment.