[Python-Dev] _PyString_InsertThousandsGrouping()

Eli Bendersky eliben at gmail.com
Thu May 23 06:09:50 CEST 2013


On Wed, May 22, 2013 at 8:53 PM, Carlos Nepomuceno <
carlosnepomuceno at outlook.com> wrote:

> Hi guys!
>
> Can someone explain to me where in the CPython 2.7.5 source code is
> _PyString_InsertThousandsGrouping() implemented?
>
> I've found the following declaration in 'Objects/stringobject.c' but it
> just defines _Py_InsertThousandsGrouping() as
> _PyString_InsertThousandsGrouping():
>
> "#define _Py_InsertThousandsGrouping _PyString_InsertThousandsGrouping"
>
> I'm looking for the opposite!
>

No, you aren't :-)

#define _Py_InsertThousandsGrouping _PyString_InsertThousandsGrouping
#include "stringlib/localeutil.h"

Now look inside "stringlib/localeutil.h" and think what the pre-processor
does with the function definition having the #define above.

Eli



>
> I don't even know how that doesn't cause an error! What's the trick?
>
> Thanks in advance.
>
> Carlos
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/eliben%40gmail.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20130522/fee8dc2a/attachment.html>


More information about the Python-Dev mailing list