A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2010-June/100586.html below:

[Python-Dev] Sharing functions between C extension modules in stdlib

[Python-Dev] Sharing functions between C extension modules in stdlibAlexander Belopolsky alexander.belopolsky at gmail.com
Tue Jun 15 01:00:19 CEST 2010
On Mon, Jun 14, 2010 at 6:45 PM, Alexander Belopolsky
<alexander.belopolsky at gmail.com> wrote:
..
> I did not expect this to work, but apparently the build machinery
> somehow knows how to place _PyTime_DoubleToTimet code in both time.so
> and datetime.so:
..
> I have two questions: 1) how does this happen; and 2) is this intentional?
>

OK, the answer to the first question is simple: in setup.py, we have

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

but if timemodule.c is compiled-in with datetime module, why is does
it also need to be imported to share some other code?
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4