[ruby-core:62991] [ruby-trunk - Bug #9919] [Open] Hardcoding the value of SIZEOF_VOIDP

From: ntzrmtthihu777@...
Date: 2014-06-08 03:48:19 UTC
List: ruby-core #62991
Issue #9919 has been reported by Marty Plummer.

----------------------------------------
Bug #9919: Hardcoding the value of SIZEOF_VOIDP
https://bugs.ruby-lang.org/issues/9919

* Author: Marty Plummer
* Status: Open
* Priority: Normal
* Assignee: Nobuyoshi Nakada
* Category: misc
* Target version: 
* ruby -v: 2.1.2p95
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
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.



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next