Skip to content

Commit

Permalink
Merge pull request #2774 from cgohlke/patch-3
Browse files Browse the repository at this point in the history
Use correct Windows handle type
  • Loading branch information
wiredfool committed Oct 2, 2017
2 parents e4619d0 + 5ec351e commit 1b12310
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions _imagingcms.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,16 +595,23 @@ cms_profile_is_intent_supported(CmsProfileObject *self, PyObject *args)
}

#ifdef _WIN32

#ifdef _WIN64
#define F_HANDLE "K"
#else
#define F_HANDLE "k"
#endif

static PyObject *
cms_get_display_profile_win32(PyObject* self, PyObject* args)
{
char filename[MAX_PATH];
cmsUInt32Number filename_size;
BOOL ok;

int handle = 0;
HANDLE handle = 0;
int is_dc = 0;
if (!PyArg_ParseTuple(args, "|ii:get_display_profile", &handle, &is_dc))
if (!PyArg_ParseTuple(args, "|" F_HANDLE "i:get_display_profile", &handle, &is_dc))
return NULL;

filename_size = sizeof(filename);
Expand Down

0 comments on commit 1b12310

Please sign in to comment.