diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1992-08-13 14:13:11 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1992-08-13 14:13:11 (GMT) |
commit | 743db36cd208c6f212a6b534e6bb8ee9256505ad (patch) | |
tree | 4fd1cb1b4cfd05d3f6962df90b563cd71641a680 /Modules/cstubs | |
parent | 1738388c59c0fb727f73024e469aae59dda43ae7 (diff) | |
download | cpython-743db36cd208c6f212a6b534e6bb8ee9256505ad.zip cpython-743db36cd208c6f212a6b534e6bb8ee9256505ad.tar.gz cpython-743db36cd208c6f212a6b534e6bb8ee9256505ad.tar.bz2 |
Modified to allow other threads to run in a multithreaded environment.
Diffstat (limited to 'Modules/cstubs')
-rw-r--r-- | Modules/cstubs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Modules/cstubs b/Modules/cstubs index 89ac69d..bbb3a10 100644 --- a/Modules/cstubs +++ b/Modules/cstubs @@ -25,6 +25,11 @@ Each definition must be contained on one line: N*retval */ +/* + * An attempt has been made to make this module switch threads on qread + * calls. It is far from safe, though. + */ + #include <gl.h> #include <device.h> @@ -32,6 +37,7 @@ Each definition must be contained on one line: #include "import.h" #include "modsupport.h" #include "cgensupport.h" +#include "ceval.h" /* Some stubs are too complicated for the stub generator. @@ -40,6 +46,27 @@ A line starting with '%' gives the name of the function so the stub generator can include it in the table of functions. */ +% qread + +static object * +gl_qread(self, args) + object *self; + object *args; +{ + long retval; + short arg1 ; + BGN_SAVE + retval = qread( & arg1 ); + END_SAVE + { object *v = newtupleobject( 2 ); + if (v == NULL) return NULL; + settupleitem(v, 0, mknewlongobject(retval)); + settupleitem(v, 1, mknewshortobject(arg1)); + return v; + } +} + + /* varray -- an array of v.. calls. The argument is an array (maybe list or tuple) of points. |