A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-September/028900.html below:

[Python-Dev] Assign to errno allowed?

[Python-Dev] Assign to errno allowed? [Python-Dev] Assign to errno allowed?Barry Scott barry@barrys-emacs.org
Tue, 24 Sep 2002 20:10:31 +0100
Windows CE prevents assignment to errno...

There would be a solution if you compiled all the code as C++.
(Assuming that C++ reserved words are not used in the python code.)

Inject the following definitions:


	class ErrnoHack
		{
	public:
		operator int();	// return errno value
		operator =( int ); // assign to errno
		};

	ErrnoHack ErrnoObject

	#define errno ErrnoObject

and you can then write

	errno = 0;



BArry





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