Project

General

Profile

Actions

Bug #9919

closed

Hardcoding the value of SIZEOF_VOIDP

Added by ntzrmtthihu777 (Marty Plummer) about 11 years ago. Updated about 11 years ago.

Status:
Rejected
Target version:
-
ruby -v:
2.1.2p95
[ruby-core:62991]

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.

Actions

Also available in: Atom PDF

Like0
Like0