mirror of
https://github.com/QingdaoU/Judger.git
synced 2025-01-16 01:13:25 +00:00
增加版本号
This commit is contained in:
parent
b3fc087c8f
commit
be50b98f66
@ -109,6 +109,7 @@ static PyMethodDef judger_methods[] = {
|
||||
|
||||
PyMODINIT_FUNC init_judger(void) {
|
||||
PyObject *module = Py_InitModule3("_judger", judger_methods, NULL);
|
||||
PyModule_AddIntConstant(module, "VERSION", VERSION);
|
||||
PyModule_AddIntConstant(module, "UNLIMITED", UNLIMITED);
|
||||
PyModule_AddIntConstant(module, "SUCCESS", SUCCESS);
|
||||
PyModule_AddIntConstant(module, "CPU_TIME_LIMIT_EXCEEDED", CPU_TIME_LIMITED);
|
||||
|
@ -3,5 +3,5 @@ import platform
|
||||
from distutils.core import setup, Extension
|
||||
|
||||
setup(name='_judger',
|
||||
version='1.0',
|
||||
version='2.0',
|
||||
ext_modules=[Extension('_judger', sources=['_judger.c'], libraries=["dl"])])
|
||||
|
@ -1,7 +1,6 @@
|
||||
#define _GNU_SOURCE
|
||||
#define _POSIX_SOURCE
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sched.h>
|
||||
|
@ -4,8 +4,10 @@
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define UNLIMITED -1
|
||||
// (ver >> 16) & 0xff, (ver >> 8) & 0xff, ver & 0xff -> real version
|
||||
#define VERSION 0x020000
|
||||
|
||||
#define UNLIMITED -1
|
||||
|
||||
#define LOG_ERROR(error_code) LOG_FATAL(log_fp, "Error: "#error_code);
|
||||
|
||||
|
@ -1,8 +1,11 @@
|
||||
# coding=utf-8
|
||||
import _judger
|
||||
from unittest import TestCase, main
|
||||
|
||||
from testcase.integration.test import IntegrationTest
|
||||
from testcase.c_cpp.test import C_CPPJudgeTestCase
|
||||
from testcase.seccomp.test import SeccompTest
|
||||
|
||||
ver = _judger.VERSION
|
||||
print "Judger version", (ver >> 16) & 0xff, (ver >> 8) & 0xff, ver & 0xff
|
||||
main()
|
Loading…
x
Reference in New Issue
Block a user