Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/texplay/bindings.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ m_clone_image(VALUE self)

cloned_image = m_dup_image(self);

#if RUBY_API_VERSION_MAJOR <= 1 || (RUBY_API_VERSION_MAJOR == 2 && RUBY_API_VERSION_MINOR >= 0)
#if RUBY_API_VERSION_MAJOR <= 1 || (RUBY_API_VERSION_MAJOR >= 2)
/* the main diff b/w clone and dup is that clone also dups the singleton */
rb_obj_reveal(cloned_image, rb_singleton_class_clone(self));
#else
Expand Down
4 changes: 4 additions & 0 deletions ext/texplay/texplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@
#define ABS(X) ((X) >= 0 ? (X) : -(X))

/* enums */
#ifdef __bool_true_false_are_defined
/* Newer Ruby versions already include stdbool.h */
#else
typedef enum e_bool {
false, true
} bool;
#endif

typedef enum e_color {
red, green, blue, alpha
Expand Down