py_exec method

bool py_exec(
  1. Pointer<Char> source,
  2. Pointer<Char> filename,
  3. int mode,
  4. py_Ref module,
)

Run a source string. @param source source string. @param filename filename (for error messages). @param mode compile mode. Use EXEC_MODE for statements EVAL_MODE for expressions. @param module target module. Use NULL for the main module. @return true if the execution is successful or false if an exception is raised.

Implementation

bool py_exec(
  ffi.Pointer<ffi.Char> source,
  ffi.Pointer<ffi.Char> filename,
  int mode,
  py_Ref module,
) {
  return _py_exec(
    source,
    filename,
    mode,
    module,
  );
}