summaryrefslogtreecommitdiff
path: root/ext/fiddle/fiddle.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fiddle/fiddle.c')
-rw-r--r--ext/fiddle/fiddle.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/fiddle/fiddle.c b/ext/fiddle/fiddle.c
index 9ab1283ba3..f420d9fa3b 100644
--- a/ext/fiddle/fiddle.c
+++ b/ext/fiddle/fiddle.c
@@ -1,3 +1,5 @@
+#include <stdbool.h>
+
#include <fiddle.h>
VALUE mFiddle;
@@ -357,6 +359,12 @@ Init_fiddle(void)
*/
rb_define_const(mFiddleTypes, "UINTPTR_T", INT2NUM(TYPE_UINTPTR_T));
+ /* Document-const: Fiddle::Types::BOOL
+ *
+ * C type - bool
+ */
+ rb_define_const(mFiddleTypes, "BOOL" , INT2NUM(TYPE_BOOL));
+
/* Document-const: ALIGN_VOIDP
*
* The alignment size of a void*
@@ -461,6 +469,12 @@ Init_fiddle(void)
*/
rb_define_const(mFiddle, "ALIGN_UINTPTR_T", INT2NUM(ALIGN_OF(uintptr_t)));
+ /* Document-const: ALIGN_BOOL
+ *
+ * The alignment size of a bool
+ */
+ rb_define_const(mFiddle, "ALIGN_BOOL", INT2NUM(ALIGN_OF(bool)));
+
/* Document-const: WINDOWS
*
* Returns a boolean regarding whether the host is WIN32
@@ -635,6 +649,12 @@ Init_fiddle(void)
*/
rb_define_const(mFiddle, "SIZEOF_CONST_STRING", INT2NUM(sizeof(const char*)));
+ /* Document-const: SIZEOF_BOOL
+ *
+ * size of a bool
+ */
+ rb_define_const(mFiddle, "SIZEOF_BOOL", INT2NUM(sizeof(bool)));
+
/* Document-const: RUBY_FREE
*
* Address of the ruby_xfree() function