[farther OT] Re: Why Is Escaping Data Considered So Magical?
Lawrence D'Oliveiro
ldo at geek-central.gen.new_zealand
Sat Jul 3 21:23:21 EDT 2010
In message <mailman.182.1278126257.1673.python-list at python.org>, Rami
Chowdhury wrote:
> I'm sorry, perhaps you've misunderstood what I was refuting. You posted:
>> >> macro:
>> >> #define Descr(v) &v, sizeof v
>> >>
>> >> As written, this works whatever the type of v: array, struct,
>> >> whatever.
>
> With my code example I found that, as others have pointed out,
> unfortunately it doesn't work if v is a pointer to a heap-allocated area.
It still correctly passes the address and size of that pointer variable. It
that’s not what you intended, you shouldn’t use it.
More information about the Python-list
mailing list