Skip to content

Commit

Permalink
Merge 9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Sep 13, 2023
2 parents 3196646 + 5e6c7f0 commit 3824998
Show file tree
Hide file tree
Showing 17 changed files with 764 additions and 763 deletions.
6 changes: 3 additions & 3 deletions doc/zipfs.3
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ const char *
\fBTclZipfs_AppHook(\fIargcPtr, argvPtr\fR)
.sp
int
\fBTclZipfs_Mount\fR(\fIinterp, mountpoint, zipname, password\fR)
\fBTclZipfs_Mount\fR(\fIinterp, zipname, mountpoint, password\fR)
.sp
int
\fBTclZipfs_MountBuffer\fR(\fIinterp, mountpoint, data, dataLen, copy\fR)
\fBTclZipfs_MountBuffer\fR(\fIinterp, data, dataLen, mountpoint, copy\fR)
.sp
int
\fBTclZipfs_Unmount\fR(\fIinterp, mountpoint\fR)
Expand All @@ -43,7 +43,7 @@ Name of a mount point, which must be a legal Tcl file or directory name. May
be NULL to query current mount points.
.AP "const char" *password in
An (optional) password. Use NULL if no password is wanted to read the file.
.AP "unsigned char" *data in
.AP "const void" *data in
A data buffer to mount. The data buffer must hold the contents of a ZIP
archive, and must not be NULL.
.AP size_t dataLen in
Expand Down
37 changes: 24 additions & 13 deletions doc/zipfs.n
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ zipfs \- Mount and work with ZIP files within Tcl
\fBzipfs mkimg\fR \fIoutfile indir\fR ?\fIstrip\fR? ?\fIpassword\fR? ?\fIinfile\fR?
\fBzipfs mkkey\fR \fIpassword\fR
\fBzipfs mkzip\fR \fIoutfile indir\fR ?\fIstrip\fR? ?\fIpassword\fR?
\fBzipfs mount\fR ?\fImountpoint\fR? ?\fIzipfile\fR? ?\fIpassword\fR?
\fBzipfs mount\fR ?\fIzipfile\fR? ?\fImountpoint\fR? ?\fIpassword\fR?
\fBzipfs root\fR
\fBzipfs unmount\fR \fImountpoint\fR
.fi
'\" The following subcommand is *UNDOCUMENTED*
'\" \fBzipfs mount_data\fR ?\fImountpoint\fR? ?\fIdata\fR?
'\" \fBzipfs mount_data\fR ?\fIdata\fR ?\fImountpoint\fR??
.BE
.SH DESCRIPTION
.PP
Expand Down Expand Up @@ -84,16 +84,27 @@ Return a list of all files in the mounted zipfs, or just those matching
\fIpattern\fR (optionally controlled by the option parameters). The order of
the names in the list is arbitrary.
.TP
\fBzipfs mount\fR ?\fImountpoint\fR? ?\fIzipfile\fR? ?\fIpassword\fR?
.
The \fBzipfs mount\fR command mounts a ZIP archive file as a Tcl virtual
filesystem at \fImountpoint\fR. After this command executes, files contained
in \fIzipfile\fR will appear to Tcl to be regular files at the mount point.
\fBzipfs mount\fR
.TP
\fBzipfs mount\fR \fImountpoint\fR
.TP
\fBzipfs mount\fR \fIzipfile\fR \fImountpoint\fR ?\fIpassword\fR?
.RS
.PP
With no \fIzipfile\fR, returns the zipfile mounted at \fImountpoint\fR. With
no \fImountpoint\fR, return all zipfile/mount pairs. If \fImountpoint\fR is
specified as an empty string, mount on file path.
The \fBzipfs mount\fR command mounts ZIP archives as Tcl virtual file systems
and returns information about current mounts.
.PP
With no arguments, the command returns a dictionary mapping
current mount points to the file path of the corresponding ZIP archive.
.PP
In the single argument form, the command returns the file path
of the ZIP archive mounted at the specified mount point.
.PP
In the third form, the command mounts the ZIP archive \fIzipfile\fR as a Tcl virtual
filesystem at \fImountpoint\fR. After this command executes, files contained
in \fIzipfile\fR will appear to Tcl to be regular files at the mount point.
If \fImountpoint\fR is
specified as an empty string, it is defaulted to the file path.
.PP
\fBNB:\fR because the current working directory is a concept maintained by the
operating system, using \fBcd\fR into a mounted archive will only work in the
Expand Down Expand Up @@ -186,13 +197,13 @@ before unmounting it again:
set zip myApp.zip
set base [file join [\fBzipfs root\fR] myApp]

