Skip to content

Commit

Permalink
Merge pull request #2969 from yebblies/mangleobj
Browse files Browse the repository at this point in the history
[DDMD] Store RootObjects, not void*
  • Loading branch information
Iain Buclaw committed Dec 15, 2013
2 parents f911119 + bbb4ebc commit 9b85caa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 0 additions & 2 deletions src/arraytypes.h
Expand Up @@ -72,8 +72,6 @@ typedef Array<class TemplateInstance> TemplateInstances;

//typedef Array<char> Strings;

typedef Array<void> Voids;

typedef Array<struct block> Blocks;

typedef Array<struct Symbol> Symbols;
Expand Down
18 changes: 9 additions & 9 deletions src/cppmangle.c
Expand Up @@ -41,17 +41,17 @@

struct CppMangleState
{
static Voids components;
static Objects components;

int substitute(OutBuffer *buf, void *p);
int exist(void *p);
void store(void *p);
int substitute(OutBuffer *buf, RootObject *p);
int exist(RootObject *p);
void store(RootObject *p);
};

Voids CppMangleState::components;
Objects CppMangleState::components;


void writeBase36(OutBuffer *buf, unsigned i)
void writeBase36(OutBuffer *buf, size_t i)
{
if (i >= 36)
{
Expand All @@ -66,7 +66,7 @@ void writeBase36(OutBuffer *buf, unsigned i)
assert(0);
}

int CppMangleState::substitute(OutBuffer *buf, void *p)
int CppMangleState::substitute(OutBuffer *buf, RootObject *p)
{
for (size_t i = 0; i < components.dim; i++)
{
Expand All @@ -85,7 +85,7 @@ int CppMangleState::substitute(OutBuffer *buf, void *p)
return 0;
}

int CppMangleState::exist(void *p)
int CppMangleState::exist(RootObject *p)
{
for (size_t i = 0; i < components.dim; i++)
{
Expand All @@ -97,7 +97,7 @@ int CppMangleState::exist(void *p)
return 0;
}

void CppMangleState::store(void *p)
void CppMangleState::store(RootObject *p)
{
components.push(p);
}
Expand Down

0 comments on commit 9b85caa

Please sign in to comment.