You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/12/15 07:38:21 UTC

[lucy-commits] svn commit: r1214629 - in /incubator/lucy/trunk/clownfish/src: CFCBase.c CFCBase.h

Author: marvin
Date: Thu Dec 15 06:38:21 2011
New Revision: 1214629

URL: http://svn.apache.org/viewvc?rev=1214629&view=rev
Log:
Add accessor for CFC refcount.

Modified:
    incubator/lucy/trunk/clownfish/src/CFCBase.c
    incubator/lucy/trunk/clownfish/src/CFCBase.h

Modified: incubator/lucy/trunk/clownfish/src/CFCBase.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCBase.c?rev=1214629&r1=1214628&r2=1214629&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCBase.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCBase.c Thu Dec 15 06:38:21 2011
@@ -58,6 +58,11 @@ CFCBase_decref(CFCBase *self) {
     return modified_refcount;
 }
 
+unsigned
+CFCBase_get_refcount(CFCBase *self) {
+    return SvREFCNT((SV*)self->perl_obj);
+}
+
 void*
 CFCBase_get_perl_obj(CFCBase *self) {
     return self->perl_obj;

Modified: incubator/lucy/trunk/clownfish/src/CFCBase.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCBase.h?rev=1214629&r1=1214628&r2=1214629&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCBase.h (original)
+++ incubator/lucy/trunk/clownfish/src/CFCBase.h Thu Dec 15 06:38:21 2011
@@ -60,6 +60,11 @@ CFCBase_incref(CFCBase *self);
 unsigned
 CFCBase_decref(CFCBase *self);
 
+/** Return the CFC object's refcount.
+ */
+unsigned
+CFCBase_get_refcount(CFCBase *self);
+
 /** Return the CFC object's cached Perl object.
  */
 void*