Changeset 331 for devel/5.X/pbs_wrap.c
- Timestamp:
- 03/09/15 23:06:35 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/5.X/pbs_wrap.c
r327 r331 2979 2979 #include "log.h" 2980 2980 2981 #define SARA_DEBUG 02981 #define SARA_DEBUG 1 2982 2982 2983 2983 //extern int pbs_errno; … … 3091 3091 int get_error() 3092 3092 { 3093 char *errmsg;3094 3095 errmsg = pbse_to_txt(pbs_errno);3096 3093 if (SARA_DEBUG) 3097 3094 { 3098 printf("Bas = %d\n", pbs_errno); 3099 printf("Bas = %d, text = %s\n", pbs_errno, errmsg); 3095 printf("Bas pbs_errno = %d, pbs_strerror %s\n", pbs_errno, pbs_strerror(pbs_errno)); 3100 3096 } 3101 3097 return (pbs_errno); … … 8375 8371 if (alloc6 == SWIG_NEWOBJ) free((char*)buf6); 8376 8372 return NULL; 8373 } 8374 8375 8376 SWIGINTERN PyObject *_wrap_pbse_to_txt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 8377 PyObject *resultobj = 0; 8378 int arg1 ; 8379 int val1 ; 8380 int ecode1 = 0 ; 8381 PyObject * obj0 = 0 ; 8382 char *result = 0 ; 8383 8384 if (!PyArg_ParseTuple(args,(char *)"O:pbse_to_txt",&obj0)) SWIG_fail; 8385 ecode1 = SWIG_AsVal_int(obj0, &val1); 8386 if (!SWIG_IsOK(ecode1)) { 8387 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbse_to_txt" "', argument " "1"" of type '" "int""'"); 8388 } 8389 arg1 = (int)(val1); 8390 result = (char *)pbse_to_txt(arg1); 8391 resultobj = SWIG_FromCharPtr((const char *)result); 8392 return resultobj; 8393 fail: 8394 return NULL; 8395 } 8396 8397 8398 SWIGINTERN PyObject *_wrap_pbs_strerror(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 8399 PyObject *resultobj = 0; 8400 int arg1 ; 8401 int val1 ; 8402 int ecode1 = 0 ; 8403 PyObject * obj0 = 0 ; 8404 char *result = 0 ; 8405 8406 if (!PyArg_ParseTuple(args,(char *)"O:pbs_strerror",&obj0)) SWIG_fail; 8407 ecode1 = SWIG_AsVal_int(obj0, &val1); 8408 if (!SWIG_IsOK(ecode1)) { 8409 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_strerror" "', argument " "1"" of type '" "int""'"); 8410 } 8411 arg1 = (int)(val1); 8412 result = (char *)pbs_strerror(arg1); 8413 resultobj = SWIG_FromCharPtr((const char *)result); 8414 return resultobj; 8415 fail: 8416 return NULL; 8417 } 8418 8419 8420 SWIGINTERN int Swig_var_pbs_errno_set(PyObject *_val) { 8421 { 8422 int val; 8423 int res = SWIG_AsVal_int(_val, &val); 8424 if (!SWIG_IsOK(res)) { 8425 SWIG_exception_fail(SWIG_ArgError(res), "in variable '""pbs_errno""' of type '""int""'"); 8426 } 8427 pbs_errno = (int)(val); 8428 } 8429 return 0; 8430 fail: 8431 return 1; 8432 } 8433 8434 8435 SWIGINTERN PyObject *Swig_var_pbs_errno_get(void) { 8436 PyObject *pyobj = 0; 8437 8438 pyobj = SWIG_From_int((int)(pbs_errno)); 8439 return pyobj; 8377 8440 } 8378 8441 … … 8490 8553 { (char *)"log_init", _wrap_log_init, METH_VARARGS, NULL}, 8491 8554 { (char *)"chk_file_sec", _wrap_chk_file_sec, METH_VARARGS, NULL}, 8555 { (char *)"pbse_to_txt", _wrap_pbse_to_txt, METH_VARARGS, NULL}, 8556 { (char *)"pbs_strerror", _wrap_pbs_strerror, METH_VARARGS, NULL}, 8492 8557 { NULL, NULL, 0, NULL } 8493 8558 }; … … 9640 9705 SWIG_Python_SetConstant(d, "TRUE",SWIG_From_int((int)(1))); 9641 9706 SWIG_Python_SetConstant(d, "FALSE",SWIG_From_int((int)(0))); 9707 SWIG_Python_SetConstant(d, "PBSE_TOTAL_CEILING",SWIG_From_int((int)(PBSE_TOTAL_CEILING))); 9708 SWIG_Python_SetConstant(d, "PBSE_",SWIG_From_int((int)(15000))); 9709 SWIG_Python_SetConstant(d, "PBSE_NONE",SWIG_From_int((int)(0))); 9710 SWIG_addvarlink(SWIG_globals(),(char*)"pbs_errno",Swig_var_pbs_errno_get, Swig_var_pbs_errno_set); 9642 9711 #if PY_VERSION_HEX >= 0x03000000 9643 9712 return m;
Note: See TracChangeset
for help on using the changeset viewer.