[issue9722] PyObject_Print with Visual Studio 2010

2010-08-31 Thread Krauzi

New submission from Krauzi krauzi_g...@yahoo.de:

Hi guys,
i recently found out that PyObject_Print is not working with Visual Studio 2010:


#include Python.h
#include iostream

int main( int argc, char** argv )
{
Py_Initialize();
PyObject_Print( PyUnicode_FromString(test), stdout, Py_PRINT_RAW );
Py_Finalize();

std::cin.get();
return EXIT_SUCCESS;
}

--
components: Interpreter Core, Windows
messages: 115256
nosy: Krauzi
priority: normal
severity: normal
status: open
title: PyObject_Print with Visual Studio 2010
type: crash
versions: Python 2.6, Python 2.7, Python 3.1

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



[issue9722] PyObject_Print with Visual Studio 2010

2010-08-31 Thread Krauzi

Krauzi krauzi_g...@yahoo.de 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 rep...@bugs.python.org
http://bugs.python.org/issue9722
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9107] PyModule_Create not working properly

2010-06-28 Thread Krauzi

New submission from Krauzi krauzi_g...@yahoo.de:

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 
PyModule_Create [+ PyImport_AddModule]).
I looked into the source but everything seems correct there.

The code worked neither Visual Studio 2010 nor on 2008.

--
components: None
messages: 108855
nosy: Krauzi
priority: normal
severity: normal
status: open
title: PyModule_Create not working properly
versions: Python 3.1

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



[issue8368] Memory leak on multi-threaded PyObject_CallObject

2010-04-11 Thread Krauzi

New submission from Krauzi krauzi_g...@yahoo.de:

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 threads so you have to 
recompile when using linux (makefile not included). 500 thread calls result in 
a memory leak of about 1 MB.

--
files: Python Bug.zip
messages: 102832
nosy: Krauzi
severity: normal
status: open
title: Memory leak on multi-threaded PyObject_CallObject
versions: Python 2.6
Added file: http://bugs.python.org/file16868/Python Bug.zip

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



[issue8368] Memory leak on multi-threaded PyObject_CallObject

2010-04-11 Thread Krauzi

Krauzi krauzi_g...@yahoo.de 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.

--

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



[issue8368] Memory leak on multi-threaded PyObject_CallObject

2010-04-11 Thread Krauzi

Krauzi krauzi_g...@yahoo.de 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 rep...@bugs.python.org
http://bugs.python.org/issue8368
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8368] Memory leak on multi-threaded PyObject_CallObject

2010-04-11 Thread Krauzi

Changes by Krauzi krauzi_g...@yahoo.de:


Removed file: http://bugs.python.org/file16868/Python Bug.zip

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



[issue8368] Memory leak on multi-threaded PyObject_CallObject

2010-04-11 Thread Krauzi

Krauzi krauzi_g...@yahoo.de added the comment:

oh no then it's a windows bug. Now i understand why many devs use linux instead 
of windows..

--

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



[issue8368] Memory leak on multi-threaded PyObject_CallObject

2010-04-11 Thread Krauzi

Krauzi krauzi_g...@yahoo.de 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 the second pause. In may case its 3,9 MB at this point. THIS is what i 
mean with the leak. On my computer on about 3-35000 calls i pass the 4 MB 
border.

--

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



[issue8336] PyObject_CallObject - Not reference-count-neutral

2010-04-08 Thread Krauzi

Krauzi krauzi_g...@yahoo.de 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: http://www.copypastecode.com/26047/
Python Script imported by it: http://www.copypastecode.com/26051/
Now the results:
With raise in python script:
http://img251.imageshack.us/img251/997/witherror.jpg
and with uncommented raise:
http://img256.imageshack.us/img256/2818/noerror.jpg

Hope its now clear.

Krauzi

--

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



[issue8336] PyObject_CallObject - Not reference-count-neutral

2010-04-07 Thread Krauzi

New submission from Krauzi krauzi_g...@yahoo.de:

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 this?

Cheers Krauzi.

--
assignee: georg.brandl
components: Documentation
messages: 102557
nosy: Krauzi, georg.brandl
severity: normal
status: open
title: PyObject_CallObject - Not reference-count-neutral
versions: Python 2.6

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