Corrections for Ruby 1.6 compatibility.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6190 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Lyle Johnson 2004-09-01 02:37:54 +00:00
commit 4889aadd3d
2 changed files with 5 additions and 2 deletions

View file

@ -58,13 +58,16 @@
#ifdef __cplusplus
# ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
# define PROTECTFUNC(f) ((VALUE (*)()) f)
# define VALUEFUNC(f) ((VALUE (*)()) f)
# define VOIDFUNC(f) ((void (*)()) f)
# else
# ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
# define PROTECTFUNC(f) ((VALUE (*)()) f)
# define VALUEFUNC(f) ((VALUE (*)()) f)
# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
# else /* These definitions should work for Ruby 1.7 */
# else /* These definitions should work for Ruby 1.7+ */
# define PROTECTFUNC(f) ((VALUE (*)()) f)
# define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
# endif