Anonymous | Login | 02-27-2021 21:33 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0002404 | [Squeak] VM | feature | N/A | 12-23-05 01:34 | 01-18-06 19:23 | ||||
Reporter | tim | View Status | public | ||||||
Assigned To | tim | ||||||||
Priority | high | Resolution | fixed | ||||||
Status | closed | Product Version | 3.8 | ||||||
Summary | 0002404: Add VM filename conversion access and endianness access to interpreterProxy for plugin use | ||||||||
Description |
Original request:- From: bert@impara.de Subject: Plugins and Platforms Date: November 25, 2005 3:47:42 AM PST (CA) To: vm-dev@discuss.squeakfoundation.org Hi folks, when writing a plugin in Slang I encountered two problems wrt platform specifics: 1) convert a squeak pathname to a platform pathname: * my plugin links to a library that expects a platform file path * must convert from Squeak path (char encoding etc.) * sqFilenameFromString() should do this * PROBLEM: this does not work in an external plugin * because it is just a macro pointing to some platform-code function that would have to be linked to the external plugin * PROPOSAL: provide an ioFilenameFromString() function exported from the VM * looked up by plugin via interpreterProxy->ioLoadFunctionFrom("ioFilenameFromString", "") * could trivially be implemented by using sqFilenameFromString macro? 2) endianness: * I need to know the current platform's endianness * because the linked library provides 8 bit bitmap data in platform order * and I want to adjust the Squeak form from the plugin (set depth to -8 on little-endian machine) * PROBLEM: which function/macro to use? * there seem to be several: - LSB_FIRST used in B3DAcceleratorPlugin.c - MSB_FIRST used in sqWin32Window.c - WORDS_BIGENDIAN defined on Mac OS and Unix - is this the one? |
||||||||
Additional Information |
An interpreterProxy function for ioFilenameFromString is easy enough - we have sqFileNameFromString provided in the base code. It is nominally a macro although several platforms recast it as a function. There is also the slight fiddly bit of the sqFilenameFromStringOpen stuff for OSX to consider. It looks as if simply making an Interpreter method ioFilenameFromString that points to sqfilenameFromString will do. Add equivalent to InterpreterProxy as well and of course to sqVirtualMachine.[ch] There isn't any single universal macro or value to indicate endianess so I'll add one. A macro will be most useful since it can be set in a sqPlatformSpecific.h or from a makefile command as a result of autoconf or other OS gymnastics. |
||||||||
Attached Files |
![]() ![]() |
||||||||
|
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
53 total queries executed. 36 unique queries executed. |