-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extended type support for c_loader, improve search of headers and lib…
…raries for c_loader, assuming now they are not in the same folder, add test with support for pointers to pointers in c_loader.
- Loading branch information
Showing
7 changed files
with
165 additions
and
14 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 was deleted.
Oops, something went wrong.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#include "loadtest.h" | ||
#include <cstdint> | ||
#include <vector> | ||
|
||
long call_cpp_func(void) | ||
{ | ||
std::vector<int> v = { 7, 323, 14, 8 }; | ||
|
||
return v[1]; | ||
} | ||
|
||
int pair_list_init(pair_list **t) | ||
{ | ||
static const uint32_t size = 3; | ||
|
||
*t = new pair_list(); | ||
|
||
(*t)->size = size; | ||
(*t)->pairs = new pair[(*t)->size]; | ||
|
||
for (uint32_t i = 0; i < size; ++i) | ||
{ | ||
(*t)->pairs[i].i = i; | ||
(*t)->pairs[i].d = (double)(((double)i) * 1.0); | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
double pair_list_value(pair_list *t, uint32_t id) | ||
{ | ||
return t->pairs[id].d; | ||
} | ||
|
||
void pair_list_destroy(pair_list *t) | ||
{ | ||
delete[] t->pairs; | ||
delete t; | ||
} |
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