summaryrefslogtreecommitdiff
path: root/upb/upb.h
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2016-04-06 16:49:18 -0700
committerJoshua Haberman <jhaberman@gmail.com>2016-04-06 16:49:18 -0700
commit458077ccb4f7eddc94549528c3a9809745982352 (patch)
tree39cb7c59737895b757c0a830b166d6ed69e83027 /upb/upb.h
parentd0b9d0a9b782e46a483d4d72515f9ab4f72e402a (diff)
parent8823fa6069452c86325b4d5a6065a0d4fd67f1a2 (diff)
Merge pull request #53 from haberman/filedef
Added upb::FileDef, which represents the file defs are declared in.
Diffstat (limited to 'upb/upb.h')
-rw-r--r--upb/upb.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/upb/upb.h b/upb/upb.h
index d1107e7..b324daf 100644
--- a/upb/upb.h
+++ b/upb/upb.h
@@ -299,6 +299,11 @@ template <class T> class reffed_ptr {
if (ptr_) ptr_->Ref(this);
}
+ reffed_ptr(const reffed_ptr& other)
+ : ptr_(upb::upcast(other.get())) {
+ if (ptr_) ptr_->Ref(this);
+ }
+
~reffed_ptr() { if (ptr_) ptr_->Unref(this); }
template <class U>
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback