[Zodb-checkins] CVS: Zope3/lib/python/Persistence - cPersistenceAPI.h:1.1.2.4
Jeremy Hylton
jeremy@zope.com
Tue, 19 Mar 2002 17:23:49 -0500
Update of /cvs-repository/Zope3/lib/python/Persistence
In directory cvs.zope.org:/tmp/cvs-serv22925
Modified Files:
Tag: Zope-3x-branch
cPersistenceAPI.h
Log Message:
Fix poorly-named PyPersist_IS_STICKY() macro. (It's still poorly named.)
The macro should return true if the object is in the CHANGED or STICKY
states.
This should fix the NULL return without exception set errors in
commit_store().
=== Zope3/lib/python/Persistence/cPersistenceAPI.h 1.1.2.3 => 1.1.2.4 ===
}
-/* XXX perhaps this is a bad name */
-#define PyPersist_IS_STICKY(O) ((O)->po_state == STICKY)
+/* XXX need to check *either* sticky or changed for now */
+#define PyPersist_IS_STICKY(O) ((O)->po_state == STICKY || \
+ (O)->po_state == CHANGED)
#define PyPersist_CHANGED(O) \
PyPersist_C_API->reg_trans((PyPersistObject *)(O))