{"action":"created","issue":{"url":"https://api.github.com/repos/swig/swig/issues/575","labels_url":"https://api.github.com/repos/swig/swig/issues/575/labels{/name}","comments_url":"https://api.github.com/repos/swig/swig/issues/575/comments","events_url":"https://api.github.com/repos/swig/swig/issues/575/events","html_url":"https://github.com/swig/swig/pull/575","id":123475599,"number":575,"title":"Win64 ptrdiff t","user":{"login":"ahnolds","id":7005073,"avatar_url":"https://avatars.githubusercontent.com/u/7005073?v=3","gravatar_id":"","url":"https://api.github.com/users/ahnolds","html_url":"https://github.com/ahnolds","followers_url":"https://api.github.com/users/ahnolds/followers","following_url":"https://api.github.com/users/ahnolds/following{/other_user}","gists_url":"https://api.github.com/users/ahnolds/gists{/gist_id}","starred_url":"https://api.github.com/users/ahnolds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahnolds/subscriptions","organizations_url":"https://api.github.com/users/ahnolds/orgs","repos_url":"https://api.github.com/users/ahnolds/repos","events_url":"https://api.github.com/users/ahnolds/events{/privacy}","received_events_url":"https://api.github.com/users/ahnolds/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-12-22T12:45:24Z","updated_at":"2016-01-05T19:37:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/swig/swig/pulls/575","html_url":"https://github.com/swig/swig/pull/575","diff_url":"https://github.com/swig/swig/pull/575.diff","patch_url":"https://github.com/swig/swig/pull/575.patch"},"body":"Adds support for ptrdiff_t on 64-bit Windows platforms where `sizeof(ptrdiff_t) == 64` and `sizeof(long) == 32`.  Previously this caused problems because in Python slice notation given the index [NUM:], the second index is set to PTRDIFF_MAX, which is greater than LONG_MAX on LLP64 platforms like 64-bit Windows.\r\n\r\nThis (should) now pass the previously failure-allowed Appveyor build for Python 2 on x64 Windows."},"comment":{"url":"https://api.github.com/repos/swig/swig/issues/comments/169107048","html_url":"https://github.com/swig/swig/pull/575#issuecomment-169107048","issue_url":"https://api.github.com/repos/swig/swig/issues/575","id":169107048,"user":{"login":"wsfulton","id":2878511,"avatar_url":"https://avatars.githubusercontent.com/u/2878511?v=3","gravatar_id":"","url":"https://api.github.com/users/wsfulton","html_url":"https://github.com/wsfulton","followers_url":"https://api.github.com/users/wsfulton/followers","following_url":"https://api.github.com/users/wsfulton/following{/other_user}","gists_url":"https://api.github.com/users/wsfulton/gists{/gist_id}","starred_url":"https://api.github.com/users/wsfulton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wsfulton/subscriptions","organizations_url":"https://api.github.com/users/wsfulton/orgs","repos_url":"https://api.github.com/users/wsfulton/repos","events_url":"https://api.github.com/users/wsfulton/events{/privacy}","received_events_url":"https://api.github.com/users/wsfulton/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T19:37:45Z","updated_at":"2016-01-05T19:37:45Z","body":"Looks good. Could you also add a simple run time test - Python at the  minimum, plus any other languages you fancy? How about adding a C function to the primitive_types.i test that returns SIZE_MAX and use that value for testing size_t and your changes? If it fails on a system that does not have stdint.h, that's okay, likewise if long long is not available. Similarly a test for PTRDIFF_MAX/PTRDIFF_MIN.\r\n\r\nAlso I suggest a cosmetic change:\r\n```diff\r\n+  } else /* hopefully sizeof(ptrdiff_t) <= sizeof(long long) */ {\r\n```\r\nto:\r\n```diff\r\n+  } else {\r\n+    /* assume sizeof(ptrdiff_t) <= sizeof(long long) */\r\n```\r\n"}}