On Sun, 22 Apr 2007, Joe Swatosh wrote:
> I'm trying to reduce the noise when building the Ruby bindings. So I
> don't get too used to so many warnings.
>
> [[[
> Deal with compiler warning for narrowing conversion
>
> * build/generator/gen_win.py
> (get_win_defines): Don't define snprintf for the Ruby projects since ruby.h
> has its own definition available.
>
> ]]]
>
> Index: build/generator/gen_win.py
> ===================================================================
> --- build/generator/gen_win.py (revision 24695)
> +++ build/generator/gen_win.py (working copy)
> @@ -747,12 +747,15 @@
> "Return the list of defines for target"
>
> fakedefines = ["WIN32","_WINDOWS","alloca=_alloca",
> - "snprintf=_snprintf", "_CRT_SECURE_NO_DEPRECATE=",
> + "_CRT_SECURE_NO_DEPRECATE=",
> "_CRT_NONSTDC_NO_DEPRECATE="]
> if isinstance(target, gen_base.TargetApacheMod):
> if target.name == 'mod_dav_svn':
> fakedefines.extend(["AP_DECLARE_EXPORT"])
>
> + if -1 == target.name.find('ruby'):
> + fakedefines.append("snprintf=_snprintf")
I'd rather see this writter as "target.name.find('ruby') == -1"
> +
> if isinstance(target, gen_base.TargetSWIG):
> fakedefines.append("SWIG_GLOBAL")
- application/pgp-signature attachment: stored
Received on Mon Apr 23 18:14:24 2007