Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf230e27

Browse files
committed
Add support for Tcl 9
Tcl 9 changed several API functions to take Tcl_Size, which isptrdiff_t, instead of int, for 64-bit enablement. We have to change afew local variables to be compatible with that. We also provide afallback typedef of Tcl_Size for older Tcl versions.The affected variables are used for quantities that will not approachvalues beyond the range of int, so this doesn't change anyfunctionality.Reviewed-by: Tristan Partin <tristan@partin.io>Discussion:https://www.postgresql.org/message-id/flat/bce0fe54-75b4-438e-b42b-8e84bc7c0e9c%40eisentraut.org
1 parent13242b6 commitf230e27

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

‎src/pl/tcl/pltcl.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ PG_MODULE_MAGIC;
5656
#defineCONST86
5757
#endif
5858

59+
#if !HAVE_TCL_VERSION(8,7)
60+
typedefintTcl_Size;
61+
#endif
62+
5963
/* define our text domain for translations */
6064
#undef TEXTDOMAIN
6165
#defineTEXTDOMAIN PG_TEXTDOMAIN("pltcl")
@@ -983,7 +987,7 @@ pltcl_func_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state,
983987
HeapTupletup;
984988
Tcl_Obj*resultObj;
985989
Tcl_Obj**resultObjv;
986-
intresultObjc;
990+
Tcl_SizeresultObjc;
987991

988992
/*
989993
* Set up data about result type. XXX it's tempting to consider
@@ -1059,7 +1063,7 @@ pltcl_trigger_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state,
10591063
inttcl_rc;
10601064
inti;
10611065
constchar*result;
1062-
intresult_Objc;
1066+
Tcl_Sizeresult_Objc;
10631067
Tcl_Obj**result_Objv;
10641068
intrcPG_USED_FOR_ASSERTS_ONLY;
10651069

@@ -2008,7 +2012,7 @@ pltcl_quote(ClientData cdata, Tcl_Interp *interp,
20082012
char*tmp;
20092013
constchar*cp1;
20102014
char*cp2;
2011-
intlength;
2015+
Tcl_Sizelength;
20122016

20132017
/************************************************************
20142018
* Check call syntax
@@ -2202,7 +2206,7 @@ pltcl_returnnext(ClientData cdata, Tcl_Interp *interp,
22022206
if (prodesc->fn_retistuple)
22032207
{
22042208
Tcl_Obj**rowObjv;
2205-
introwObjc;
2209+
Tcl_SizerowObjc;
22062210

22072211
/* result should be a list, so break it down */
22082212
if (Tcl_ListObjGetElements(interp,objv[1],&rowObjc,&rowObjv)==TCL_ERROR)
@@ -2542,7 +2546,7 @@ pltcl_SPI_prepare(ClientData cdata, Tcl_Interp *interp,
25422546
intobjc,Tcl_Obj*constobjv[])
25432547
{
25442548
volatileMemoryContextplan_cxt=NULL;
2545-
intnargs;
2549+
Tcl_Sizenargs;
25462550
Tcl_Obj**argsObj;
25472551
pltcl_query_desc*qdesc;
25482552
inti;
@@ -2679,7 +2683,7 @@ pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp *interp,
26792683
constchar*arrayname=NULL;
26802684
Tcl_Obj*loop_body=NULL;
26812685
intcount=0;
2682-
intcallObjc;
2686+
Tcl_SizecallObjc;
26832687
Tcl_Obj**callObjv=NULL;
26842688
Datum*argvalues;
26852689
MemoryContextoldcontext=CurrentMemoryContext;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp