Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
6e514c60
Commit
6e514c60
authored
Jul 12, 2016
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt to new coding style
parent
984a2bcb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
src/main.cpp
src/main.cpp
+9
-9
No files found.
src/main.cpp
View file @
6e514c60
...
...
@@ -227,7 +227,7 @@ public:
template
<
class
T
>
typename
std
::
enable_if
<
!
has_register_class
<
T
>::
value
!
has_register_class
<
T
>::
value
&&
has_to_string
<
T
>::
value
>::
type
default_python_class_init
(
pybind11
::
module
&
m
,
const
std
::
string
&
name
)
{
...
...
@@ -240,8 +240,8 @@ default_python_class_init(pybind11::module& m, const std::string& name) {
template
<
class
T
>
typename
std
::
enable_if
<
!
has_register_class
<
T
>::
value
&&
!
has_to_string
<
T
>::
value
!
has_register_class
<
T
>::
value
&&
!
has_to_string
<
T
>::
value
>::
type
default_python_class_init
(
pybind11
::
module
&
m
,
const
std
::
string
&
name
)
{
auto
str_impl
=
[](
const
T
&
x
)
{
...
...
@@ -478,7 +478,7 @@ pybind11::tuple tuple_from_message(const type_erased_tuple& msg) {
for
(
size_t
i
=
0
;
i
<
msg
.
size
();
++
i
)
{
auto
rtti
=
msg
.
type
(
i
);
auto
str_ptr
=
self
->
system
().
types
().
portable_name
(
rtti
);
if
(
!
str_ptr
)
{
if
(
!
str_ptr
)
{
set_py_exception
(
"Unable to extract element #"
,
i
,
" from message: "
,
"could not get portable name of "
,
rtti
.
second
->
name
());
return
{};
...
...
@@ -498,7 +498,7 @@ pybind11::tuple tuple_from_message(const type_erased_tuple& msg) {
pybind11
::
tuple
py_dequeue
()
{
auto
&
self
=
s_context
->
self
;
auto
ptr
=
self
->
next_message
();
while
(
!
ptr
)
{
while
(
!
ptr
)
{
self
->
await_data
();
ptr
=
self
->
next_message
();
}
...
...
@@ -508,8 +508,8 @@ pybind11::tuple py_dequeue() {
pybind11
::
tuple
py_dequeue_with_timeout
(
absolute_receive_timeout
timeout
)
{
auto
&
self
=
s_context
->
self
;
auto
ptr
=
self
->
next_message
();
while
(
!
ptr
)
{
if
(
!
self
->
await_data
(
timeout
.
value
()))
while
(
!
ptr
)
{
if
(
!
self
->
await_data
(
timeout
.
value
()))
return
pybind11
::
none
{};
ptr
=
self
->
next_message
();
}
...
...
@@ -602,9 +602,9 @@ void caf_main(actor_system& system, const config& cfg) {
Py_Initialize
();
// create Python module for CAF
int
py_res
=
0
;
if
(
!
cfg
.
py_file
.
empty
())
{
if
(
!
cfg
.
py_file
.
empty
())
{
auto
fp
=
fopen
(
cfg
.
py_file
.
c_str
()
,
"r"
);
if
(
!
fp
)
{
if
(
!
fp
)
{
cerr
<<
"Unable to open file "
<<
cfg
.
py_file
<<
endl
;
Py_Finalize
();
return
;
...
...
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