Skip to content

Commit

Permalink
Remove any usage of __PYTHRAN__ macro
Browse files Browse the repository at this point in the history
It was only used once, as a legacy of Python 2 support (see
36d11d0 for the origin of the remaining
piece of code). This should make #2257 easier too.
  • Loading branch information
serge-sans-paille committed Nov 26, 2024
1 parent 87bc14e commit 075cefc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions pythran/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,6 @@ def parse_define(define):

if python:
extension['define_macros'].append('ENABLE_PYTHON_MODULE')
extension['define_macros'].append(
'__PYTHRAN__={}'.format(sys.version_info.major))

pythonic_dir = get_include()

Expand Down
8 changes: 1 addition & 7 deletions pythran/pythonic/builtins/oct.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ namespace builtins
types::str oct(T const &v)
{
std::ostringstream oss;
oss <<
#if defined(__PYTHRAN__) && __PYTHRAN__ == 3
"0o"
#else
'0'
#endif
<< std::oct << v;
oss << "0o" << std::oct << v;
return oss.str();
}
} // namespace builtins
Expand Down

0 comments on commit 075cefc

Please sign in to comment.