Skip to content

Commit f67ef98

Browse files
committed
Reorganize slurm header definitions into seperate files (#282)
- update the pyslurm_bindgen.py tool accordingly
1 parent 3679933 commit f67ef98

File tree

6 files changed

+1714
-1423
lines changed

6 files changed

+1714
-1423
lines changed

pyslurm/slurm/__init__.pxd

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,30 @@ from libc.string cimport (
2323
memcpy,
2424
)
2525

26+
2627
cdef extern from '<netinet/in.h>' nogil:
2728
ctypedef struct sockaddr_storage:
2829
pass
2930

31+
3032
cdef extern from '<stdio.h>' nogil:
3133
ctypedef struct FILE
3234
cdef FILE *stdout
3335

36+
3437
cdef extern from '<time.h>' nogil:
3538
ctypedef long time_t
3639
double difftime(time_t time1, time_t time2)
3740
time_t time(time_t *t)
3841

42+
3943
cdef extern from '<Python.h>' nogil:
4044
cdef FILE *PyFile_AsFile(object file)
4145
char *__FILE__
4246
cdef int __LINE__
4347
char *__FUNCTION__
4448

49+
4550
cdef extern from '<pthread.h>' nogil:
4651
ctypedef struct pthread_mutex_t:
4752
pass
@@ -52,6 +57,7 @@ cdef extern from '<pthread.h>' nogil:
5257
ctypedef struct pthread_t:
5358
pass
5459

60+
5561
cdef extern from *:
5662
ctypedef struct slurm_job_credential
5763
ctypedef struct switch_jobinfo
@@ -67,8 +73,12 @@ cdef extern from *:
6773
ctypedef struct slurm_step_ctx_struct
6874
ctypedef struct slurm_ctl_conf_t
6975

70-
# Header definitions combined from slurm.h, slurmdb.h and slurm_errno.h
71-
include "header.pxi"
76+
77+
# Header definitions
78+
include "slurm_version.h.pxi"
79+
include "slurm_errno.h.pxi"
80+
include "slurm.h.pxi"
81+
include "slurmdb.h.pxi"
7282

7383
# Any other definitions which are not directly in
7484
# the header files, but exported in libslurm.so

0 commit comments

Comments
 (0)