Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
ebac17d8
Commit
ebac17d8
authored
Sep 13, 2022
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let _active_result_class be NULL by default
In this case, asynchronous method calls will return NULL themselves.
parent
ec1927a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+4
-1
Cython/Utility/CyObjects.cpp
Cython/Utility/CyObjects.cpp
+1
-1
No files found.
Cython/Compiler/ModuleNode.py
View file @
ebac17d8
...
...
@@ -1055,7 +1055,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
templates_code
=
"template <typename %s>"
%
", typename "
.
join
(
t
.
name
for
t
in
entry
.
type
.
templates
)
code
.
putln
(
templates_code
)
code
.
putln
(
"%s {"
%
function_code
)
code
.
putln
(
"%s = this->%s();"
%
(
result_interface_type
.
declaration_code
(
"result_object"
),
result_attr_cname
))
result_declaration
=
result_interface_type
.
declaration_code
(
"result_object"
)
code
.
putln
(
"%s = this->%s ? this->%s() : NULL;"
%
(
result_declaration
,
result_attr_cname
,
result_attr_cname
))
message_constructor_args_list
=
[
"this"
,
"sync_object"
,
"result_object"
]
+
reified_arg_cname_list
message_constructor_args_code
=
", "
.
join
(
message_constructor_args_list
)
...
...
@@ -1196,12 +1197,14 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
)
if
does_return
:
code
.
putln
(
"if (this->%s != NULL) {"
%
result_attr_cname
)
code
.
putln
(
"Cy_WLOCK(this->%s);"
%
result_attr_cname
)
if
reified_function_entry
.
type
.
return_type
.
resolve
()
is
PyrexTypes
.
c_int_type
:
code
.
putln
(
"this->%s->pushIntResult(result);"
%
result_attr_cname
)
else
:
code
.
putln
(
"this->%s->pushVoidStarResult((void*)result);"
%
result_attr_cname
)
code
.
putln
(
"Cy_UNWLOCK(this->%s);"
%
result_attr_cname
)
code
.
putln
(
"}"
)
code
.
putln
(
"return 1;"
)
code
.
putln
(
"}"
)
...
...
Cython/Utility/CyObjects.cpp
View file @
ebac17d8
...
...
@@ -390,7 +390,7 @@
struct
ActhonActivableClass
:
public
CyObject
{
ActhonQueueInterface
*
_active_queue_class
=
NULL
;
ActhonResultInterface
*
(
*
_active_result_class
)(
void
);
ActhonResultInterface
*
(
*
_active_result_class
)(
void
)
=
NULL
;
ActhonActivableClass
(){}
// Used in Activated classes inheritance chain (base Activated calls this, derived calls the 2 args version below)
virtual
~
ActhonActivableClass
();
};
...
...
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