Bug #9919
closedHardcoding the value of SIZEOF_VOIDP
Description
Greetings,
While this may be a small issue, I think many c-language libraries would benefit from this suggestion;
While compiling ruby from source, SIZEOF_VOIDP
is determined and hard-coded into $prefix/ruby-$version/$RUBY_PLATFORM/ruby/config.h, as #define SIZEOF_VOIDP <determined size>;
would it not be simpler to simply #define SIZEOF_VOIDP sizeof(void*)
, as this would be proper on any platform one would compile on automatically, and prevent redefinition warnings when using additional libraries (case in point, when compiling a sdl+ruby application their definitions differ)
Just a small idea, I'll be posting a similar bug to sdl as well, and any other libraries I can encounter this on in daily use.
Updated by nobu (Nobuyoshi Nakada) about 11 years ago
- Description updated (diff)
- Status changed from Open to Rejected
sizeof
expression is not a preprocessor constant.