$ nm build/lib.macosx-10.4-x86_64-3.2-pydebug/datetime.so | grep
_PyTime_DoubleToTimet
000000000000f4e2 T __PyTime_DoubleToTimet
$ nm build/lib.macosx-10.4-x86_64-3.2-pydebug/time.so | grep
_PyTime_DoubleToTimet
0000000000000996 T __PyTime_DoubleToTimet

I have two questions: 1) how does this happen;

'T' means "defined in text segment", so it looks like the code is included twice. And indeed, it is:

exts.append( Extension('time', ['timemodule.c'],
                               libraries=math_libs) )
exts.append( Extension('datetime', ['datetimemodule.c', 'timemodule.c'],
                               libraries=math_libs) )

> and 2) is this intentional?


This was added with

------------------------------------------------------------------------
r36221 | bcannon | 2004-06-24 03:38:47 +0200 (Do, 24. Jun 2004) | 3 Zeilen

Add compilation of timemodule.c with datetimemodule.c to get
__PyTime_DoubleToTimet().

------------------------------------------------------------------------

So it's clearly intentional. I doubt its desirable, though. If only
__PyTime_DoubleToTimet needs to be duplicated, I'd rather put that
function into a separate C file that gets included twice, instead of including the full timemodule.c into datetimemodule.c.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to