Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
dd617dec
Commit
dd617dec
authored
Mar 02, 2022
by
Aaron Gokaslan
Committed by
Henry Schreiner
Mar 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: missing move in eval.h (#3775)
parent
45219c6b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
include/pybind11/eval.h
+2
-2
No files found.
include/pybind11/eval.h
View file @
dd617dec
...
...
@@ -82,7 +82,7 @@ template <eval_mode mode = eval_expr, size_t N>
object
eval
(
const
char
(
&
s
)[
N
],
object
global
=
globals
(),
object
local
=
object
())
{
/* Support raw string literals by removing common leading whitespace */
auto
expr
=
(
s
[
0
]
==
'\n'
)
?
str
(
module_
::
import
(
"textwrap"
).
attr
(
"dedent"
)(
s
))
:
str
(
s
);
return
eval
<
mode
>
(
expr
,
global
,
local
);
return
eval
<
mode
>
(
expr
,
std
::
move
(
global
),
std
::
move
(
local
)
);
}
inline
void
exec
(
const
str
&
expr
,
object
global
=
globals
(),
object
local
=
object
())
{
...
...
@@ -91,7 +91,7 @@ inline void exec(const str &expr, object global = globals(), object local = obje
template
<
size_t
N
>
void
exec
(
const
char
(
&
s
)[
N
],
object
global
=
globals
(),
object
local
=
object
())
{
eval
<
eval_statements
>
(
s
,
global
,
local
);
eval
<
eval_statements
>
(
s
,
std
::
move
(
global
),
std
::
move
(
local
)
);
}
#if defined(PYPY_VERSION) && PY_VERSION_HEX >= 0x03000000
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment