Skip to content

Commit

Permalink
Add a GetAttributeString to the OSX build cuz UnixOSProcessPlugin use…
Browse files Browse the repository at this point in the history
…s this to

"identify the JIT" (?!?!?!?!?!) and hence decide whether to use sigaltstack.
  • Loading branch information
eliotmiranda committed Jul 27, 2022
1 parent e932d0d commit 5cf2311
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 8 additions & 1 deletion platforms/iOS/vm/Common/Classes/sqSqueakAttributesAPI.m
Expand Up @@ -60,4 +60,11 @@ sqInt getAttributeIntoLength(sqInt indexNumber, sqInt byteArrayIndex, sqInt leng
//API Documented
[gDelegateApp.squeakApplication getAttribute: indexNumber into: pointerForOop((usqInt) byteArrayIndex) length: length];
return 0;
}
}

// This is for UnixOSProcessPlugin which looks for GetAttributeString
const char *
GetAttributeString(sqInt id)
{
return [gDelegateApp.squeakApplication getAttribute: id];
}
2 changes: 2 additions & 0 deletions platforms/iOS/vm/OSX/osExports.c
Expand Up @@ -17,10 +17,12 @@
#include "sqSqueakOSXScreenAndWindow.h"
#include "sqSqueakVmAndImagePathAPI.h"

extern const char * GetAttributeString(sqInt id);
#define XFN(export) {"", #export, (void*)export},
#define XFN2(plugin, export) {#plugin, #export, (void*)plugin##_##export}

void *os_exports[][3] = {
XFN(GetAttributeString) // Used by e.g. UnixOSProcessPlugin
XFN(getSTWindow)
XFN(getImageName)
XFN(getWindowChangedHook)
Expand Down
2 changes: 1 addition & 1 deletion platforms/unix/vm/osExports.c
Expand Up @@ -18,7 +18,7 @@ void *ioGetWindow(void);

void *os_exports[][3]=
{
XFN(GetAttributeString)
XFN(GetAttributeString) // Used by e.g. UnixOSProcessPlugin
#if !defined(HEADLESS)
XFNDF(primitivePluginBrowserReady,"\377","\000")
XFNDF(primitivePluginRequestURLStream,"\001","\000")
Expand Down

0 comments on commit 5cf2311

Please sign in to comment.