Skip to content

Commit

Permalink
Renamed global_environment to top_level_environment
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardalee committed Jun 26, 2023
1 parent 7d83242 commit 2769535
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion python/include/pythontarget.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern PyObject *globalPythonModule;
extern PyObject *globalPythonModuleDict;
extern PyObject* global_pickler;
extern environment_t* global_environment;
extern environment_t* top_level_environment;

//////////////////////////////////////////////////////////////
///////////// schedule Functions (to schedule an action)
Expand Down
2 changes: 1 addition & 1 deletion python/lib/python_tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ PyObject* py_lf_tag(PyObject *self, PyObject *args) {
if (t == NULL) {
return NULL;
}
t->tag = lf_tag(global_environment);
t->tag = lf_tag(top_level_environment);
return (PyObject *) t;
}

Expand Down
4 changes: 2 additions & 2 deletions python/lib/python_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* Return the logical time in nanoseconds.
*/
PyObject* py_lf_time_logical(PyObject *self, PyObject *args) {
return PyLong_FromLongLong(lf_time_logical(global_environment));
return PyLong_FromLongLong(lf_time_logical(top_level_environment));
}

/**
* Return the elapsed logical time in nanoseconds.
*/
PyObject* py_lf_time_logical_elapsed(PyObject *self, PyObject *args) {
return PyLong_FromLongLong(lf_time_logical_elapsed(global_environment));
return PyLong_FromLongLong(lf_time_logical_elapsed(top_level_environment));
}

/**
Expand Down
6 changes: 3 additions & 3 deletions python/lib/pythontarget.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ PyObject *globalPythonModuleDict = NULL;
// Import pickle to enable native serialization
PyObject* global_pickler = NULL;

environment_t* global_environment = NULL;
environment_t* top_level_environment = NULL;


//////////// schedule Function(s) /////////////
Expand Down Expand Up @@ -158,7 +158,7 @@ void _lf_request_stop(environment_t* env);
* Stop execution at the conclusion of the current logical time.
*/
PyObject* py_request_stop(PyObject *self, PyObject *args) {
_lf_request_stop(global_environment);
_lf_request_stop(top_level_environment);

Py_INCREF(Py_None);
return Py_None;
Expand Down Expand Up @@ -264,7 +264,7 @@ PyObject* py_main(PyObject* self, PyObject* py_args) {
}

// Store a reference to the top-level environment
int num_environments = _lf_get_environments(&global_environment);
int num_environments = _lf_get_environments(&top_level_environment);
lf_assert(num_environments == 1, "Python target only supports programs with a single environment/enclave");

LF_PRINT_DEBUG("Initialized the Python interpreter.");
Expand Down

0 comments on commit 2769535

Please sign in to comment.