(BoolType) GciUtf8To8bit(
const char* src,
char *dest,
ssize_t destSize
);
This function converts Utf8 input in *src to 8 bit data in *dest. If all code points in *src are in the range 0..255, and the result fits in destSize-1, returns TRUE and *dest is null terminated, otherwise returns FALSE.
The following method has been added. This allows a function pointer stored into a CByteArray by C code to be used to synthesize a CCallout from that pointer.
CByteArray >> ccalloutAt: zeroBasedOffset name: aString result: resType
args: argumentTypes
Returns an instance of CCallout. aString is used to fill in the fName in the result, but not otherwise used. The 8 byte pointer value in the receiver at zeroBasedOffset is used instead of the result of a dlsym() call when building the result. resType and argumentTypes must be as documented in CCallout class >> library:name:result:args: .
This method previously only allowed the resultClass: argument to be a CByteArray or a subclass of CByteArray. Now, CPointer may be specified and this method will create an instance of CPointer.
Executing CByteArray>>copyFrom:from:to:into: with an end index that is less than the startindex returned an error. For consistency with String copyFrom:to:, this is now allowed.
This method returns the receiver. For consistency with String copy methods that return the number of bytes copied, the following method has been added:
CByteArray >> copyBytesFrom:from:to:into
When the path argument to GciRtlLoad is NULL, it uses a default path. This previously used the 64-bit UNIX path, $GEMSTONE/lib. On Windows, the shared libraries are distributed in the bin directory, and for 32-bit applications, the library path is $GEMSTONE/bin32. In these cases, GciRtlLoad did not find the libraries and failed. Now, the correct path is computed on Windows. (#46506)
If the same oop is both in arguments for the set of OOPs GCed and the noLongerReplicatedSet, it results in an error rtErrNotInExportSet. (#46883)
It was possible to encounter this if a client GBS process was terminated at the wrong moment.
The thread-safe GCI does not support client-side user actions. This means that thread-safe GCI applications also cannot evaluate Smalltalk code that performs client-side GsFile operations.
The following API calls have been added to support forked execution:
(BoolType) GciTsForkContinueWith(
GciSession sess,
OopType gsProcess,
OopType replaceTopOfStack,
GciErrSType *continueWithError,
int flags,
GciErrSType *err,
GciTsCallbackFType *callback
);
Execute GciTsContinueWith in a separate C thread, calling *callback when finished. Function result is TRUE if call initiated, FALSE if call could not be started, with details in *err.
(BoolType) GciTsForkExecute(
GciSession sess,
const char sourceStr,
OopType sourceOop,
OopType contextObject,
OopType symbolList,
int flags,
ushort environmentId / normally zero ,
GciErrSType *err,
GciTsCallbackFType *callback
);
Execute GciTsExecute in a separate C thread, calling *callback when finished. Function result is TRUE if call initiated, FALSE if call could not be started, with details in *err.
(BoolType) GciTsForkLogin(
const char *StoneNameNrs,
const char *HostUserId,
const char *HostPassword,
BoolType hostPwIsEncrypted,
const char *GemServiceNrs,
const char *gemstoneUsername,
const char *gemstonePassword,
unsigned int loginFlags,
int haltOnErrNum,
GciErrSType *err,
GciTsCallbackFType *callback
);
Execute GciTsLogin in a separate C thread, calling *callback when finished. Function result is TRUE if call initiated, FALSE if call could not be started, with details in *err. Upon completion, the first argument to the callback is the newly allocated session and second argument is a SmallInteger value 0 for clean login, 1 if a warning was returned in *err
(BoolType) GciTsForkPerform(
GciSession sess,
OopType receiver,
OopType aSymbol,
const char selectorStr,
const OopType *args,
int numArgs,
int flags,
ushort environmentId / normally zero ,
GciErrSType *err,
GciTsCallbackFType *callback
);
Execute GciTsPerform in a separate C thread, calling *callback when finished. Function result is TRUE if call initiated, FALSE if call could not be started, with details in *err.
(BoolType) GciTsForkStoreTravDoTravRefs(
GciSession sess,
const OopType *oopsNoLongerReplicated,
int numNotReplicated,
const OopType *oopsGcedOnClient,
int numGced,
GciStoreTravDoArgsSType *stdArgs,
GciClampedTravArgsSType *ctArgs,
GciErrSType *err,
GciTsCallbackFType *callback
);
Execute GciTsStoreTravDoTravRefs in a separate C thread , calling *callback when finished. Function result is TRUE if call initiated, FALSE if call could not be started, with details in *err. Upon completion, the second argument to the callback is the int result of GciTsStoreTravDoTravRefs expressed as a SmallInteger.
(int) GciTsCallInProgress(
GciSession sess,
GciErrSType *err
);
Returns 1 if a call is in progress on the specified session, 0 if a call is not in progress, -1 if sess is invalid in which case *err contains the details.
(int) GciTsFetchTraversal(
GciSession sess,
const OopType *theOops,
int numOops,
GciClampedTravArgsSType *ctArgs,
GciTravBufType *travBuff,
int flag,
GciErrSType *err
);
Performs a traversal starting at the oops specified by theOops and numOops, as specified by *ctArgs and flags, returning object reports in *travBuff . Returns 1 if traversal completed, 0 if data returned but traversal not complete, -1 if error returned in *err (in which case *travBuff undefined). If result == 1, call GciTsMoreTraversal again to fetch the remainder of the traversal result.
Compile and link changes in this release are minor.
Red Hat 6.x: GNU gdb 7.2-90.el6
Red Hat 7.1: GNU gdb 7.6.1-80.el7
Ubuntu Linux 14.04: GNU gdb 7.7.1
g++ -fmessage-length=0 -fcheck-new -O3 -ggdb -m64 -pipe
-D_REENTRANT -D_GNU_SOURCE -pthread -fPIC -fno-strict-aliasing
-fno-exceptions -I$GEMSTONE/include -x c++ -c userCode.c
-o userCode.o
The following warn flags are recommended for compilation:
-Wformat -Wtrigraphs -Wcomment -Wsystem-headers -Wtrigraphs
-Wno-aggregate-return -Wswitch -Wshadow -Wunused-value
-Wunused-variable -Wunused-label -Wno-unused-function
-Wchar-subscripts -Wmissing-braces -Wmissing-declarations
-Wmultichar -Wparentheses -Wsign-compare -Wsign-promo
-Wwrite-strings -Wreturn-type -Wuninitialized
CC -xO4 -m64 -xarch=generic -Kpic -mt -D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS -I$GEMSTONE/include
-features=no%except -c userCode.c -o userCode.o
xlC_r -O3 -qstrict -qalias=noansi -q64 -+ -qpic
-qthreaded -qarch=pwr6 -qtune=balanced -D_LARGEFILE64_SOURCE
-DFLG_AIX_VERSION=version -D_REENTRANT -D_THREAD_SAFE
-qminimaltoc -qlist=offset -qmaxmem=-1 -qsuppress=1500-010:1500
-029:1540-1103:1540-2907:1540-0804:1540-1281:1540-1090 -qnoeh
-I$GEMSTONE/include -c userCode.c -o userCode.o
Depending on your version of AIX, you need to include either -DFLG_AIX_VERSION=61 or -DFLG_AIX_VERSION=71.
Also note that there is no space in the -qsuppress arguments that are continued on the following line.
g++ -fmessage-length=0 -O3 -ggdb -m64 -pipe -fPIC
-fno-strict-aliasing -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE
-D_REENTRANT -D_GNU_SOURCE -I$GEMSTONE/include -x c++
-c userCode.c -o userCode.o
The following warn flags are recommended for compilation:
-Wformat -Wtrigraphs -Wcomment -Wsystem-headers -Wtrigraphs
-Wno-aggregate-return -Wswitch -Wshadow -Wunused-value
-Wunused-variable -Wunused-label -Wno-unused-function
-Wchar-subscripts -Wconversion -Wmissing-braces -Wmultichar
-Wparentheses -Wsign-compare -Wsign-promo -Wwrite-strings
-Wreturn-type
cl /W3 /Zi /MD /O2 /Oy- -DNDEBUG /TP /nologo /D_LP64 /D_AMD64_
/D_CONSOLE /D_DLL /DWIN32_LEAN_AND_MEAN
/D_CRT_SECURE_NO_WARNINGS /EHsc
/DNATIVE /I 'VisualStudioInstallPath\atlmfc\include'
/I 'VisualStudioInstallPath\VC\include'
/I 'C:\Program Files (x86)\Microsoft
SDKs\Windows\v7.0A\Include'
/I '%GEMSTONE%\include' -c userCode.c -FouserCode.obj
link /LIBPATH:"VisualStudioInstallPath\VC\lib\amd64"
/LIBPATH:"C:\Program Files (x86)\Microsoft
SDKs\Windows\v7.0A\Lib\x64" -RELEASE
/OPT:REF /INCREMENTAL:NO /MAP /nologo /MANIFEST
/MANIFESTFILE:userAppl.exe.manifest
/MANIFESTUAC:"level='asInvoker'" userCode.obj
%GEMSTONE%\lib\gcirpc.lib ws2_32.lib netapi32.lib advapi32.lib
comdlg32.lib user32.lib gdi32.lib kernel32.lib winspool.lib
Secur32.lib /out:userAppl.exe