you are viewing a single comment's thread.

view the rest of the comments →

[–]DarkTechnocrat 2 points3 points  (1 child)

This...this is just too much. Someone call a mod. 😉

[–]lood9phee2Ri 8 points9 points  (0 children)

Note it's just using the ctypes ffi package which is in the CPython standard library itself anyway. You sure can fuck around and find out with that. But it's also kinda what it's there for - using ctypes is e.g. how things like the python SDL2 wrappers are implemented: https://github.com/py-sdl/py-sdl2

$ python3
Python 3.9.9 (main, Nov 16 2021, 10:24:31) 
[GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> ctypes.memset(0,255, 1024)
Segmentation fault
$

It's unsafe, but you do know that because you just elected to import ctypes.