[issue29039] Segmentation fault when using PyUnicode_FromString

2016-12-21 Thread Matteo Cafasso
New submission from Matteo Cafasso: The following code snippet: -- #include #include int main() { char *broken_string[8]; char broken_char = 4294967252; sprintf(broken_string, "%c", broken_char); PyUnicode_FromString(bro

[issue19185] Allow multiprocessing Pool initializer to return values

2013-10-21 Thread Matteo Cafasso
Matteo Cafasso added the comment: On 09/10/13 22:59, Richard Oudkerk wrote: Yes. But my point was that somebody might have used such a function as the initializer argument. The proposed change would break a program which does with Pool(initializer=os.nice, initargs=(incr,)) as p

[issue19185] Allow multiprocessing Pool initializer to return values

2013-10-09 Thread Matteo Cafasso
Matteo Cafasso added the comment: On 07/10/13 13:32, Richard Oudkerk wrote: Richard Oudkerk added the comment: I think misuse is an exageration. Various functions change some state and return a value that is usually ignored, e.g. os.umask(), signal.signal(). These functions are compliant

[issue19185] Allow multiprocessing Pool initializer to return values

2013-10-07 Thread Matteo Cafasso
Matteo Cafasso added the comment: I agree with your point, I've probably made my considerations too quickly. The consideration was based on the fact that returning any value previously was a misuse (without consequences) of the initializer itself. Now the misuse would be exposed by the new

[issue19185] Allow multiprocessing Pool initializer to return values

2013-10-06 Thread Matteo Cafasso
New submission from Matteo Cafasso: This patch allows the pool initializer function to return the initialized values. The returned values will be passed to the called function as first positional argument. Previously the common pattern was to store the initialized objects into global