- Make the autosegs read-only.

- Derive PClass from dobject.cpp. This has one major ramification: Since the PClass
  is not allocated until runtime, you cannot initialize any static/global data
  structures with pointers to PClasses using RUNTIME_CLASS. Attempting to do so
  will just initialize with a NULL pointer. Instead, you can initialize using
  the address of the pointer returned by RUNTIME_CLASS and dereference that. By
  the time you have an opportunity to dereference it, it will no longer be NULL.
- Sync CmakeLists.txt.
- Random fixes for problems GCC spotted.

SVN r1852 (scripting)
This commit is contained in:
Randy Heit 2009-09-17 01:36:14 +00:00
commit 1eb7912bd8
35 changed files with 258 additions and 207 deletions

View file

@ -37,34 +37,31 @@
#if defined(_MSC_VER)
#pragma data_seg(".areg$z")
void *ARegTail = 0;
#pragma section(".areg$z",read)
__declspec(allocate(".areg$z")) void *const ARegTail = 0;
#pragma data_seg(".creg$z")
void *CRegTail = 0;
#pragma section(".creg$z",read)
__declspec(allocate(".creg$z")) void *const CRegTail = 0;
#pragma data_seg(".greg$z")
void *GRegTail = 0;
#pragma section(".greg$z",read)
__declspec(allocate(".greg$z")) void *const GRegTail = 0;
#pragma data_seg(".mreg$z")
void *MRegTail = 0;
#pragma data_seg(".yreg$z")
void *YRegTail = 0;
#pragma data_seg()
#pragma section(".mreg$z",read)
__declspec(allocate(".mreg$z")) void *const MRegTail = 0;
#pragma section(".yreg$z",read)
__declspec(allocate(".yreg$z")) void *const YRegTail = 0;
#elif defined(__GNUC__)
#include "doomtype.h"
void *ARegTail __attribute__((section(SECTION_AREG))) = 0;
void *CRegTail __attribute__((section(SECTION_CREG))) = 0;
void *GRegTail __attribute__((section(SECTION_GREG))) = 0;
void *MRegTail __attribute__((section(SECTION_MREG))) = 0;
void *YRegTail __attribute__((section(SECTION_YREG))) = 0;
void *const ARegTail __attribute__((section(SECTION_AREG))) = 0;
void *const CRegTail __attribute__((section(SECTION_CREG))) = 0;
void *const GRegTail __attribute__((section(SECTION_GREG))) = 0;
void *const MRegTail __attribute__((section(SECTION_MREG))) = 0;
void *const YRegTail __attribute__((section(SECTION_YREG))) = 0;
#else