SHARE
TWEET

Untitled

a guest Mar 21st, 2017 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PyObject* aa = PyLong_FromLong(7L);
  2.    
  3. PyObject* aa = PyLong_FromLong(257L);
  4.    
  5. PyObject* PyLong_FromLong(long v)
  6. Return value: New reference.
  7. Return a new PyLongObject object from v, or NULL on failure.
  8.  
  9. The current implementation keeps an array of integer objects for all integers between -5 and 256, when you create an int in that range you actually just get back a reference to the existing object. So it should be possible to change the value of 1. I suspect the behaviour of Python in this case is undefined. :-)
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top