mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-12 17:25:49 +00:00
Use pointertype where appropriate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1392 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -236,14 +236,14 @@ bool Interpreter::callMethod(const string &Name) {
|
|||||||
|
|
||||||
static void *CreateArgv(const vector<string> &InputArgv) {
|
static void *CreateArgv(const vector<string> &InputArgv) {
|
||||||
// Pointers are 64 bits...
|
// Pointers are 64 bits...
|
||||||
uint64_t *Result = new uint64_t[InputArgv.size()+1];
|
uint64_t *Result = new PointerTy[InputArgv.size()+1];
|
||||||
|
|
||||||
for (unsigned i = 0; i < InputArgv.size(); ++i) {
|
for (unsigned i = 0; i < InputArgv.size(); ++i) {
|
||||||
unsigned Size = InputArgv[i].size()+1;
|
unsigned Size = InputArgv[i].size()+1;
|
||||||
char *Dest = new char[Size];
|
char *Dest = new char[Size];
|
||||||
copy(InputArgv[i].begin(), InputArgv[i].end(), Dest);
|
copy(InputArgv[i].begin(), InputArgv[i].end(), Dest);
|
||||||
Dest[Size-1] = 0;
|
Dest[Size-1] = 0;
|
||||||
Result[i] = (uint64_t)Dest;
|
Result[i] = (PointerTy)Dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result[InputArgv.size()] = 0;
|
Result[InputArgv.size()] = 0;
|
||||||
|
Reference in New Issue
Block a user