mark 'Rgfw.swapBuffers' as reentrant, because calling this function will likely trigger the registered key callbacks
This commit is contained in:
25
ffi/export.h
25
ffi/export.h
@@ -1,5 +1,5 @@
|
|||||||
#ifndef __SHF_ML_H__
|
#ifndef __SHF_RGFW_ML_H__
|
||||||
#define __SHF_ML_H__
|
#define __SHF_RGFW_ML_H__
|
||||||
|
|
||||||
/* Copyright (C) 2004-2007 Henry Cejtin, Matthew Fluet, Suresh
|
/* Copyright (C) 2004-2007 Henry Cejtin, Matthew Fluet, Suresh
|
||||||
* Jagannathan, and Stephen Weeks.
|
* Jagannathan, and Stephen Weeks.
|
||||||
@@ -132,23 +132,23 @@ typedef Pointer Objptr;
|
|||||||
|
|
||||||
#endif /* _MLTON_EXPORT_H_ */
|
#endif /* _MLTON_EXPORT_H_ */
|
||||||
|
|
||||||
#if !defined(PART_OF_SHF) && \
|
#if !defined(PART_OF_SHF_RGFW) && \
|
||||||
!defined(STATIC_LINK_SHF) && \
|
!defined(STATIC_LINK_SHF_RGFW) && \
|
||||||
!defined(DYNAMIC_LINK_SHF)
|
!defined(DYNAMIC_LINK_SHF_RGFW)
|
||||||
#define PART_OF_SHF
|
#define PART_OF_SHF_RGFW
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PART_OF_SHF)
|
#if defined(PART_OF_SHF_RGFW)
|
||||||
#define MLLIB_PRIVATE(x) PRIVATE x
|
#define MLLIB_PRIVATE(x) PRIVATE x
|
||||||
#define MLLIB_PUBLIC(x) PUBLIC x
|
#define MLLIB_PUBLIC(x) PUBLIC x
|
||||||
#elif defined(STATIC_LINK_SHF)
|
#elif defined(STATIC_LINK_SHF_RGFW)
|
||||||
#define MLLIB_PRIVATE(x)
|
#define MLLIB_PRIVATE(x)
|
||||||
#define MLLIB_PUBLIC(x) PUBLIC x
|
#define MLLIB_PUBLIC(x) PUBLIC x
|
||||||
#elif defined(DYNAMIC_LINK_SHF)
|
#elif defined(DYNAMIC_LINK_SHF_RGFW)
|
||||||
#define MLLIB_PRIVATE(x)
|
#define MLLIB_PRIVATE(x)
|
||||||
#define MLLIB_PUBLIC(x) EXTERNAL x
|
#define MLLIB_PUBLIC(x) EXTERNAL x
|
||||||
#else
|
#else
|
||||||
#error Must specify linkage for shf
|
#error Must specify linkage for shf_rgfw
|
||||||
#define MLLIB_PRIVATE(x)
|
#define MLLIB_PRIVATE(x)
|
||||||
#define MLLIB_PUBLIC(x)
|
#define MLLIB_PUBLIC(x)
|
||||||
#endif
|
#endif
|
||||||
@@ -157,9 +157,6 @@ typedef Pointer Objptr;
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MLLIB_PUBLIC(void mltonFramebufferSizeCallback (Int32 x0, Int32 x1);)
|
|
||||||
MLLIB_PUBLIC(void mltonCharCallback (Word32 x0);)
|
|
||||||
MLLIB_PUBLIC(void mltonKeyCallback (Int32 x0, Int32 x1, Int32 x2, Int32 x3);)
|
|
||||||
|
|
||||||
#undef MLLIB_PRIVATE
|
#undef MLLIB_PRIVATE
|
||||||
#undef MLLIB_PUBLIC
|
#undef MLLIB_PUBLIC
|
||||||
@@ -168,4 +165,4 @@ MLLIB_PUBLIC(void mltonKeyCallback (Int32 x0, Int32 x1, Int32 x2, Int32 x3);)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __SHF_ML_H__ */
|
#endif /* __SHF_RGFW_ML_H__ */
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ struct
|
|||||||
val shouldCloseWindow =
|
val shouldCloseWindow =
|
||||||
_import "shouldCloseWindow" public : window -> bool;
|
_import "shouldCloseWindow" public : window -> bool;
|
||||||
val swapBuffers =
|
val swapBuffers =
|
||||||
_import "swapBuffers" public : window -> unit;
|
_import "swapBuffers" public reentrant : window -> unit;
|
||||||
val writeClipboard =
|
val writeClipboard =
|
||||||
_import "writeClipboard" public : string * int -> unit;
|
_import "writeClipboard" public : string * int -> unit;
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user