FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pythonnet/src/runtime/Util.cs at master · attackgithub/pythonnet · GitHub
attackgithub
pythonnet
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
pythonnet
/
src
/
runtime
/
Util.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (31 loc) · 853 Bytes
Breadcrumbs
pythonnet
/
src
/
runtime
/
Util.cs
Copy path
File metadata and controls
33 lines (31 loc) · 853 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
27
28
29
30
31
32
33
using
System
;
using
System
.
Runtime
.
InteropServices
;
namespace
Python
.
Runtime
{
internal
class
Util
{
internal
static
Int64
ReadCLong
(
IntPtr
tp
,
int
offset
)
{
// On Windows, a C long is always 32 bits.
if
(
Runtime
.
IsWindows
||
Runtime
.
Is32Bit
)
{
return
Marshal
.
ReadInt32
(
tp
,
offset
)
;
}
else
{
return
Marshal
.
ReadInt64
(
tp
,
offset
)
;
}
}
internal
static
void
WriteCLong
(
IntPtr
type
,
int
offset
,
Int64
flags
)
{
if
(
Runtime
.
IsWindows
||
Runtime
.
Is32Bit
)
{
Marshal
.
WriteInt32
(
type
,
offset
,
(
Int32
)
(
flags
&
0xffffffffL
)
)
;
}
else
{
Marshal
.
WriteInt64
(
type
,
offset
,
flags
)
;
}
}
}
}
Back
|
FazBrowse Home
|
New Git URL