summaryrefslogtreecommitdiff
path: root/ppdc/ppdc-shared.cxx
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2008-10-27 21:56:38 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2008-10-27 21:56:38 +0000
commite4572d571c24d8e71db08ab9ec16210c2428c761 (patch)
treec592c8735b59de63e245859661f66115d9dd20a0 /ppdc/ppdc-shared.cxx
parent28b9d139c05c6edd6ebc25f466792b8e806d0fa6 (diff)
downloadcups-e4572d571c24d8e71db08ab9ec16210c2428c761.tar.gz
Merge changes from CUPS 1.4svn-r8088, the real official 1.4b1!
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1035 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'ppdc/ppdc-shared.cxx')
-rw-r--r--ppdc/ppdc-shared.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/ppdc/ppdc-shared.cxx b/ppdc/ppdc-shared.cxx
index 6b7cba1c2..d8697a929 100644
--- a/ppdc/ppdc-shared.cxx
+++ b/ppdc/ppdc-shared.cxx
@@ -16,8 +16,8 @@
//
// ppdcShared::ppdcShared() - Create shared data.
// ppdcShared::~ppdcShared() - Destroy shared data.
-// ppdcShared::get() - Increment the use count for this data.
// ppdcShared::release() - Decrement the use count and delete as needed.
+// ppdcShared::retain() - Increment the use count for this data.
//
//
@@ -47,26 +47,26 @@ ppdcShared::~ppdcShared()
//
-// 'ppdcShared::get()' - Increment the use count for this data.
+// 'ppdcShared::release()' - Decrement the use count and delete as needed.
//
void
-ppdcShared::get(void)
+ppdcShared::release(void)
{
- use ++;
+ use --;
+ if (!use)
+ delete this;
}
//
-// 'ppdcShared::release()' - Decrement the use count and delete as needed.
+// 'ppdcShared::retain()' - Increment the use count for this data.
//
void
-ppdcShared::release(void)
+ppdcShared::retain()
{
- use --;
- if (!use)
- delete this;
+ use ++;
}