diff options
author | unknown <marko@hundin.mysql.fi> | 2004-03-12 22:55:46 +0200 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-03-12 22:55:46 +0200 |
commit | 635b9d78580fc6f9429edc0c9e99a5a98f1c0e14 (patch) | |
tree | 48ece7d221b8f8694f671b2338767ed187262074 /innobase/include | |
parent | 454b01928abfe240be63b0bf6fc2e7bbd4303a1f (diff) | |
download | mariadb-git-635b9d78580fc6f9429edc0c9e99a5a98f1c0e14.tar.gz |
InnoDB: remove redundant functions mach_write() and mach_read()
innobase/include/mach0data.h:
Remove mach_write() and mach_read()
innobase/include/mach0data.ic:
Remove mach_write() and mach_read()
innobase/mem/mem0dbg.c:
Replace mach_write() with mach_write_to_4()
Replace mach_read() with mach_read_from_4()
Diffstat (limited to 'innobase/include')
-rw-r--r-- | innobase/include/mach0data.h | 19 | ||||
-rw-r--r-- | innobase/include/mach0data.ic | 38 |
2 files changed, 0 insertions, 57 deletions
diff --git a/innobase/include/mach0data.h b/innobase/include/mach0data.h index 006f55d5f1f..f28c9422670 100644 --- a/innobase/include/mach0data.h +++ b/innobase/include/mach0data.h @@ -88,25 +88,6 @@ mach_read_from_4( /*=============*/ /* out: ulint integer */ byte* b); /* in: pointer to four bytes */ -/*********************************************************** -The following function is used to store data from a ulint to memory -in standard order: -we store the most significant byte to the lowest address. */ -UNIV_INLINE -void -mach_write( -/*=======*/ - byte* b, /* in: pointer to sizeof(ulint) bytes where to store */ - ulint n); /* in: ulint integer to be stored */ -/************************************************************ -The following function is used to fetch data from memory to a ulint. -The most significant byte is at the lowest address. */ -UNIV_INLINE -ulint -mach_read( -/*======*/ - /* out: ulint integer */ - byte* b); /* in: pointer to sizeof(ulint) bytes */ /************************************************************* Writes a ulint in a compressed form. */ UNIV_INLINE diff --git a/innobase/include/mach0data.ic b/innobase/include/mach0data.ic index 1d6badd035b..65e5df2178e 100644 --- a/innobase/include/mach0data.ic +++ b/innobase/include/mach0data.ic @@ -167,44 +167,6 @@ mach_read_from_4( #endif } -/*********************************************************** -The following function is used to store data from a ulint to memory -in standard order: we store the most significant byte to the lowest -address. */ -UNIV_INLINE -void -mach_write( -/*=======*/ - byte* b, /* in: pointer to 4 bytes where to store */ - ulint n) /* in: ulint integer to be stored */ -{ - ut_ad(b); - - b[0] = (byte)(n >> 24); - b[1] = (byte)(n >> 16); - b[2] = (byte)(n >> 8); - b[3] = (byte)n; -} - -/************************************************************ -The following function is used to fetch data from memory to a ulint. -The most significant byte is at the lowest address. */ -UNIV_INLINE -ulint -mach_read( -/*======*/ - /* out: ulint integer */ - byte* b) /* in: pointer to 4 bytes */ -{ - ut_ad(b); - - return( ((ulint)(b[0]) << 24) - + ((ulint)(b[1]) << 16) - + ((ulint)(b[2]) << 8) - + (ulint)(b[3]) - ); -} - /************************************************************* Writes a ulint in a compressed form where the first byte codes the length of the stored ulint. We look at the most significant bits of |