From: SourceForge.net <no...@so...> - 2009-03-14 00:57:51
|
Bugs item #2685755, was opened at 2009-03-13 01:14 Message generated for change (Comment added) made by blakharaz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=2685755&group_id=1645 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: ruby Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Blakharaz (blakharaz) Assigned to: Gonzalo Garramuno (gga73) Summary: Mac OS X: check already defined as macro Initial Comment: In Mac OS X the header file AssertMacros.h already defines check as a assertion macro. This leads to compiler errors for some generated code creating or using check identifiers: E.g.: template <class Type> struct traits_check<Type, value_category> { static bool check(VALUE obj) { int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR; return SWIG_IsOK(res) ? true : false; } }; template <class Type> struct traits_check<Type, pointer_category> { static bool check(VALUE obj) { int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR; return SWIG_IsOK(res) ? true : false; } }; template <class Type> inline bool check(VALUE obj) { return traits_check<Type, typename traits<Type>::category>::check(obj); } ---------------------------------------------------------------------- >Comment By: Blakharaz (blakharaz) Date: 2009-03-14 01:57 Message: No, it doesn't help. That header file containing the check macro is somehow included through our own header files, which is done after the part generated by rubyhead.swg. See http://svn.berlios.de/svnroot/repos/dsa-hl/rl/trunk/engine/script/swig/RlExports.i or http://svn.berlios.de/svnroot/repos/dsa-hl/rl/trunk/engine/script/swig for our SWIG input files. However, a #undef check in our FixRubyHeaders.h file fixes the problem (but just for us, of course). ---------------------------------------------------------------------- Comment By: William Fulton (wsfulton) Date: 2009-03-13 01:26 Message: Does a #undef check in rubyhead.swg fix it for you? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=2685755&group_id=1645 |