Re: A question about fill_free_list(void) function

2009-07-02 Thread Gabriel Genellina
En Thu, 02 Jul 2009 07:55:42 -0300, Pedram escribió: On Jul 2, 1:11 pm, Peter Otten <__pete...@web.de> wrote: [snip explanation of strange pointer manipulations in the C code of the integer type] Oh, I got it! What a wonderful implementation! :o Well, I would not say it's "wonderful"...

Re: A question about fill_free_list(void) function

2009-07-02 Thread Pedram
On Jul 2, 1:11 pm, Peter Otten <__pete...@web.de> wrote: > Pedram wrote: > > On Jul 1, 10:01 pm, Christian Heimes wrote: > >> Pedram schrieb: > > >> > Hello community, > >> > I'm reading the CPython interpreter source code, > >> > first, if you have something that I should know for better reading

Re: A question about fill_free_list(void) function

2009-07-02 Thread Peter Otten
Pedram wrote: > On Jul 1, 10:01 pm, Christian Heimes wrote: >> Pedram schrieb: >> >> > Hello community, >> > I'm reading the CPython interpreter source code, >> > first, if you have something that I should know for better reading >> > this source code, I would much appreciate that :) >> > second,

Re: A question about fill_free_list(void) function

2009-07-01 Thread Pedram
On Jul 1, 10:01 pm, Christian Heimes wrote: > Pedram schrieb: > > > Hello community, > > I'm reading the CPython interpreter source code, > > first, if you have something that I should know for better reading > > this source code, I would much appreciate that :) > > second, in intobject.c file, I

Re: A question about fill_free_list(void) function

2009-07-01 Thread Christian Heimes
Pedram schrieb: > Hello community, > I'm reading the CPython interpreter source code, > first, if you have something that I should know for better reading > this source code, I would much appreciate that :) > second, in intobject.c file, I read the following code in > fill_free_list function that I

Re: A question about fill_free_list(void) function

2009-07-01 Thread Pedram
Oh... I got it! :) I found this line in ctypes.h: #define Py_TYPE(q) = ((PyObject *)(q))->ob_next; So those lines are trying to set the blocks type from rear to front. But I still don't know why after the while (when q is equal to p), the Py_TYPE(q) set to NULL! -- http://mail.python.org/mailman/