[issue15947] Assigning new values to instance of pointer types does not check validity

2020-08-30 Thread Facundo Batista


Facundo Batista  added the comment:

I'm closing this, it looks to me that behaviour changed and this is safe now.

--
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15947] Assigning new values to instance of pointer types does not check validity

2019-04-26 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15947] Assigning new values to instance of pointer types does not check validity

2014-07-13 Thread Mark Lawrence

Mark Lawrence added the comment:

@Facundo please accept our apologies for the delay in getting back to you.

--
nosy: +BreamoreBoy, amaury.forgeotdarc, belopolsky, meador.inge
versions: +Python 3.4, Python 3.5 -Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15947
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15947] Assigning new values to instance of pointer types does not check validity

2012-09-15 Thread Facundo Batista

New submission from Facundo Batista:

In the doc it says:


Assigning a new value to instances of the pointer types c_char_p, c_wchar_p, 
and c_void_p changes the memory location they point to, not the contents of the 
memory block [...].

 s = Hello, World
 c_s = c_wchar_p(s)
 print(c_s)
c_wchar_p('Hello, World')
 c_s.value = Hi, there
 print(c_s)
c_wchar_p('Hi, there')
 print(s) # first object is unchanged
Hello, World



However, c_s it's not getting Hi, there as the memory location it points 
to, otherwise next access will surely segfault.

OTOH, if it *does* change the memory location, but the value is cached locally, 
which is the point of letting it change the memory location? Shouldn't it raise 
AttributeError or something?

Thanks!

--
components: ctypes
messages: 170518
nosy: facundobatista
priority: normal
severity: normal
status: open
title: Assigning new values to instance of pointer types does not check validity
type: behavior
versions: Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15947
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com