A RetroSearch Logo

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

Search Query:

Showing content from http://www.python.org/pipermail/python-dev/2000-July/005873.html below:

[Python-Dev] os.spawnv problem

[Python-Dev] os.spawnv problemFredrik Lundh Fredrik Lundh" <effbot@telia.com
Sun, 9 Jul 2000 15:12:04 +0200
I wrote:
> according to posixmodule.c (trent?), they return an
> intptr_t.
>=20
> unfortunately, this little change causes some inter-
> resting problems; spawnv tells me that my program
> returns the following exit code:
>=20
>     2167387144924954624
>=20
> or, in another base:
>=20
>      0x1E141B2000000000L
>=20
> unless anyone can explain what those upper bit mean,
> and why they are relevant, I suggest casting the return
> code down to an int.

nevermind; I found the problem: the preprocessor doesn't
complain if you're comparing variables that doesn't exist,
so the following code didn't quite do what the programmer
had expected:

#if SIZEOF_LONG =3D=3D SIZE_VOID_P
  return Py_BuildValue("l", spawnval);
#else
  return Py_BuildValue("L", spawnval);
#endif

(SIZE_VOID_P is not defined, and you cannot really expect
Py_BuildValue to do the right thing if spawnval is an integer).

patch coming.

</F>




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