On Jul 7, 1:10 pm, Mark Dickinson wrote:
> On Jul 6, 4:13 pm, Pedram wrote:
>
>
>
> > On Jul 6, 5:46 pm, Mark Dickinson wrote:
> > > On Jul 6, 1:24 pm, Pedram wrote:
>
> > > > OK, fine, I read longobject.c at last! :)
> > > > I found that
Hello Mr. Dickinson. Glad to see you again :)
On Jul 6, 5:46 pm, Mark Dickinson wrote:
> On Jul 6, 1:24 pm, Pedram wrote:
>
> > OK, fine, I read longobject.c at last! :)
> > I found that longobject is a structure like this:
>
> > struct _longobject {
>
OK, fine, I read longobject.c at last! :)
I found that longobject is a structure like this:
struct _longobject {
struct _object *_ob_next;
struct _object *_ob_prev;
Py_ssize_t ob_refcnt;
struct _typeobject *ob_type;
digit ob_digit[1];
}
And a digit is a 15-item array of C's un
On Jul 5, 8:32 pm, Pedram wrote:
> On Jul 5, 8:12 pm, a...@pythoncraft.com (Aahz) wrote:
>
>
>
> > In article
> > <6f6be2b9-49f4-4db0-9c21-52062d8ea...@l31g2000yqb.googlegroups.com>,
>
> > Pedram wrote:
>
> > >This time I have a simple C
On Jul 5, 8:12 pm, a...@pythoncraft.com (Aahz) wrote:
> In article
> <6f6be2b9-49f4-4db0-9c21-52062d8ea...@l31g2000yqb.googlegroups.com>,
>
>
>
> Pedram wrote:
>
> >This time I have a simple C question!
> >As you know, _PyLong_New returns the
Hello again,
This time I have a simple C question!
As you know, _PyLong_New returns the result of PyObject_NEW_VAR. I
found PyObject_NEW_VAR in objimpl.h header file. But I can't
understand the last line :( Here's the code:
#define PyObject_NEW_VAR(type, typeobj, n) \
( (type *) PyObject_InitVar(
7;s a bit more
> complicated because small integers are cached.)
Oh, I didn't see long_as_number before. I'm reading it. That was very
helpful, thanks.
> If you have more specific questions I'll have a go at answering them.
>
> Mark
Thank you a million.
I will write yo
On Jul 5, 1:57 pm, Mark Dickinson wrote:
> On Jul 5, 8:38 am, Pedram wrote:
>
> > Hello,
> > I'm reading about implementation of long ints in Python. I downloaded
> > the source code of CPython and will read the longobject.c, but from
> > where I should st
Hello,
I'm reading about implementation of long ints in Python. I downloaded
the source code of CPython and will read the longobject.c, but from
where I should start reading this file? I mean which function is the
first?
Anyone can help?
Thanks
Pedram
--
http://mail.python.org/mailman/lis
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,
> >> >
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 :)
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/
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 couldn't understand:
while
13 matches
Mail list logo