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:19 UTC
[lucy-commits] svn commit: r1214628 - in /incubator/lucy/trunk/clownfish/src: CFCBase.c
CFCBase.h
Author: marvin
Date: Thu Dec 15 06:38:19 2011
New Revision: 1214628
URL: http://svn.apache.org/viewvc?rev=1214628&view=rev
Log:
Store CFC class name in each CFC object.
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=1214628&r1=1214627&r2=1214628&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCBase.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCBase.c Thu Dec 15 06:38:19 2011
@@ -28,11 +28,13 @@ CFCBase*
CFCBase_allocate(size_t size, const char *klass) {
CFCBase *self = (CFCBase*)CALLOCATE(size, 1);
self->perl_obj = CFCUtil_make_perl_obj(self, klass);
+ self->cfc_class = CFCUtil_strdup(klass);
return self;
}
void
CFCBase_destroy(CFCBase *self) {
+ FREEMEM(self->cfc_class);
FREEMEM(self);
}
@@ -63,7 +65,7 @@ CFCBase_get_perl_obj(CFCBase *self) {
const char*
CFCBase_get_cfc_class(CFCBase *self) {
- return HvNAME(SvSTASH((SV*)self->perl_obj));
+ return self->cfc_class;
}
Modified: incubator/lucy/trunk/clownfish/src/CFCBase.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCBase.h?rev=1214628&r1=1214627&r2=1214628&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCBase.h (original)
+++ incubator/lucy/trunk/clownfish/src/CFCBase.h Thu Dec 15 06:38:19 2011
@@ -27,6 +27,7 @@ typedef struct CFCBase CFCBase;
#ifdef CFC_NEED_BASE_STRUCT_DEF
struct CFCBase {
+ char *cfc_class;
void *perl_obj;
};
#endif