\fBzipfs mount\fR $base $zip
\fBzipfs mount\fR $zip $base
# $base now has the contents of myApp.zip

source [file join $base app.tcl]
# use the contents, load libraries from it, etc...

\fBzipfs unmount\fR $zip
\fBzipfs unmount\fR $base
.CE
.PP
Creating a ZIP archive, given that a directory exists containing the content
Expand All @@ -219,7 +230,7 @@ set base [file join [\fBzipfs root\fR] myApp]
\fBzipfs mkzip\fR $targetZip $sourceDir $sourceDir $password

# Mount with password
\fBzipfs mount\fR $base $zip $password
\fBzipfs mount\fR $zip $base $password
.CE
.PP
When creating an executable image with a password, the password is placed
Expand Down
12 changes: 6 additions & 6 deletions generic/regc_locale.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ static const crange alphaRangeTable[] = {
{0x1EE67, 0x1EE6A}, {0x1EE6C, 0x1EE72}, {0x1EE74, 0x1EE77}, {0x1EE79, 0x1EE7C},
{0x1EE80, 0x1EE89}, {0x1EE8B, 0x1EE9B}, {0x1EEA1, 0x1EEA3}, {0x1EEA5, 0x1EEA9},
{0x1EEAB, 0x1EEBB}, {0x20000, 0x2A6DF}, {0x2A700, 0x2B739}, {0x2B740, 0x2B81D},
{0x2B820, 0x2CEA1}, {0x2CEB0, 0x2EBE0}, {0x2F800, 0x2FA1D}, {0x30000, 0x3134A},
{0x31350, 0x323AF}
{0x2B820, 0x2CEA1}, {0x2CEB0, 0x2EBE0}, {0x2EBF0, 0x2EE5D}, {0x2F800, 0x2FA1D},
{0x30000, 0x3134A}, {0x31350, 0x323AF}
#endif
};

