summaryrefslogtreecommitdiffstats
path: root/Help/module/FindLua51.rst
blob: 672ff357b57079c2f4f4f6961ccc856f7e91b7dc (plain)
1
.. cmake-module:: ../../Modules/FindLua51.cmake
cation'>better_deprecation Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-09-13 10:14:31 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-09-13 10:14:31 (GMT)
commit9d6ae5462247cf6c5ce043e4689c3e5210628e93 (patch)
tree6461d7a562bf2e681c2cf49147418c2349f58c07 /generic
parentb9e8eecd80020e9dc1539f6f99f121472aff3126 (diff)
downloadtcl-9d6ae5462247cf6c5ce043e4689c3e5210628e93.zip
tcl-9d6ae5462247cf6c5ce043e4689c3e5210628e93.tar.gz
tcl-9d6ae5462247cf6c5ce043e4689c3e5210628e93.tar.bz2
Make mp_get_long and mp_set_long available to tommath-enabled Tcl extensions. Deprecate the internal TclBNInitBignumFrom* functions, in favor of the official tommath functions with the same purpose.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclBasic.c4
-rw-r--r--generic/tclBinary.c2
-rw-r--r--generic/tclDecls.h9
-rw-r--r--generic/tclExecute.c6
-rw-r--r--generic/tclInt.h4
-rw-r--r--generic/tclObj.c6
-rw-r--r--generic/tclStrToD.c32
-rw-r--r--generic/tclStubInit.c6
-rw-r--r--generic/tclTomMath.decls12
-rw-r--r--generic/tclTomMathDecls.h17
-rw-r--r--generic/tclTomMathInterface.c89
11 files changed, 86 insertions, 101 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index cceef45..d4fa833 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -7460,7 +7460,7 @@ ExprAbsFunc(
}
goto unChanged;
} else if (l == LONG_MIN) {
- TclBNInitBignumFromLong(&big, l);
+ TclInitBignumFromLong(&big, l);
goto tooLarge;
}
Tcl_SetObjResult(interp, Tcl_NewLongObj(-l));
@@ -7495,7 +7495,7 @@ ExprAbsFunc(
goto unChanged;
}
if (w == LLONG_MIN) {
- TclBNInitBignumFromWideInt(&big, w);
+ TclInitBignumFromWideInt(&big, w);
goto tooLarge;
}
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(-w));
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index a693894..cb5a5cb 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -2284,7 +2284,7 @@ ScanNumber(
Tcl_Obj *bigObj = NULL;
mp_int big;
- TclBNInitBignumFromWideUInt(&big, uwvalue);
+ TclInitBignumFromWideUInt(&big, uwvalue);
bigObj = Tcl_NewBignumObj(&big);
return bigObj;
}
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index d543238..464fc0f 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -23,6 +23,15 @@
# endif
#endif
+#if !defined(BUILD_tcl)
+# define TCL_DEPRECATED(msg) EXTERN TCL_DEPRECATED_API(msg)
+#elif defined(TCL_NO_DEPRECATED)
+# define TCL_DEPRECATED(msg) MODULE_SCOPE
+#else
+# define TCL_DEPRECATED(msg) EXTERN
+#endif
+
+
/*
* WARNING: This file is automatically generated by the tools/genStubs.tcl
* script. Any modifications to the function declarations below should be made
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 0113b28..f4c71ec 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -8218,7 +8218,7 @@ ExecuteExtendedBinaryMathOp(
* Arguments are opposite sign; remainder is sum.
*/
- TclBNInitBignumFromWideInt(&big1, w1);
+ TclInitBignumFromWideInt(&big1, w1);
mp_add(&big2, &big1, &big2);
mp_clear(&big1);
BIG_RESULT(&big2);
@@ -9184,7 +9184,7 @@ ExecuteExtendedUnaryMathOp(
if (w != LLONG_MIN) {
WIDE_RESULT(-w);
}
- TclBNInitBignumFromLong(&big, *(const long *) ptr);
+ TclInitBignumFromLong(&big, *(const long *) ptr);
break;
#ifndef TCL_WIDE_INT_IS_LONG
case TCL_NUMBER_WIDE:
@@ -9192,7 +9192,7 @@ ExecuteExtendedUnaryMathOp(
if (w != LLONG_MIN) {
WIDE_RESULT(-w);
}
- TclBNInitBignumFromWideInt(&big, w);
+ TclInitBignumFromWideInt(&big, w);
break;
#endif
default:
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 118af85..9a657de 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -2757,6 +2757,10 @@ MODULE_SCOPE long tclObjsShared[TCL_MAX_SHARED_OBJ_STATS];
MODULE_SCOPE char tclEmptyString;
+MODULE_SCOPE void TclInitBignumFromLong(mp_int *, long);
+MODULE_SCOPE void TclInitBignumFromWideInt(mp_int *, Tcl_WideInt);
+MODULE_SCOPE void TclInitBignumFromWideUInt(mp_int *, Tcl_WideUInt);
+
/*
*----------------------------------------------------------------
* Procedures shared among Tcl modules but not used by the outside world,
diff --git a/generic/tclObj.c b/generic/tclObj.c
index f4b81f2..1a00011 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -3038,7 +3038,7 @@ Tcl_SetWideIntObj(
#else
mp_int big;
- TclBNInitBignumFromWideInt(&big, wideValue);
+ TclInitBignumFromWideInt(&big, wideValue);
Tcl_SetBignumObj(objPtr, &big);
#endif
}
@@ -3402,12 +3402,12 @@ GetBignumFromObj(
return TCL_OK;
}
if (objPtr->typePtr == &tclIntType) {
- TclBNInitBignumFromLong(bignumValue, objPtr->internalRep.longValue);
+ TclInitBignumFromLong(bignumValue, objPtr->internalRep.longValue);
return TCL_OK;
}
#ifndef TCL_WIDE_INT_IS_LONG
if (objPtr->typePtr == &tclWideIntType) {
- TclBNInitBignumFromWideInt(bignumValue,
+ TclInitBignumFromWideInt(bignumValue,
objPtr->internalRep.wideValue);
return TCL_OK;
}
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c