cpython-extension.git
11 years agospammify.c: Require a certain count instead of elapsed time
W. Trevor King [Wed, 17 Apr 2013 16:07:19 +0000 (12:07 -0400)]
spammify.c: Require a certain count instead of elapsed time

Increasing the number of threads time sharing on the same core does
not increase total execution time if the threads are only checking for
elapsed time.  We need them to actually *do* something.

11 years agospammify.c: Convert spam.system to spam.busy for a GIL-less wait
W. Trevor King [Wed, 17 Apr 2013 15:58:21 +0000 (11:58 -0400)]
spammify.c: Convert spam.system to spam.busy for a GIL-less wait

I want to see if GIL-dropping commands will use several cores.

11 years agosetup.py: Oops, the module name is 'spam' not 'spammify'
W. Trevor King [Wed, 17 Apr 2013 15:45:11 +0000 (11:45 -0400)]
setup.py: Oops, the module name is 'spam' not 'spammify'

With the old version you get:

  ImportError: dynamic module does not define init function (PyInit_spammify)

11 years agospammify.c: Replace spam_doc with NULL
W. Trevor King [Wed, 17 Apr 2013 15:42:54 +0000 (11:42 -0400)]
spammify.c: Replace spam_doc with NULL

We're not interested in setting a module docstring here.

11 years agosetup.py: Add basic setup.py for a C extension
W. Trevor King [Wed, 17 Apr 2013 15:41:05 +0000 (11:41 -0400)]
setup.py: Add basic setup.py for a C extension

Tweaked from http://docs.python.org/3/extending/building.html#building

11 years agospammify.c: Add the basic extension code
W. Trevor King [Wed, 17 Apr 2013 15:39:29 +0000 (11:39 -0400)]
spammify.c: Add the basic extension code

From http://docs.python.org/3/extending/extending.html