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/09/02 19:40:45 UTC
[lucy-commits] svn commit: r1164654 - in /incubator/lucy/branches/0.2: ./
core/Lucy/Object/Obj.cfh core/Lucy/Store/FSFileHandle.c
Author: marvin
Date: Fri Sep 2 17:40:45 2011
New Revision: 1164654
URL: http://svn.apache.org/viewvc?rev=1164654&view=rev
Log:
LUCY-176 More INCREF/DECREF symbol collisions under Windows.
INCREF and DECREF are defined in windows.h, so we need to make sure that the
prefixed variants CFISH_INCREF and CFISH_DECREF are used in our own code
whereever collisions may occur.
Modified:
incubator/lucy/branches/0.2/ (props changed)
incubator/lucy/branches/0.2/core/Lucy/Object/Obj.cfh
incubator/lucy/branches/0.2/core/Lucy/Store/FSFileHandle.c
Propchange: incubator/lucy/branches/0.2/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 17:40:45 2011
@@ -1 +1 @@
-/incubator/lucy/trunk:1148076,1148119,1159913
+/incubator/lucy/trunk:1148076,1148119,1159913,1164648
Modified: incubator/lucy/branches/0.2/core/Lucy/Object/Obj.cfh
URL: http://svn.apache.org/viewvc/incubator/lucy/branches/0.2/core/Lucy/Object/Obj.cfh?rev=1164654&r1=1164653&r2=1164654&view=diff
==============================================================================
--- incubator/lucy/branches/0.2/core/Lucy/Object/Obj.cfh (original)
+++ incubator/lucy/branches/0.2/core/Lucy/Object/Obj.cfh Fri Sep 2 17:40:45 2011
@@ -203,6 +203,7 @@ lucy_Obj_incref(lucy_Obj *self) {
}
#define LUCY_INCREF(_self) lucy_Obj_incref((lucy_Obj*)_self)
+#define CFISH_INCREF LUCY_INCREF
static CHY_INLINE uint32_t
lucy_Obj_decref(lucy_Obj *self) {
@@ -211,11 +212,12 @@ lucy_Obj_decref(lucy_Obj *self) {
}
#define LUCY_DECREF(_self) lucy_Obj_decref((lucy_Obj*)_self)
+#define CFISH_DECREF LUCY_DECREF
#ifdef LUCY_USE_SHORT_NAMES
#define SUPER_DESTROY(_self, _vtable) LUCY_SUPER_DESTROY(_self, _vtable)
- #define INCREF(_self) LUCY_INCREF(_self)
- #define DECREF(_self) LUCY_DECREF(_self)
+ #define INCREF(_self) CFISH_INCREF(_self)
+ #define DECREF(_self) CFISH_DECREF(_self)
#endif
__END_C__
Modified: incubator/lucy/branches/0.2/core/Lucy/Store/FSFileHandle.c
URL: http://svn.apache.org/viewvc/incubator/lucy/branches/0.2/core/Lucy/Store/FSFileHandle.c?rev=1164654&r1=1164653&r2=1164654&view=diff
==============================================================================
--- incubator/lucy/branches/0.2/core/Lucy/Store/FSFileHandle.c (original)
+++ incubator/lucy/branches/0.2/core/Lucy/Store/FSFileHandle.c Fri Sep 2 17:40:45 2011
@@ -92,7 +92,7 @@ FSFH_do_open(FSFileHandle *self, const C
FH_do_open((FileHandle*)self, path, flags);
if (!path || !CB_Get_Size(path)) {
Err_set_error(Err_new(CB_newf("Missing required param 'path'")));
- DECREF(self);
+ CFISH_DECREF(self);
return NULL;
}
@@ -103,7 +103,7 @@ FSFH_do_open(FSFileHandle *self, const C
self->fd = 0;
Err_set_error(Err_new(CB_newf("Attempt to open '%o' failed: %s",
path, strerror(errno))));
- DECREF(self);
+ CFISH_DECREF(self);
return NULL;
}
if (flags & FH_EXCLUSIVE) {
@@ -115,7 +115,7 @@ FSFH_do_open(FSFileHandle *self, const C
if (self->len == -1) {
Err_set_error(Err_new(CB_newf("lseek64 on %o failed: %s",
self->path, strerror(errno))));
- DECREF(self);
+ CFISH_DECREF(self);
return NULL;
}
else {
@@ -123,7 +123,7 @@ FSFH_do_open(FSFileHandle *self, const C
if (check_val == -1) {
Err_set_error(Err_new(CB_newf("lseek64 on %o failed: %s",
self->path, strerror(errno))));
- DECREF(self);
+ CFISH_DECREF(self);
return NULL;
}
}
@@ -137,20 +137,20 @@ FSFH_do_open(FSFileHandle *self, const C
if (!self->buf) {
// An error occurred during SI_map, which has set
// Err_error for us already.
- DECREF(self);
+ CFISH_DECREF(self);
return NULL;
}
}
}
else {
- DECREF(self);
+ CFISH_DECREF(self);
return NULL;
}
}
else {
Err_set_error(Err_new(CB_newf("Must specify FH_READ_ONLY or FH_WRITE_ONLY to open '%o'",
path)));
- DECREF(self);
+ CFISH_DECREF(self);
return NULL;
}