Skip to content

Commit 4ccbb21

Browse files
committed
merged master into executor_rewrite branch, correctly
1 parent 6b75055 commit 4ccbb21

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

executor/Makefile

-4
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ LIBS=-pthread -lrt -Wall -export-dynamic -fPIC
55
SRCS = executor.c gamestate_filter.c ../logger/logger.c ../runtime_util/runtime_util.c ../shm_wrapper/shm_wrapper.c
66

77
# Python compilation definitions
8-
<<<<<<< HEAD
9-
PY_VER = python3.11
10-
=======
118
PY_VER = python3.12
12-
>>>>>>> c02bcc59add84236ca74b9652ff8e2528b2c1394
139
PY_LIB = -l$(PY_VER)
1410
CFLAGS = $(shell $(PY_VER)-config --cflags)
1511

executor/executor.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#define PY_SSIZE_T_CLEAN
22
#include <arpa/inet.h> //for networking
33
#include <pthread.h> //for POSIX threads
4-
<<<<<<< HEAD
5-
#include <python3.11/Python.h> // For Python's C API
6-
=======
74
#include <python3.12/Python.h> // For Python's C API
8-
>>>>>>> c02bcc59add84236ca74b9652ff8e2528b2c1394
95
#include <signal.h> // Used to handle SIGTERM, SIGINT, SIGKILL
106
#include <stdint.h> //for standard int types
117
#include <stdio.h> //for i/o
@@ -205,7 +201,7 @@ static uint8_t run_py_function(const char* func_name, struct timespec* timeout,
205201
// retrieve the Python function from the student code
206202
PyObject* pFunc = PyObject_GetAttrString(pModule, func_name);
207203
PyObject* pValue = NULL;
208-
log_printf(ERROR, "%s",func_name);
204+
log_printf(ERROR, "%s", func_name);
209205
if (pFunc && PyCallable_Check(pFunc)) {
210206
pValue = PyObject_CallObject(pFunc, args); // make call to Python function
211207

@@ -321,9 +317,9 @@ static pid_t start_mode_subprocess(char* student_code) {
321317

322318
char* mode_str = get_mode_str(mode);
323319
int err = run_py_function(mode_str, &main_interval, NULL, NULL); // Run main function
324-
if (err) {
325-
log_printf(WARN, "NEED TO EDIT STATEMENT"); // "Problem Child"
326-
}
320+
if (err) {
321+
log_printf(WARN, "NEED TO EDIT STATEMENT"); // "Problem Child"
322+
}
327323
exit(0);
328324
return pid; // Never reach this statement due to exit, needed to fix compiler warning
329325
} else {

0 commit comments

Comments
 (0)