mirror of https://github.com/mgba-emu/mgba.git
GBA: Work around CFFI regression
This commit is contained in:
parent
4787eb29c5
commit
5c11ea8c27
|
@ -66,6 +66,7 @@ DECL_BITS(RTCCommandData, Magic, 0, 4);
|
|||
DECL_BITS(RTCCommandData, Command, 4, 3);
|
||||
DECL_BIT(RTCCommandData, Reading, 7);
|
||||
|
||||
#ifndef PYCPARSE
|
||||
#pragma pack(push, 1)
|
||||
struct GBARTC {
|
||||
int32_t bytesRemaining;
|
||||
|
@ -78,6 +79,9 @@ struct GBARTC {
|
|||
uint8_t time[7];
|
||||
};
|
||||
#pragma pack(pop)
|
||||
#else
|
||||
struct GBATRC;
|
||||
#endif
|
||||
|
||||
struct GBAGBPKeyCallback {
|
||||
struct mKeyCallback d;
|
||||
|
|
|
@ -65,6 +65,18 @@ for line in preprocessed.splitlines():
|
|||
lines.append(line)
|
||||
ffi.cdef('\n'.join(lines))
|
||||
|
||||
ffi.cdef("""
|
||||
struct GBARTC {
|
||||
int32_t bytesRemaining;
|
||||
int32_t transferStep;
|
||||
int32_t bitsRead;
|
||||
int32_t bits;
|
||||
int32_t commandActive;
|
||||
RTCCommandData command;
|
||||
RTCControl control;
|
||||
uint8_t time[7];
|
||||
};""", packed=True)
|
||||
|
||||
preprocessed = subprocess.check_output(cpp + ["-fno-inline", "-P"] + cppflags + [os.path.join(pydir, "lib.h")], universal_newlines=True)
|
||||
|
||||
lines = []
|
||||
|
|
|
@ -21,8 +21,8 @@ setup(
|
|||
author_email="jeffrey@endrift.com",
|
||||
url="http://github.com/mgba-emu/mgba/",
|
||||
packages=["mgba"],
|
||||
setup_requires=['cffi>=1.6,!=1.12.3', 'pytest-runner'],
|
||||
install_requires=['cffi>=1.6,!=1.12.3', 'cached-property'],
|
||||
setup_requires=['cffi>=1.6', 'pytest-runner'],
|
||||
install_requires=['cffi>=1.6', 'cached-property'],
|
||||
extras_require={'pil': ['Pillow>=2.3'], 'cinema': ['pyyaml', 'pytest']},
|
||||
tests_require=['pytest'],
|
||||
cffi_modules=["_builder.py:ffi"],
|
||||
|
|
Loading…
Reference in New Issue