Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Ferguson2007-02-27 13:44:03 +0000
committerAndrew Ferguson2007-02-27 13:44:03 +0000
commitb320422e7558cf1d72326284406b9adca65dfa2b (patch)
tree6055ae76a93dd2682e8cfb2e8b5e2e5d172ac382
parent8f5f85122a58ce1f0a8ede08af88d46af332a38b (diff)
downloadorg.eclipse.cdt-b320422e7558cf1d72326284406b9adca65dfa2b.tar.gz
org.eclipse.cdt-b320422e7558cf1d72326284406b9adca65dfa2b.tar.xz
org.eclipse.cdt-b320422e7558cf1d72326284406b9adca65dfa2b.zip
add getRecord, make clear() public, some housekeeping
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/DBProperties.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/DBProperties.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/DBProperties.java
index d392361a11c..27a23cf881e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/DBProperties.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/DBProperties.java
@@ -33,7 +33,7 @@ public class DBProperties {
* @throws CoreException
*/
public DBProperties(Database db) throws CoreException {
- this.record= db.malloc(4);
+ this.record= db.malloc(RECORD_SIZE);
this.index= new BTree(db, record + PROP_INDEX, DBProperty.getComparator(db));
this.db= db;
}
@@ -125,7 +125,7 @@ public class DBProperties {
* it can be repopulated.
* @throws CoreException
*/
- private void clear() throws CoreException {
+ public void clear() throws CoreException {
index.accept(new IBTreeVisitor(){
public int compare(int record) throws CoreException {
return 0;
@@ -148,6 +148,10 @@ public class DBProperties {
db.free(record);
}
+ public int getRecord() {
+ return record;
+ }
+
private static class DBProperty {
static final int KEY = 0;
static final int VALUE = 4;

Back to the top