Skip to content

Commit 0bd0823

Browse files
committed
update bee
1 parent 787c8fa commit 0bd0823

File tree

7 files changed

+14
-13
lines changed

7 files changed

+14
-13
lines changed

3rd/bee.lua

Submodule bee.lua updated 73 files

src/luadebug/rdebug_debughost.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ namespace luadebug::debughost {
151151
}
152152

153153
#if defined(_WIN32) && !defined(LUADBG_DISABLE)
154-
static bee::zstring_view to_strview(lua_State* hL, int idx) {
154+
static std::string_view to_strview(lua_State* hL, int idx) {
155155
size_t len = 0;
156156
const char* buf = luaL_checklstring(hL, idx, &len);
157157
return { buf, len };

src/luadebug/rdebug_visitor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include <algorithm>
66
#include <bitset>
7+
#include <cassert>
78
#include <limits>
89

910
#include "compat/internal.h"

src/luadebug/util/protected_area.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
#include <bee/nonstd/bit.h>
44
#include <bee/nonstd/to_underlying.h>
55
#include <bee/nonstd/unreachable.h>
6-
#include <bee/utility/zstring_view.h>
76

87
#include <stdexcept>
8+
#include <string_view>
99
#include <type_traits>
1010

1111
#include "rdebug_debughost.h"
@@ -97,7 +97,7 @@ namespace luadebug {
9797
}
9898
}
9999

100-
inline bee::zstring_view checkstring(luadbg_State*, int arg) {
100+
inline std::string_view checkstring(luadbg_State*, int arg) {
101101
size_t sz;
102102
const char* s = luadbg_tolstring(L, arg, &sz);
103103
if (!s) {

src/process_inject/windows/inject.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
#include <bee/lua/module.h>
33
#include <bee/lua/udata.h>
44
#include <bee/subprocess.h>
5-
#include <bee/utility/zstring_view.h>
65
#include <bee/win/wtf8.h>
76

87
#include <algorithm>
98
#include <lua.hpp>
9+
#include <string_view>
1010

1111
#include "injectdll.h"
1212

13-
static bee::zstring_view checkstrview(lua_State* L, int idx) {
13+
static std::string_view checkstrview(lua_State* L, int idx) {
1414
size_t len = 0;
1515
const char* buf = luaL_checklstring(L, idx, &len);
1616
return { buf, len };

src/process_inject/windows/injectdll.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static bool wow64_write_memory(uint64_t nwvm, HANDLE hProcess, uint64_t lpBaseAd
4949
return true;
5050
}
5151

52-
static bool injectdll_x64(HANDLE process_handle, HANDLE thread_handle, const std::wstring& dll, const bee::zstring_view& entry) {
52+
static bool injectdll_x64(HANDLE process_handle, HANDLE thread_handle, const std::wstring& dll, const std::string_view& entry) {
5353
static unsigned char sc[] = {
5454
0x9C, // pushfq
5555
0x0F, 0xA8, // push gs
@@ -195,7 +195,7 @@ static bool injectdll_x64(HANDLE process_handle, HANDLE thread_handle, const std
195195
return true;
196196
}
197197

198-
static bool injectdll_x86(HANDLE process_handle, HANDLE thread_handle, const std::wstring& dll, const bee::zstring_view& entry) {
198+
static bool injectdll_x86(HANDLE process_handle, HANDLE thread_handle, const std::wstring& dll, const std::string_view& entry) {
199199
static unsigned char sc[] = {
200200
0x68, 0x00, 0x00, 0x00, 0x00, // push eip
201201
0x9C, // pushfd
@@ -266,7 +266,7 @@ static bool injectdll_x86(HANDLE process_handle, HANDLE thread_handle, const std
266266
return true;
267267
}
268268

269-
bool injectdll(HANDLE process_handle, HANDLE thread_handle, const std::wstring& x86dll, const std::wstring& x64dll, const bee::zstring_view& entry) {
269+
bool injectdll(HANDLE process_handle, HANDLE thread_handle, const std::wstring& x86dll, const std::wstring& x64dll, const std::string_view& entry) {
270270
if (is_process64(process_handle)) {
271271
return !x64dll.empty() && injectdll_x64(process_handle, thread_handle, x64dll, entry);
272272
} else {
@@ -341,7 +341,7 @@ static bool openprocess(DWORD pid, DWORD process_access, DWORD thread_access, PR
341341
return true;
342342
}
343343

344-
bool injectdll(DWORD pid, const std::wstring& x86dll, const std::wstring& x64dll, const bee::zstring_view& entry) {
344+
bool injectdll(DWORD pid, const std::wstring& x86dll, const std::wstring& x64dll, const std::string_view& entry) {
345345
PROCESS_INFORMATION pi = { 0 };
346346
if (!openprocess(pid, PROCESS_ALL_ACCESS, THREAD_GET_CONTEXT | THREAD_SET_CONTEXT | THREAD_SUSPEND_RESUME, pi)) {
347347
return false;

src/process_inject/windows/injectdll.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
#endif
66

77
#include <Windows.h>
8-
#include <bee/utility/zstring_view.h>
98

109
#include <string>
10+
#include <string_view>
1111

12-
bool injectdll(HANDLE process_handle, HANDLE thread_handle, const std::wstring& x86dll, const std::wstring& x64dll, const bee::zstring_view& entry = 0);
13-
bool injectdll(DWORD pid, const std::wstring& x86dll, const std::wstring& x64dll, const bee::zstring_view& entry = 0);
12+
bool injectdll(HANDLE process_handle, HANDLE thread_handle, const std::wstring& x86dll, const std::wstring& x64dll, const std::string_view& entry = 0);
13+
bool injectdll(DWORD pid, const std::wstring& x86dll, const std::wstring& x64dll, const std::string_view& entry = 0);

0 commit comments

Comments
 (0)