[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57555] trunk/blender/source/blender/ blenlib/BLI_path_util.h: Compile fix for r57554 missing include "BLI_string .h" in BLI_path_util.h

Bastien Montagne montagne29 at wanadoo.fr
Tue Jun 18 21:01:07 CEST 2013


Hi Juergen,

Not sure this fix is right... We usually avoid including into other 
includes, afaik, except for a few specific cases.

As I’m on Linux I can't check it, but right way to go would rather be to 
add include of BLI_string.h into the .c files that are newly including 
BLI_path_util.h, imho.

At the very least, if we want to make an exception here (granted, it's 
rather easy to skip that, esp. as it's only needed for Windows), the 
BLI_string.h include should be placed inside an #ifdef WIN32 (and 
perhaps also moved inside the extern C block?)...

Cheers,
Bastien

On 18/06/2013 20:42, Juergen Herrmann wrote:
> Revision: 57555
>            http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57555
> Author:   shadowrom
> Date:     2013-06-18 18:42:29 +0000 (Tue, 18 Jun 2013)
> Log Message:
> -----------
> Compile fix for r57554 missing include "BLI_string.h" in BLI_path_util.h
>
> Revision Links:
> --------------
>      http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57554
>
> Modified Paths:
> --------------
>      trunk/blender/source/blender/blenlib/BLI_path_util.h
>
> Modified: trunk/blender/source/blender/blenlib/BLI_path_util.h
> ===================================================================
> --- trunk/blender/source/blender/blenlib/BLI_path_util.h	2013-06-18 18:11:52 UTC (rev 57554)
> +++ trunk/blender/source/blender/blenlib/BLI_path_util.h	2013-06-18 18:42:29 UTC (rev 57555)
> @@ -31,6 +31,8 @@
>    *  \ingroup bli
>    */
>
> +#include "BLI_string.h"
> +
>   #ifdef __cplusplus
>   extern "C" {
>   #endif
> @@ -162,7 +164,7 @@
>   bool BLI_path_is_rel(const char *path);
>
>   /* path string comparisons: case-insensitive for Windows, case-sensitive otherwise */
> -#ifdef WIN32
> +#if defined(WIN32)
>   #  define BLI_path_cmp BLI_strcasecmp
>   #  define BLI_path_ncmp BLI_strncasecmp
>   #else
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>


More information about the Bf-committers mailing list