GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • [ date ]
  • [ thread ]
  • [ subject ]
  • [ author ]

This view

  • Original page
  • New address

GeezerVison is showing mail.python.org — [Python-Dev] Why is type_modified() in typeobject.c not a public function?

[Python-Dev] Why is type_modified() in typeobject.c not a public function?

Christian Heimes lists at cheimes.de
Wed May 28 13:43:46 CEST 2008

  • Previous message: [Python-Dev] Why is type_modified() in typeobject.c not a public function?
  • Next message: [Python-Dev] Why is type_modified() in typeobject.c not a public function?
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

Stefan Behnel schrieb:
> Straight forward patch is attached (against 3.0a5). Works for me in Cython. I
> thought about a name like "Taint(t)" or "ClearTypeCache(t)", but then went
> with the coward solution of calling the function PyType_Modified() as it was
> (almost) named internally.
> 
> BTW, I noticed that the code in typeobject.c uses "DECREF before set" two
> times, like this:
> 
> 		method_cache[h].version = type->tp_version_tag;
> 		method_cache[h].value = res;  /* borrowed */
> 		Py_INCREF(name);
> 		Py_DECREF(method_cache[h].name);
> 		method_cache[h].name = name;
> 
> During the call to Py_DECREF, the cache content is incorrect, so can't this
> run into the same problem that Py_CLEAR() aims to solve? I attached a patch
> for that, too, just in case.

Please create two tickets in the bug tracker and append the patches.

Christian

  • Previous message: [Python-Dev] Why is type_modified() in typeobject.c not a public function?
  • Next message: [Python-Dev] Why is type_modified() in typeobject.c not a public function?
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

More information about the Python-Dev mailing list
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.