rev 456 - in trunk: include/prothon pr src
SVN User <[email protected]> Tue, 04 May 2004 02:48:36 -0400
| Newsgroups | gmane.comp.lang.prothon.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mark
Date: 2004-05-04 02:48:34 -0400 (Tue, 04 May 2004)
New Revision: 456
Modified:
trunk/include/prothon/prothon.h
trunk/pr/test.pr
trunk/src/builtins-core.c
Log:
funxed unbind bug
Modified: trunk/include/prothon/prothon.h
===================================================================
--- trunk/include/prothon/prothon.h 2004-05-04 06:24:11 UTC (rev 455)
+++ trunk/include/prothon/prothon.h 2004-05-04 06:48:34 UTC (rev 456)
@@ -271,7 +271,7 @@
GEN_PROTO, // 19 gen (generator)
THREAD_PROTO, // 20 Thread
MUTEX_PROTO, // 21 Mutex
-
+
// Exceptions
EXCEPTION, // 22 Exception
INTERNAL_EXC, // 23 InternalError
Modified: trunk/pr/test.pr
===================================================================
--- trunk/pr/test.pr 2004-05-04 06:24:11 UTC (rev 455)
+++ trunk/pr/test.pr 2004-05-04 06:48:34 UTC (rev 456)
@@ -2,6 +2,30 @@
object obj:
- $x = 3
-
-print obj.x
+ def $__str__():
+ return 'test obj'
+ def $func():
+ print '$:',$
+
+object self(obj):
+ def $__str__():
+ return 'self'
+ print obj
+ print obj.func
+ print obj.func.bind()
+ print obj.func.bind($)
+ print obj.func.bind(^)
+ x=obj.func
+ x()
+ x=obj.func.bind()
+ x()
+ x=obj.func.bind($)
+ x()
+ x=obj.func.bind(^)
+ x()
+ x=obj$func
+ x()
+ x=obj.func.bind($)
+ x()
+ with ^: x = obj$func
+ x()
\ No newline at end of file
Modified: trunk/src/builtins-core.c
===================================================================
--- trunk/src/builtins-core.c 2004-05-04 06:24:11 UTC (rev 455)
+++ trunk/src/builtins-core.c 2004-05-04 06:48:34 UTC (rev 456)
@@ -711,7 +711,9 @@
}
DEF(Func, unbind, NULL) {
+ read_unlock(ist, self);
del_attr(ist, self, SYM(__BINDOBJ__));
+ read_lock(ist, self);
return self;
}