-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathvroot.cpp
36 lines (29 loc) · 1.46 KB
/
vroot.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <stdio.h>
#include <string>
#include "roothide.h"
#include "common.h"
#define VROOT_API_NAME(NAME) vroot_##NAME
#define VROOTAT_API_NAME(NAME) vroot_##NAME
using namespace std;
extern "C" {
void* _ZNSt3__114basic_ifstreamIcNS_11char_traitsIcEEE4openEPKcj(void* thiz, const char* __s, unsigned int mode);
void* _ZNSt3__114basic_ofstreamIcNS_11char_traitsIcEEE4openEPKcj(void* thiz, const char* __s, unsigned int mode);
void* _ZNSt3__114basic_ifstreamIcNS_11char_traitsIcEEE4openERKNS_12basic_stringIcS2_NS_9allocatorIcEEEEj(void* thiz, string* __s, unsigned int mode);
void* _ZNSt3__114basic_ofstreamIcNS_11char_traitsIcEEE4openERKNS_12basic_stringIcS2_NS_9allocatorIcEEEEj(void* thiz, string* __s, unsigned int mode);
EXPORT
void* VROOT_API_NAME(_ZNSt3__114basic_ifstreamIcNS_11char_traitsIcEEE4openERKNS_12basic_stringIcS2_NS_9allocatorIcEEEEj)(void* thiz, string* __s, unsigned int mode)
{
char* newpath = (char*)jbroot_alloc(__s->c_str());
void* ret = _ZNSt3__114basic_ifstreamIcNS_11char_traitsIcEEE4openEPKcj(thiz,newpath,mode);
if(newpath) free((void*)newpath);
return ret;
}
EXPORT
void* VROOT_API_NAME(_ZNSt3__114basic_ofstreamIcNS_11char_traitsIcEEE4openERKNS_12basic_stringIcS2_NS_9allocatorIcEEEEj)(void* thiz, string* __s, unsigned int mode)
{
char* newpath = (char*)jbroot_alloc(__s->c_str());
void* ret = _ZNSt3__114basic_ofstreamIcNS_11char_traitsIcEEE4openEPKcj(thiz,newpath,mode);
if(newpath) free((void*)newpath);
return ret;
}
}