Skip to content

Commit 08ae114

Browse files
authored
Merge pull request #1029 from tesonep/p10-backport-UUIDPlugin-fix
Backporting the fixes on the UUIDPlugin to P10 branch
2 parents 423b506 + ac1378b commit 08ae114

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

plugins/UUIDPlugin/common/UUIDPlugin.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,9 @@ int sqUUIDShutdown(void)
105105

106106
EXPORT(sqInt) setInterpreter(struct VirtualMachine *anInterpreter)
107107
{
108-
sqInt ok;
109-
110108
interpreterProxy = anInterpreter;
111109

112-
return 0;
110+
return 1;
113111
}
114112

115113
EXPORT(const char*)
@@ -134,18 +132,20 @@ shutdownModule(void)
134132
EXPORT(sqInt)
135133
primitiveMakeUUID(void)
136134
{
137-
char *location;
138-
sqInt oop;
139-
140-
oop = interpreterProxy->stackValue(0);
141-
if (!(((interpreterProxy->methodArgumentCount()) == 0)
142-
&& ((interpreterProxy->isBytes(oop))
143-
&& ((interpreterProxy->byteSizeOf(oop)) == 16)))) {
144-
return interpreterProxy->primitiveFail();
145-
}
146-
location = interpreterProxy->firstIndexableField(oop);
147-
MakeUUID(location);
148-
return oop;
135+
136+
char *location;
137+
sqInt oop;
138+
139+
oop = interpreterProxy->stackValue(0);
140+
if (!(interpreterProxy->methodArgumentCount() == 0
141+
&& interpreterProxy->isBytes(oop)
142+
&& interpreterProxy->byteSizeOf(oop) == 16)) {
143+
144+
return interpreterProxy->primitiveFail();
145+
}
146+
location = interpreterProxy->firstIndexableField(oop);
147+
MakeUUID(location);
148+
return oop;
149149
}
150150

151151
#ifdef SQUEAK_BUILTIN_PLUGIN

0 commit comments

Comments
 (0)