Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Root
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
为了安全,强烈建议开启2FA双因子认证:User Settings -> Account -> Enable two-factor authentication!!!
Show more breadcrumbs
cxwx
Root
Commits
2e618321
Commit
2e618321
authored
10 years ago
by
martell
Committed by
Axel Naumann
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
use size_t for void pointer cast
parent
761601fc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
interpreter/cling/include/cling/Interpreter/Value.h
+4
-2
4 additions, 2 deletions
interpreter/cling/include/cling/Interpreter/Value.h
with
4 additions
and
2 deletions
interpreter/cling/include/cling/Interpreter/Value.h
+
4
−
2
View file @
2e618321
...
...
@@ -10,6 +10,8 @@
#ifndef CLING_VALUE_H
#define CLING_VALUE_H
#include
<stddef.h>
namespace
llvm
{
class
raw_ostream
;
}
...
...
@@ -101,7 +103,7 @@ namespace cling {
case
kLongDoubleType
:
return
(
T
)
V
.
getAs
<
long
double
>
();
case
kPointerType
:
return
(
T
)
(
unsigned
long
)
V
.
getAs
<
void
*>
();
return
(
T
)
(
size_t
)
V
.
getAs
<
void
*>
();
case
kUnsupportedType
:
V
.
AssertOnUnsupportedTypeCast
();
}
...
...
@@ -115,7 +117,7 @@ namespace cling {
EStorageType
storageType
=
V
.
getStorageType
();
switch
(
storageType
)
{
case
kPointerType
:
return
(
T
*
)
(
unsigned
long
)
V
.
getAs
<
void
*>
();
return
(
T
*
)
(
size_t
)
V
.
getAs
<
void
*>
();
default:
V
.
AssertOnUnsupportedTypeCast
();
break
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment