FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
SMExt-SourceScramble/native_utils.cpp at master · nosoop/SMExt-SourceScramble · GitHub
nosoop
/
SMExt-SourceScramble
Public
Notifications
You must be signed in to change notification settings
Fork
16
Star
110
Code
Issues
7
Pull requests
1
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
SMExt-SourceScramble
/
native_utils.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
26 lines (23 loc) · 889 Bytes
Breadcrumbs
SMExt-SourceScramble
/
native_utils.cpp
Copy path
File metadata and controls
26 lines (23 loc) · 889 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#
include
"
extension.h
"
cell_t
sm_CellRefToAddress
(IPluginContext *pContext,
const
cell_t
*params) {
#
ifndef
PLATFORM_64BITS
cell_t
* value;
if
(pContext->
LocalToPhysAddr
(params[
1
], &value) !=
SP_ERROR_NONE
) {
return
pContext->
ThrowNativeError
(
"
Failed to convert cell reference to address.
"
);
}
return
reinterpret_cast
<
intptr_t
>(value);
#
else
return
pContext->
ThrowNativeError
(
"
GetAddressOfCell is not implemented for 64-bit platforms
"
);
#
endif
}
cell_t
sm_CharArrayToAddress
(IPluginContext *pContext,
const
cell_t
*params) {
#
ifndef
PLATFORM_64BITS
char
* buffer;
if
(pContext->
LocalToString
(params[
1
], &buffer) !=
SP_ERROR_NONE
) {
return
pContext->
ThrowNativeError
(
"
Failed to convert string reference to address.
"
);
}
return
reinterpret_cast
<
intptr_t
>(buffer);
#
else
return
pContext->
ThrowNativeError
(
"
GetAddressOfString is not implemented for 64-bit platforms
"
);
#
endif
}
Back
|
FazBrowse Home
|
New Git URL