-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed
intptr_union
to struct type, added shared pointer to struct
Changing `intptr_union` to a struct was necessary as `std::shared_ptr` cannot be constructed/destructed in unions. This change will not leak any memory, but now `intptr_union` is now larger so parsing will take up more memory.
- Loading branch information
Showing
3 changed files
with
36 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
#pragma once | ||
|
||
#include <memory> | ||
|
||
/* Type declarations for portability. They work for DEC's Alpha (64 bits) | ||
and 32 bit machines */ | ||
|
||
typedef int int32; | ||
typedef unsigned int uint32; | ||
typedef union {int i; void* p;} intptr_union; | ||
typedef struct { | ||
int i; | ||
void *p; | ||
std::shared_ptr<char> s; | ||
} intptr_union; |