1. 27 Jun, 2015 2 commits
    • David Vierra's avatar
      Actually check if __cplusplus is defined. · 65fcccc1
      David Vierra authored
      65fcccc1
    • David Vierra's avatar
      Rewrite __Pyx_sst_abs using only preprocessor macros, and add a case for 64-bit MSVC · 2e1f7fdf
      David Vierra authored
      Comparing `sizeof(Py_ssize_t)` to different sizes at compile time results in warnings or errors when the C++ compiler tries to find a function matching `abs(value)` (Per the standard library spec, no functions match if `ssize_t` is a typedef of `long long`). Luckily, `pyport.h` provides some SIZEOF macros we can use at preprocess time. __Pyx_sst_abs is now conditionally defined to a much shorter expression.
      
      64-bit MSVC is one case where `ssize_t` is a `long long`. Instead of falling back to `((value<0) ? -value : value))`, I added a check for 64-bit MSVC that calls the MS-specific function `_abs64(long long)`
      
      This change also includes the change given by PR #402, improved with a check against the available C++ version as `std::abs` is only available on C++11.
      2e1f7fdf
  2. 25 Jun, 2015 4 commits
  3. 23 Jun, 2015 6 commits
  4. 22 Jun, 2015 2 commits
  5. 20 Jun, 2015 6 commits
  6. 19 Jun, 2015 1 commit
  7. 16 Jun, 2015 1 commit
  8. 12 Jun, 2015 3 commits
  9. 11 Jun, 2015 1 commit
  10. 09 Jun, 2015 1 commit
  11. 08 Jun, 2015 2 commits
  12. 07 Jun, 2015 1 commit
  13. 06 Jun, 2015 10 commits