Expand Down Expand Up @@ -697,8 +697,8 @@ static const crange graphRangeTable[] = {
{0x2DA0, 0x2DA6}, {0x2DA8, 0x2DAE}, {0x2DB0, 0x2DB6}, {0x2DB8, 0x2DBE},
{0x2DC0, 0x2DC6}, {0x2DC8, 0x2DCE}, {0x2DD0, 0x2DD6}, {0x2DD8, 0x2DDE},
{0x2DE0, 0x2E5D}, {0x2E80, 0x2E99}, {0x2E9B, 0x2EF3}, {0x2F00, 0x2FD5},
{0x2FF0, 0x2FFB}, {0x3001, 0x303F}, {0x3041, 0x3096}, {0x3099, 0x30FF},
{0x3105, 0x312F}, {0x3131, 0x318E}, {0x3190, 0x31E3}, {0x31F0, 0x321E},
{0x2FF0, 0x2FFF}, {0x3001, 0x303F}, {0x3041, 0x3096}, {0x3099, 0x30FF},
{0x3105, 0x312F}, {0x3131, 0x318E}, {0x3190, 0x31E3}, {0x31EF, 0x321E},
{0x3220, 0xA48C}, {0xA490, 0xA4C6}, {0xA4D0, 0xA62B}, {0xA640, 0xA6F7},
{0xA700, 0xA7CA}, {0xA7D5, 0xA7D9}, {0xA7F2, 0xA82C}, {0xA830, 0xA839},
{0xA840, 0xA877}, {0xA880, 0xA8C5}, {0xA8CE, 0xA8D9}, {0xA8E0, 0xA953},
Expand Down Expand Up @@ -788,8 +788,8 @@ static const crange graphRangeTable[] = {
{0x1FA80, 0x1FA88}, {0x1FA90, 0x1FABD}, {0x1FABF, 0x1FAC5}, {0x1FACE, 0x1FADB},
{0x1FAE0, 0x1FAE8}, {0x1FAF0, 0x1FAF8}, {0x1FB00, 0x1FB92}, {0x1FB94, 0x1FBCA},
{0x1FBF0, 0x1FBF9}, {0x20000, 0x2A6DF}, {0x2A700, 0x2B739}, {0x2B740, 0x2B81D},
{0x2B820, 0x2CEA1}, {0x2CEB0, 0x2EBE0}, {0x2F800, 0x2FA1D}, {0x30000, 0x3134A},
{0x31350, 0x323AF}, {0xE0100, 0xE01EF}
{0x2B820, 0x2CEA1}, {0x2CEB0, 0x2EBE0}, {0x2EBF0, 0x2EE5D}, {0x2F800, 0x2FA1D},
{0x30000, 0x3134A}, {0x31350, 0x323AF}, {0xE0100, 0xE01EF}
#endif
};

Expand Down
22 changes: 9 additions & 13 deletions generic/tcl.decls
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ declare 32 {
}
# Only available in Tcl 8.x, NULL in Tcl 9.0
declare 33 {
unsigned char *TclGetByteArrayFromObj(Tcl_Obj *objPtr, void *numBytesPtr)
unsigned char *Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr, int *numBytesPtr)
}
declare 34 {
int Tcl_GetDouble(Tcl_Interp *interp, const char *src, double *doublePtr)
Expand Down Expand Up @@ -2395,8 +2395,8 @@ declare 631 {
# TIP #430
declare 632 {
int TclZipfs_Mount(Tcl_Interp *interp, const char *mountPoint,
const char *zipname, const char *passwd)
int TclZipfs_Mount(Tcl_Interp *interp, const char *zipname,
const char *mountPoint, const char *passwd)
}
declare 633 {
int TclZipfs_Unmount(Tcl_Interp *interp, const char *mountPoint)
Expand All @@ -2405,8 +2405,8 @@ declare 634 {
Tcl_Obj *TclZipfs_TclLibrary(void)
}
declare 635 {
int TclZipfs_MountBuffer(Tcl_Interp *interp, const char *mountPoint,
unsigned char *data, size_t datalen, int copy)
int TclZipfs_MountBuffer(Tcl_Interp *interp, const void *data,
size_t datalen, const char *mountPoint, int copy)
}
# TIP #445
Expand Down Expand Up @@ -2482,9 +2482,11 @@ declare 651 {
declare 652 {
Tcl_UniChar *Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr, Tcl_Size *lengthPtr)
}
# Only available in Tcl 8.x, NULL in Tcl 9.0
# TIP 660
declare 653 {
unsigned char *Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr, Tcl_Size *numBytesPtr)
int Tcl_GetSizeIntFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
Tcl_Size *sizePtr)
}
# TIP #575
Expand Down Expand Up @@ -2626,12 +2628,6 @@ declare 685 {
Tcl_Obj *Tcl_DStringToObj(Tcl_DString *dsPtr)
}
# TIP 660
declare 686 {
int Tcl_GetSizeIntFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
Tcl_Size *sizePtr)
}
# ----- BASELINE -- FOR -- 8.7.0 / 9.0.0 ----- #
declare 688 {
Expand Down
8 changes: 8 additions & 0 deletions generic/tcl.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,13 @@ typedef int (Tcl_CmdObjTraceProc) (void *clientData, Tcl_Interp *interp,
int level, const char *command, Tcl_Command commandInfo, int objc,
struct Tcl_Obj *const *objv);
#endif /* TCL_NO_DEPRECATED */
#if TCL_MAJOR_VERSION > 8
typedef int (Tcl_CmdObjTraceProc2) (void *clientData, Tcl_Interp *interp,
Tcl_Size level, const char *command, Tcl_Command commandInfo, Tcl_Size objc,
struct Tcl_Obj *const *objv);
#else
#define Tcl_CmdObjTraceProc2 Tcl_CmdObjTraceProc
#endif
typedef void (Tcl_CmdObjTraceDeleteProc) (void *clientData);
typedef void (Tcl_DupInternalRepProc) (struct Tcl_Obj *srcPtr,
struct Tcl_Obj *dupPtr);
Expand All @@ -587,8 +591,12 @@ typedef void (Tcl_NamespaceDeleteProc) (void *clientData);
typedef int (Tcl_ObjCmdProc) (void *clientData, Tcl_Interp *interp,
int objc, struct Tcl_Obj *const *objv);
#endif /* TCL_NO_DEPRECATED */
#if TCL_MAJOR_VERSION > 8
typedef int (Tcl_ObjCmdProc2) (void *clientData, Tcl_Interp *interp,
Tcl_Size objc, struct Tcl_Obj *const *objv);
#else
#define Tcl_ObjCmdProc2 Tcl_ObjCmdProc
#endif
typedef int (Tcl_LibraryInitProc) (Tcl_Interp *interp);
typedef int (Tcl_LibraryUnloadProc) (Tcl_Interp *interp, int flags);
typedef void (Tcl_PanicProc) (const char *format, ...);
Expand Down
62 changes: 32 additions & 30 deletions generic/tclDecls.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ EXTERN int Tcl_GetBoolean(Tcl_Interp *interp, const char *src,
EXTERN int Tcl_GetBooleanFromObj(Tcl_Interp *interp,
Tcl_Obj *objPtr, int *intPtr);
/* 33 */
EXTERN unsigned char * TclGetByteArrayFromObj(Tcl_Obj *objPtr,
void *numBytesPtr);
EXTERN unsigned char * Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr,
int *numBytesPtr);
/* 34 */
EXTERN int Tcl_GetDouble(Tcl_Interp *interp, const char *src,
double *doublePtr);
Expand Down Expand Up @@ -1700,7 +1700,7 @@ EXTERN Tcl_Channel Tcl_OpenTcpServerEx(Tcl_Interp *interp,
void *callbackData);
/* 632 */
EXTERN int TclZipfs_Mount(Tcl_Interp *interp,
const char *mountPoint, const char *zipname,
const char *zipname, const char *mountPoint,
const char *passwd);
/* 633 */
EXTERN int TclZipfs_Unmount(Tcl_Interp *interp,
Expand All @@ -1709,8 +1709,8 @@ EXTERN int TclZipfs_Unmount(Tcl_Interp *interp,
EXTERN Tcl_Obj * TclZipfs_TclLibrary(void);
/* 635 */
EXTERN int TclZipfs_MountBuffer(Tcl_Interp *interp,
const char *mountPoint, unsigned char *data,
size_t datalen, int copy);
const void *data, size_t datalen,
const char *mountPoint, int copy);
/* 636 */
EXTERN void Tcl_FreeInternalRep(Tcl_Obj *objPtr);
/* 637 */
Expand Down Expand Up @@ -1760,8 +1760,8 @@ EXTERN char * Tcl_GetStringFromObj(Tcl_Obj *objPtr,
EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr,
Tcl_Size *lengthPtr);
/* 653 */
EXTERN unsigned char * Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr,
Tcl_Size *numBytesPtr);
EXTERN int Tcl_GetSizeIntFromObj(Tcl_Interp *interp,
Tcl_Obj *objPtr, Tcl_Size *sizePtr);
/* 654 */
EXTERN int Tcl_UtfCharComplete(const char *src, Tcl_Size length);
/* 655 */
Expand Down Expand Up @@ -1866,9 +1866,7 @@ EXTERN int Tcl_GetWideUIntFromObj(Tcl_Interp *interp,
Tcl_Obj *objPtr, Tcl_WideUInt *uwidePtr);
/* 685 */
EXTERN Tcl_Obj * Tcl_DStringToObj(Tcl_DString *dsPtr);
/* 686 */
EXTERN int Tcl_GetSizeIntFromObj(Tcl_Interp *interp,
Tcl_Obj *objPtr, Tcl_Size *sizePtr);
/* Slot 686 is reserved */
/* Slot 687 is reserved */
/* 688 */
EXTERN void TclUnusedStubEntry(void);
Expand Down Expand Up @@ -1916,7 +1914,7 @@ typedef struct TclStubs {
void (*tclFreeObj) (Tcl_Obj *objPtr); /* 30 */
int (*tcl_GetBoolean) (Tcl_Interp *interp, const char *src, int *intPtr); /* 31 */
int (*tcl_GetBooleanFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *intPtr); /* 32 */
unsigned char * (*tclGetByteArrayFromObj) (Tcl_Obj *objPtr, void *numBytesPtr); /* 33 */
unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj *objPtr, int *numBytesPtr); /* 33 */
int (*tcl_GetDouble) (Tcl_Interp *interp, const char *src, double *doublePtr); /* 34 */
int (*tcl_GetDoubleFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, double *doublePtr); /* 35 */
void (*reserved36)(void);
Expand Down Expand Up @@ -2515,10 +2513,10 @@ typedef struct TclStubs {
int (*tcl_FSUnloadFile) (Tcl_Interp *interp, Tcl_LoadHandle handlePtr); /* 629 */
void (*tcl_ZlibStreamSetCompressionDictionary) (Tcl_ZlibStream zhandle, Tcl_Obj *compressionDictionaryObj); /* 630 */
Tcl_Channel (*tcl_OpenTcpServerEx) (Tcl_Interp *interp, const char *service, const char *host, unsigned int flags, int backlog, Tcl_TcpAcceptProc *acceptProc, void *callbackData); /* 631 */
int (*tclZipfs_Mount) (Tcl_Interp *interp, const char *mountPoint, const char *zipname, const char *passwd); /* 632 */
int (*tclZipfs_Mount) (Tcl_Interp *interp, const char *zipname, const char *mountPoint, const char *passwd); /* 632 */
int (*tclZipfs_Unmount) (Tcl_Interp *interp, const char *mountPoint); /* 633 */
Tcl_Obj * (*tclZipfs_TclLibrary) (void); /* 634 */
int (*tclZipfs_MountBuffer) (Tcl_Interp *interp, const char *mountPoint, unsigned char *data, size_t datalen, int copy); /* 635 */
int (*tclZipfs_MountBuffer) (Tcl_Interp *interp, const void *data, size_t datalen, const char *mountPoint, int copy); /* 635 */
void (*tcl_FreeInternalRep) (Tcl_Obj *objPtr); /* 636 */
char * (*tcl_InitStringRep) (Tcl_Obj *objPtr, const char *bytes, TCL_HASH_TYPE numBytes); /* 637 */
Tcl_ObjInternalRep * (*tcl_FetchInternalRep) (Tcl_Obj *objPtr, const Tcl_ObjType *typePtr); /* 638 */
Expand All @@ -2536,7 +2534,7 @@ typedef struct TclStubs {
unsigned char * (*tcl_GetBytesFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Size *numBytesPtr); /* 650 */
char * (*tcl_GetStringFromObj) (Tcl_Obj *objPtr, Tcl_Size *lengthPtr); /* 651 */
Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj *objPtr, Tcl_Size *lengthPtr); /* 652 */
unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj *objPtr, Tcl_Size *numBytesPtr); /* 653 */
int (*tcl_GetSizeIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Size *sizePtr); /* 653 */
int (*tcl_UtfCharComplete) (const char *src, Tcl_Size length); /* 654 */
const char * (*tcl_UtfNext) (const char *src); /* 655 */
const char * (*tcl_UtfPrev) (const char *src, const char *start); /* 656 */
Expand Down Expand Up @@ -2569,7 +2567,7 @@ typedef struct TclStubs {
Tcl_Size (*tcl_GetEncodingNulLength) (Tcl_Encoding encoding); /* 683 */
int (*tcl_GetWideUIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_WideUInt *uwidePtr); /* 684 */
Tcl_Obj * (*tcl_DStringToObj) (Tcl_DString *dsPtr); /* 685 */
int (*tcl_GetSizeIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Size *sizePtr); /* 686 */
void (*reserved686)(void);
void (*reserved687)(void);
void (*tclUnusedStubEntry) (void); /* 688 */
} TclStubs;
Expand Down Expand Up @@ -2650,8 +2648,8 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_GetBoolean) /* 31 */
#define Tcl_GetBooleanFromObj \
(tclStubsPtr->tcl_GetBooleanFromObj) /* 32 */
#define TclGetByteArrayFromObj \
(tclStubsPtr->tclGetByteArrayFromObj) /* 33 */
#define Tcl_GetByteArrayFromObj \
(tclStubsPtr->tcl_GetByteArrayFromObj) /* 33 */
#define Tcl_GetDouble \
(tclStubsPtr->tcl_GetDouble) /* 34 */
#define Tcl_GetDoubleFromObj \
Expand Down Expand Up @@ -3830,8 +3828,8 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_GetStringFromObj) /* 651 */
#define Tcl_GetUnicodeFromObj \
(tclStubsPtr->tcl_GetUnicodeFromObj) /* 652 */
#define Tcl_GetByteArrayFromObj \
(tclStubsPtr->tcl_GetByteArrayFromObj) /* 653 */
#define Tcl_GetSizeIntFromObj \
(tclStubsPtr->tcl_GetSizeIntFromObj) /* 653 */
#define Tcl_UtfCharComplete \
(tclStubsPtr->tcl_UtfCharComplete) /* 654 */
#define Tcl_UtfNext \
Expand Down Expand Up @@ -3896,8 +3894,7 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_GetWideUIntFromObj) /* 684 */
#define Tcl_DStringToObj \
(tclStubsPtr->tcl_DStringToObj) /* 685 */
#define Tcl_GetSizeIntFromObj \
(tclStubsPtr->tcl_GetSizeIntFromObj) /* 686 */
/* Slot 686 is reserved */
/* Slot 687 is reserved */
#define TclUnusedStubEntry \
(tclStubsPtr->tclUnusedStubEntry) /* 688 */
Expand Down Expand Up @@ -4044,8 +4041,6 @@ extern const TclStubs *tclStubsPtr;
#undef Tcl_GetIndexFromObjStruct
#undef Tcl_GetBooleanFromObj
#undef Tcl_GetBoolean
#undef TclGetByteArrayFromObj
#undef Tcl_GetByteArrayFromObj
#if defined(USE_TCL_STUBS)
# if TCL_MAJOR_VERSION < 9 || !defined(TCL_NO_DEPRECATED)
# define Tcl_GetBytesFromObj(interp, objPtr, sizePtr) \
Expand All @@ -4071,15 +4066,12 @@ extern const TclStubs *tclStubsPtr;
((sizeof(*(boolPtr)) == sizeof(int) && (TCL_MAJOR_VERSION == 8)) ? tclStubsPtr->tcl_GetBoolean(interp, src, (int *)(boolPtr)) : \
Tcl_GetBool(interp, src, (TCL_NULL_OK-2)&(int)sizeof((*(boolPtr))), (char *)(boolPtr)))
#if TCL_MAJOR_VERSION > 8
#undef Tcl_GetByteArrayFromObj
#define Tcl_GetByteArrayFromObj(objPtr, sizePtr) \
(sizeof(*(sizePtr)) <= sizeof(int) ? \
tclStubsPtr->tclGetBytesFromObj(NULL, objPtr, (sizePtr)) : \
tclStubsPtr->tcl_GetBytesFromObj(NULL, objPtr, (Tcl_Size *)(void *)(sizePtr)))
#else
#define Tcl_GetByteArrayFromObj(objPtr, sizePtr) \
(sizeof(*(sizePtr)) <= sizeof(int) ? \
tclStubsPtr->tclGetByteArrayFromObj(objPtr, (sizePtr)) : \
tclStubsPtr->tcl_GetByteArrayFromObj(objPtr, (Tcl_Size *)(void *)(sizePtr)))

