Skip to content

Commit

Permalink
Get rid of DEF statements.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilk committed Jun 22, 2023
1 parent 4d8cce2 commit afeb42a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions afl.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,17 @@ import struct
import sys
import warnings

# These constants must be kept in sync with afl-fuzz:
DEF SHM_ENV_VAR = b'__AFL_SHM_ID'
DEF FORKSRV_FD = 198
DEF MAP_SIZE_POW2 = 16
DEF MAP_SIZE = 1 << MAP_SIZE_POW2
cdef extern from *:
# These constants must be kept in sync with afl-fuzz:
'''
#define SHM_ENV_VAR "__AFL_SHM_ID"
#define FORKSRV_FD 198
#define MAP_SIZE_POW2 16
#define MAP_SIZE (1 << MAP_SIZE_POW2)
'''
extern const char *SHM_ENV_VAR
extern int FORKSRV_FD
extern int MAP_SIZE

from cpython.exc cimport PyErr_SetFromErrno
from libc cimport errno
Expand Down

0 comments on commit afeb42a

Please sign in to comment.