//TODO: professional stuff of software engineer 1001010
Tag Archives: plugin
Testing a C/C++ plugin to do syntax highlighting

Got a new wordpress plugin from http://alexgorbatchev.com/SyntaxHighlighter/, let’s see how it works, by drawing on a recent facepalm bug that existed for many years in the codebase..

#ifdef linux
struct SomePThreadContainer {
	pthread_mutex_t mutex;
	int other_data[32];
#define ODD_DATA_SIZE sizeof(SomePThreadContainer)
#define ODD_DATA_SIZE sizeof(HANDLE)
class OddWrapper {
	byte m_oddAbsraction[ODD_DATA_SIZE];
	void DoStuff();
class OddContainer {
	OddWrapper oddOne;
	bool b1;
	OddWrapper oddTwo;
	void VerifyOneWorksOnUse();
	void VerifyTwoFailsOnUse(); // but will work if b1 is changed from a bool to an int

Many bothans were NEEDLESSLY lost to bring you this bug. 🙂