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:
parent
0985badfe3
commit
4889aadd3d
2 changed files with 5 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue