[issue9722] PyObject_Print with Visual Studio 2010

2010-08-31 Thread Krauzi
New submission from Krauzi : Hi guys, i recently found out that PyObject_Print is not working with Visual Studio 2010: #include #include int main( int argc, char** argv ) { Py_Initialize(); PyObject_Print( PyUnicode_FromString("test"), stdout, Py_PRINT_RAW ); P

[issue9722] PyObject_Print with Visual Studio 2010

2010-08-31 Thread Krauzi
Krauzi added the comment: i used the one from python.org. I cant build python with VC2010 because it cant convert the project from VC2008 to VC2010. -- ___ Python tracker <http://bugs.python.org/issue9

[issue8336] PyObject_CallObject - Not "reference-count-neutral"

2010-04-07 Thread Krauzi
New submission from Krauzi : In the docs there is written: "PyObject_CallObject() is “reference-count-neutral” with respect to its arguments." This is not correct. Its only reference-count neutral if the call was SUCCESSFUL otherwise the argument is INCREFED! Can anyone confirm thi

[issue8336] PyObject_CallObject - Not "reference-count-neutral"

2010-04-08 Thread Krauzi
Krauzi added the comment: a i think i expressed the problem false. The problem is that the arg (which is a tuple here) is correctly decremented and thus the reference counts are OK. BUT: The objects INSIDE the tuple are NOT correctly decremented. This is the code i've used: C++ Program:

[issue8368] Memory leak on multi-threaded PyObject_CallObject

2010-04-11 Thread Krauzi
New submission from Krauzi : Hi guys, i think this is a bug and Matt from h...@python.org suggested me to report it here: I attached a sample project where the memory leak occurs.I created a sample project where the memory leak occurs. It's a visual studio 2008 project and uses windows th

[issue8368] Memory leak on multi-threaded PyObject_CallObject

2010-04-11 Thread Krauzi
Krauzi added the comment: i think the PyObject_Call* is the problem because when i comment it out, i do not longer get leaks. The arguments are also correctly decremented because i also can use NULL as argument and i get the same mem leaks like before

[issue8368] Memory leak on multi-threaded PyObject_CallObject

2010-04-11 Thread Krauzi
Krauzi added the comment: kay updated the code. Please use this: http://paste.pocoo.org/show/200484/ smaller code but problem still the same. -- ___ Python tracker <http://bugs.python.org/issue8

[issue8368] Memory leak on multi-threaded PyObject_CallObject

2010-04-11 Thread Krauzi
Changes by Krauzi : Removed file: http://bugs.python.org/file16868/Python Bug.zip ___ Python tracker <http://bugs.python.org/issue8368> ___ ___ Python-bugs-list mailin

[issue8368] Memory leak on multi-threaded PyObject_CallObject

2010-04-11 Thread Krauzi
Krauzi added the comment: oh no then it's a windows bug. Now i understand why many devs use linux instead of windows.. -- ___ Python tracker <http://bugs.python.org/i

[issue8368] Memory leak on multi-threaded PyObject_CallObject

2010-04-11 Thread Krauzi
Krauzi added the comment: ah no you misunderstood me. Please add a system("pause") and a system("pause") at the beginning of the while(1)-loop and one at the end. Then compare the memory usage of the program at the beginning (lets say it's 2,6 MB) with the usage at

[issue9107] PyModule_Create not working properly

2010-06-28 Thread Krauzi
New submission from Krauzi : Hi guys i have a big problem with my code: PyModule_Create doesnt add any methods to the module (all methods are correctly added to the PyMethodDef structure respective the PyModuleDef). With python 2.6.5 everything works well (Py_InitModule used instead of