|
1 | 1 | #define PY_SSIZE_T_CLEAN
|
2 | 2 | #include <arpa/inet.h> //for networking
|
3 | 3 | #include <pthread.h> //for POSIX threads
|
4 |
| -<<<<<<< HEAD |
5 |
| -#include <python3.11/Python.h> // For Python's C API |
6 |
| -======= |
7 | 4 | #include <python3.12/Python.h> // For Python's C API
|
8 |
| ->>>>>>> c02bcc59add84236ca74b9652ff8e2528b2c1394 |
9 | 5 | #include <signal.h> // Used to handle SIGTERM, SIGINT, SIGKILL
|
10 | 6 | #include <stdint.h> //for standard int types
|
11 | 7 | #include <stdio.h> //for i/o
|
@@ -205,7 +201,7 @@ static uint8_t run_py_function(const char* func_name, struct timespec* timeout,
|
205 | 201 | // retrieve the Python function from the student code
|
206 | 202 | PyObject* pFunc = PyObject_GetAttrString(pModule, func_name);
|
207 | 203 | PyObject* pValue = NULL;
|
208 |
| - log_printf(ERROR, "%s",func_name); |
| 204 | + log_printf(ERROR, "%s", func_name); |
209 | 205 | if (pFunc && PyCallable_Check(pFunc)) {
|
210 | 206 | pValue = PyObject_CallObject(pFunc, args); // make call to Python function
|
211 | 207 |
|
@@ -321,9 +317,9 @@ static pid_t start_mode_subprocess(char* student_code) {
|
321 | 317 |
|
322 | 318 | char* mode_str = get_mode_str(mode);
|
323 | 319 | 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 | + } |
327 | 323 | exit(0);
|
328 | 324 | return pid; // Never reach this statement due to exit, needed to fix compiler warning
|
329 | 325 | } else {
|
|
0 commit comments