Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use simpler #ifdefs for selecting architecture on Windows
  • Loading branch information
markshannon committed Apr 29, 2026
commit a5765b433f59ba235fd1ba47659c5238ba5a04e3
4 changes: 2 additions & 2 deletions Include/internal/pycore_pystate.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,9 @@
static inline uintptr_t
_Py_get_machine_stack_pointer(void) {
uintptr_t result;
#if !defined(_MSC_VER) && defined(_M_ARM64)
#if defined(_M_ARM64)
result = __getReg(31);
#elif defined(_MSC_VER) && defined(_M_X64)
#elif defined(_M_X64)
result = (uintptr_t)_AddressOfReturnAddress();
#elif defined(__aarch64__)
__asm__ ("mov %0, sp" : "=r" (result));
Expand All @@ -327,7 +327,7 @@
char here;
result = (uintptr_t)&here;
#endif
return result;

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 330 in Include/internal/pycore_pystate.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, switch-case)

returning address of local variable or temporary : here [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
}

static inline intptr_t
Expand Down
Loading