summaryrefslogtreecommitdiff
path: root/storage/connect/global.h
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2021-02-16 14:56:59 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2021-02-16 14:56:59 +0100
commite0072fadcb00edae74e748aee3148075b9cddae2 (patch)
tree625d5c0869cfbb322a2b4cdaab453e17fd5d31bf /storage/connect/global.h
parent1146e98b3af3e2b15df0598a860f4571663a98d0 (diff)
parentae7989ca2059869f81c837509e5ff554f7f63562 (diff)
downloadmariadb-git-10.6-halfmerge.tar.gz
Merge branch 'bb-10.5-release' into bb-10.6-release10.6-halfmerge
Diffstat (limited to 'storage/connect/global.h')
-rw-r--r--storage/connect/global.h27
1 files changed, 4 insertions, 23 deletions
diff --git a/storage/connect/global.h b/storage/connect/global.h
index d17620861fa..8774285e54b 100644
--- a/storage/connect/global.h
+++ b/storage/connect/global.h
@@ -185,7 +185,7 @@ typedef struct _global { /* Global structure */
size_t Sarea_Size; /* Work area size */
PACTIVITY Activityp;
char Message[MAX_STR]; /* Message (result, error, trace) */
- ulong More; /* Used by jsonudf */
+ size_t More; /* Used by jsonudf */
size_t Saved_Size; /* Saved work area to_free */
bool Createas; /* To pass multi to ext tables */
void *Xchk; /* indexes in create/alter */
@@ -208,7 +208,7 @@ DllExport char *PlugGetMessage(PGLOBAL, int);
DllExport short GetLineLength(PGLOBAL); // Console line length
#endif // __WIN__
DllExport PGLOBAL PlugInit(LPCSTR, size_t); // Plug global initialization
-DllExport int PlugExit(PGLOBAL); // Plug global termination
+DllExport PGLOBAL PlugExit(PGLOBAL); // Plug global termination
DllExport LPSTR PlugRemoveType(LPSTR, LPCSTR);
DllExport LPCSTR PlugSetPath(LPSTR to, LPCSTR prefix, LPCSTR name, LPCSTR dir);
DllExport BOOL PlugIsAbsolutePath(LPCSTR path);
@@ -220,30 +220,11 @@ DllExport char *PlugDup(PGLOBAL g, const char *str);
DllExport void htrc(char const *fmt, ...);
DllExport void xtrc(uint, char const* fmt, ...);
DllExport uint GetTraceValue(void);
+DllExport void* MakePtr(void* memp, size_t offset);
+DllExport size_t MakeOff(void* memp, void* ptr);
#if defined(__cplusplus)
} // extern "C"
#endif
-/***********************************************************************/
-/* Inline routine definitions. */
-/***********************************************************************/
-/***********************************************************************/
-/* This routine makes a pointer from an offset to a memory pointer. */
-/***********************************************************************/
-inline void* MakePtr(void* memp, size_t offset) {
- // return ((offset == 0) ? NULL : &((char*)memp)[offset]);
- return (!offset) ? NULL : (char *)memp + offset;
-} /* end of MakePtr */
-
-/***********************************************************************/
-/* This routine makes an offset from a pointer new format. */
-/***********************************************************************/
-inline size_t MakeOff(void* memp, void* ptr) {
-#if defined(_DEBUG)
- assert(ptr > memp);
-#endif // _DEBUG
- return ((!ptr) ? 0 : (size_t)((char*)ptr - (size_t)memp));
-} /* end of MakeOff */
-
/*-------------------------- End of Global.H --------------------------*/