[pypy-commit] lang-smalltalk default: fixed primitive 'image name' (121), it should include a full path
lwassermann
noreply at buildbot.pypy.org
Thu May 23 16:44:51 CEST 2013
Author: Lars Wassermann <lars.wassermann at gmail.com>
Branch:
Changeset: r406:f8a202c96f2f
Date: 2013-05-22 15:58 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/f8a202c96f2f/
Log: fixed primitive 'image name' (121), it should include a full path
added primitive 'vm path'
diff --git a/spyvm/primitives.py b/spyvm/primitives.py
--- a/spyvm/primitives.py
+++ b/spyvm/primitives.py
@@ -974,13 +974,17 @@
#____________________________________________________________________________
# Misc Primitives (138 - 149)
+VM_PATH = 142
CLONE = 148
+ at expose_primitive(VM_PATH, unwrap_spec=[object])
+def func(interp, s_frame, w_receiver):
+ return interp.space.wrap_string(os.path.join(os.getcwd(), ''))
+
@expose_primitive(CLONE, unwrap_spec=[object])
def func(interp, s_frame, w_arg):
return w_arg.clone(interp.space)
-
# ___________________________________________________________________________
# File primitives (150-169)
# (XXX they are obsolete in Squeak and done with a plugin)
diff --git a/targetimageloadingsmalltalk.py b/targetimageloadingsmalltalk.py
--- a/targetimageloadingsmalltalk.py
+++ b/targetimageloadingsmalltalk.py
@@ -119,6 +119,7 @@
if path is None:
path = "Squeak.image"
+ path = os.path.join(os.getcwd(), path)
try:
f = open_file_as_stream(path, mode="rb", buffering=0)
except OSError as e:
More information about the pypy-commit
mailing list