C++ bindings needed to use system_allocator's free() too
This commit is contained in:
parent
6bffacefaf
commit
759fbe77e5
2 changed files with 7 additions and 1 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#define HAMMER_HAMMER__HPP
|
||||
|
||||
#include "../../../hammer.h"
|
||||
#include "../../../internal.h"
|
||||
#include <string>
|
||||
#include <stdint.h>
|
||||
#include <cstdarg>
|
||||
|
|
@ -49,7 +50,7 @@ namespace hammer {
|
|||
std::string asUnambiguous() {
|
||||
char* buf = h_write_result_unamb(token);
|
||||
std::string s = std::string(buf);
|
||||
free(buf);
|
||||
(&system_allocator)->free(&system_allocator, buf);
|
||||
return s;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue