Skip to content

Instantly share code, notes, and snippets.

@nathanfarlow
Created April 6, 2022 23:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
# python3 swaperator.py
# Make sure to use CPython!
import ctypes as c
r = lambda x: c.c_size_t.from_address(x).value
n = r((t := r(id(int) + 96)) + 16)
c.c_size_t.from_address(t).value = n
a = 5
b = 10
print(a + b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment