Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
e1879d1c
Commit
e1879d1c
authored
May 19, 2008
by
Tiago Peixoto
Browse files
Add support for masking return values in run_action
parent
9329cd53
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/run_action/inline.py
View file @
e1879d1c
...
...
@@ -42,7 +42,7 @@ def inline(g, code, arg_names=[], local_dict=None,
auto_downcast
=
1
,
support_code
=
""
,
libraries
=
[],
library_dirs
=
[],
extra_compile_args
=
[],
runtime_library_dirs
=
[],
extra_objects
=
[],
extra_link_args
=
[]):
extra_link_args
=
[]
,
mask_ret
=
[]
):
"""Compile (if necessary) and run the C++ action specified by 'code',
using weave."""
...
...
@@ -71,7 +71,8 @@ def inline(g, code, arg_names=[], local_dict=None,
# handle returned values
return_vals
=
""
for
arg
in
arg_names
:
return_vals
+=
'return_vals["%s"] = %s;
\n
'
%
(
arg
,
arg
)
if
arg
not
in
mask_ret
:
return_vals
+=
'return_vals["%s"] = %s;
\n
'
%
(
arg
,
arg
)
support_template
=
string
.
Template
(
globals
()[
"support_template"
])
...
...
Write
Preview
Supports
Markdown
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