'From Squeak3.2gamma of 12 January 2002 [latest update: #4653] on 3 February 2002 at 8:36:37 pm'! "Change Set: UUIDFixes-ar Date: 3 February 2002 Author: Andreas Raab Fixes a horrible problem in UUIDPlugin (which could easily break your system if you called the primitive on, e.g., UUID basicNew initialize) and changes the header file declaration to use sqUUID rather than a Mac-specific definition."! !UUID methodsFor: 'initalize-release' stamp: 'ar 2/3/2002 19:42'! initialize self primMakeUUID.! ! !UUID methodsFor: 'system primitives' stamp: 'ar 2/3/2002 19:42'! primMakeUUID UUIDGenerator default generateBytes: self forVersion: 4.! ! !UUIDPlugin methodsFor: 'system primitives' stamp: 'ar 2/3/2002 20:04'! primitiveMakeUUID | oop location | self export: true. self var: #location type: 'char*'. interpreterProxy methodArgumentCount = 0 ifFalse:[^interpreterProxy primitiveFail]. oop _ interpreterProxy stackObjectValue: 0. interpreterProxy failed ifTrue:[^nil]. (interpreterProxy isBytes: oop) ifFalse:[^interpreterProxy primitiveFail]. (interpreterProxy byteSizeOf: oop) = 16 ifFalse:[^interpreterProxy primitiveFail]. location _ interpreterProxy firstIndexableField: oop. self cCode: 'MakeUUID(location)' inSmalltalk: [location. interpreterProxy primitiveFail]. ! ! !UUIDPlugin methodsFor: 'initialize' stamp: 'ar 2/3/2002 20:03'! shutdownModule self export: true. ^self cCode: 'sqUUIDShutdown()' inSmalltalk:[true]! ! !UUIDPlugin class methodsFor: 'translation' stamp: 'ar 2/3/2002 20:03'! headerFile ^'/* UUID generation. Note that we typedef sqUUID as a generic 128 bit value so that platform specific code can coerce appropriately. */ typedef char sqUUID[16]; int MakeUUID(sqUUID location); int sqUUIDInit(); int sqUUIDShutdown(); ' ! ! UUIDPlugin removeSelector: #primitiveMakeUUID:! UUID removeSelector: #primMakeUUID:!