rev 419 - in trunk: include/prothon modules/Prosist pr src
SVN User <[email protected]> Mon, 26 Apr 2004 15:53:54 -0400
| Newsgroups | gmane.comp.lang.prothon.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mark
Date: 2004-04-26 15:53:52 -0400 (Mon, 26 Apr 2004)
New Revision: 419
Modified:
trunk/include/prothon/prothon.h
trunk/modules/Prosist/Prosist.c
trunk/pr/prosist.pr
trunk/src/builtins-core.c
Log:
Prosist works!!!!
Modified: trunk/include/prothon/prothon.h
===================================================================
--- trunk/include/prothon/prothon.h 2004-04-26 05:54:07 UTC (rev 418)
+++ trunk/include/prothon/prothon.h 2004-04-26 19:53:52 UTC (rev 419)
@@ -60,11 +60,11 @@
//#define DEBUG_THREADS
//#define DEBUG_MEM_MGR
//#define TRACE_PARSER
-#define DUMP_MODULE_CODE
-#define TRACE_INTERPRETER
+//#define DUMP_MODULE_CODE
+//#define TRACE_INTERPRETER
//#define DUMP_OBJECTS_AT_END
-#define PROSIST_DEBUG
+//#define PROSIST_DEBUG
//*****************************************************************************
Modified: trunk/modules/Prosist/Prosist.c
===================================================================
--- trunk/modules/Prosist/Prosist.c 2004-04-26 05:54:07 UTC (rev 418)
+++ trunk/modules/Prosist/Prosist.c 2004-04-26 19:53:52 UTC (rev 419)
@@ -488,6 +488,7 @@
pr_free(obj->data.ptr);
}
memcpy(obj, res, sizeof(*obj)-sizeof(obj->next_obj));
+ read_lock(ist, obj);
}
}
if (!proxy_obj) {
Modified: trunk/pr/prosist.pr
===================================================================
--- trunk/pr/prosist.pr 2004-04-26 05:54:07 UTC (rev 418)
+++ trunk/pr/prosist.pr 2004-04-26 19:53:52 UTC (rev 419)
@@ -2,11 +2,15 @@
# prosist.pr
+print
+print ' NOTE: This test is not yet easily readable for success or failure'
+print ' For now consider not locking up a success :) '
+print
import Prosist
b = 7.3
-c = "hello, my name is imalongstring"
+c = "This is the original data"
d = ('i', 'am', 'a', 'tuple')
@@ -22,31 +26,36 @@
a = {1:b, 2:c, 3:[d,e], (4,5): f, 6:g}
db = Prosist('test.pdb', root=a, mode=Prosist.RWTRUNCATE)
-/*
+
a[1] = 999
a[1] = b
g.b = [11,22]
a[(4,5)] = {'i':'am', 'a':'different', 'dict':'!'}
-a[2] = "yoohoo, I'm a long string"
+a[2] = "This is the data that is going to be rolled back"
+print
+print a, a[6].a , a[6].b , a[6].c
+
+
db.rollBack()
print
print a, a[6].a , a[6].b , a[6].c
+
a[1] = 999
a[1] = b
g.b = [11,22]
a[(4,5)] = {'i':'am', 'a':'different', 'dict':'!'}
-a[2] = 'yoohoo'
+a[2] = 'The is the data that is going to be committed'
db.commit()
print
print a, a[6].a , a[6].b , a[6].c
-*/
+
db.close()
db = Prosist('test.pdb')
x = db.root
Modified: trunk/src/builtins-core.c
===================================================================
--- trunk/src/builtins-core.c 2004-04-26 05:54:07 UTC (rev 418)
+++ trunk/src/builtins-core.c 2004-04-26 19:53:52 UTC (rev 419)
@@ -344,7 +344,7 @@
}
DEF(Object, __toStorProxy__, NULL) {
- return self;
+ return copy_object(ist, self);
}
DEF(Object, __fromStorProxy__, NULL) {