1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2025-03-10 05:34:36 +00:00

ifdef'd min/max functions when compiled under VC. It seems that VC already defines them.

This commit is contained in:
Virgil Dupras 2010-01-31 11:05:13 +00:00
parent 967aeecf5b
commit 962805936e
3 changed files with 12 additions and 0 deletions

View File

@ -6,6 +6,7 @@ syntax: glob
*.mode1v3 *.mode1v3
*.pbxuser *.pbxuser
*.tm_build_errors *.tm_build_errors
*.pyd
conf.yaml conf.yaml
build build
cocoa/*/Info.plist cocoa/*/Info.plist
@ -14,6 +15,11 @@ cocoa/*/dg_cocoa.plugin
qt/base/*_rc.py qt/base/*_rc.py
qt/base/*_ui.py qt/base/*_ui.py
qt/*/*_ui.py qt/*/*_ui.py
qt/*/build
qt/*/dist
qt/*/install
qt/*/logdict*.log
qt/*/warn*.txt
help_se/dupeguru_help help_se/dupeguru_help
help_me/dupeguru_me_help help_me/dupeguru_me_help
help_pe/dupeguru_pe_help help_pe/dupeguru_pe_help

View File

@ -15,6 +15,8 @@ static PyObject *NoBlocksError;
/* avgdiff/maxdiff has been called with 2 block lists of different size. */ /* avgdiff/maxdiff has been called with 2 block lists of different size. */
static PyObject *DifferentBlockCountError; static PyObject *DifferentBlockCountError;
/* It seems like MS VC defines min/max already */
#ifndef _MSC_VER
static int static int
max(int a, int b) max(int a, int b)
{ {
@ -26,6 +28,7 @@ min(int a, int b)
{ {
return b < a ? b : a; return b < a ? b : a;
} }
#endif
/* Create a tuple out of an array of integers. */ /* Create a tuple out of an array of integers. */
static PyObject* static PyObject*

View File

@ -10,6 +10,8 @@
#define PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN
#include "Python.h" #include "Python.h"
/* It seems like MS VC defines min/max already */
#ifndef _MSC_VER
static int static int
max(int a, int b) max(int a, int b)
{ {
@ -21,6 +23,7 @@ min(int a, int b)
{ {
return b < a ? b : a; return b < a ? b : a;
} }
#endif
static PyObject* static PyObject*
getblock(PyObject *image) getblock(PyObject *image)