#endif
#else
#define Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags, indexPtr) \
Expand All @@ -4091,9 +4083,10 @@ extern const TclStubs *tclStubsPtr;
#define Tcl_GetBoolean(interp, src, boolPtr) \
((sizeof(*(boolPtr)) == sizeof(int) && (TCL_MAJOR_VERSION == 8)) ? Tcl_GetBoolean(interp, src, (int *)(boolPtr)) : \
Tcl_GetBool(interp, src, (TCL_NULL_OK-2)&(int)sizeof((*(boolPtr))), (char *)(boolPtr)))
#undef Tcl_GetByteArrayFromObj
#if defined(TCL_NO_DEPRECATED)
#define Tcl_GetByteArrayFromObj(objPtr, sizePtr) \
(Tcl_GetBytesFromObj)(NULL, objPtr, (Tcl_Size *)(void *)(sizePtr))
(Tcl_GetBytesFromObj)(NULL, objPtr, (sizePtr))
#else
#define Tcl_GetByteArrayFromObj(objPtr, sizePtr) \
(sizeof(*(sizePtr)) <= sizeof(int) ? \
Expand Down Expand Up @@ -4279,8 +4272,17 @@ extern const TclStubs *tclStubsPtr;
# define Tcl_GetMaster Tcl_GetParent
#endif

/* TIP #660 for 8.7 */
#if TCL_MAJOR_VERSION < 9
/* TIP #627 for 8.7 */
# undef Tcl_CreateObjCommand2
# define Tcl_CreateObjCommand2 Tcl_CreateObjCommand
# undef Tcl_CreateObjTrace2
# define Tcl_CreateObjTrace2 Tcl_CreateObjTrace
# undef Tcl_NRCreateCommand2
# define Tcl_NRCreateCommand2 Tcl_NRCreateCommand
# undef Tcl_NRCallObjProc2
# define Tcl_NRCallObjProc2 Tcl_NRCallObjProc
/* TIP #660 for 8.7 */
# undef Tcl_GetSizeIntFromObj
# define Tcl_GetSizeIntFromObj Tcl_GetIntFromObj
#endif
Expand Down
Loading

0 comments on commit 3824998

Please sign in to comment.