Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
b310ae7
)
THRIFT-2030 Thrift allows for inconsistent use of "oneway"
author
Jens Geyer
<jensg@apache.org>
Fri, 14 Jun 2013 16:48:15 +0000
(18:48 +0200)
committer
Jens Geyer
<jensg@apache.org>
Sat, 15 Jun 2013 01:05:03 +0000
(
03:05
+0200)
Patch: Jens Geyer
compiler/cpp/src/parse/t_function.h
patch
|
blob
|
history
diff --git
a/compiler/cpp/src/parse/t_function.h
b/compiler/cpp/src/parse/t_function.h
index
0da2fd6
..
ae8c2f6
100644
(file)
--- a/
compiler/cpp/src/parse/t_function.h
+++ b/
compiler/cpp/src/parse/t_function.h
@@
-42,6
+42,9
@@
class t_function : public t_doc {
arglist_(arglist),
oneway_(oneway) {
xceptions_ = new t_struct(NULL);
+ if (oneway_ && (! returntype_->is_void())) {
+ pwarning(1, "Oneway methods should return void.\n");
+ }
}
t_function(t_type* returntype,
@@
-58,6
+61,9
@@
class t_function : public t_doc {
if (oneway_ && !xceptions_->get_members().empty()) {
throw std::string("Oneway methods can't throw exceptions.");
}
+ if (oneway_ && (! returntype_->is_void())) {
+ pwarning(1, "Oneway methods should return void.\n");
+ }
}
~t_function() {}