Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
7879632c
Commit
7879632c
authored
Feb 27, 2013
by
Olivier Bertrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Change Subclass name from TYPE to T
modified: storage/connect/value.h
parent
7132c590
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
storage/connect/value.h
storage/connect/value.h
+6
-6
No files found.
storage/connect/value.h
View file @
7879632c
...
@@ -183,16 +183,16 @@ class DllExport TYPVAL : public VALUE {
...
@@ -183,16 +183,16 @@ class DllExport TYPVAL : public VALUE {
TYPVAL
(
void
)
:
VALUE
(
TYPE_ERROR
)
{}
TYPVAL
(
void
)
:
VALUE
(
TYPE_ERROR
)
{}
// Specialized functions
// Specialized functions
template
<
class
T
YPE
>
template
<
class
T
>
T
YPE
GetTypedValue
(
PVAL
vp
,
TYPE
t
)
{
return
vp
->
GetIntValue
();}
T
GetTypedValue
(
PVAL
vp
,
T
t
)
{
return
vp
->
GetIntValue
();}
PSZ
GetTypedValue
(
PVAL
vp
,
PSZ
t
)
PSZ
GetTypedValue
(
PVAL
vp
,
PSZ
t
)
{
char
buf
[
32
];
return
strncpy
(
Tval
,
vp
->
GetCharString
(
buf
),
Len
);}
{
char
buf
[
32
];
return
strncpy
(
Tval
,
vp
->
GetCharString
(
buf
),
Len
);}
short
GetTypedValue
(
PVAL
vp
,
short
t
)
{
return
vp
->
GetShortValue
();}
short
GetTypedValue
(
PVAL
vp
,
short
t
)
{
return
vp
->
GetShortValue
();}
longlong
GetTypedValue
(
PVAL
vp
,
longlong
t
)
{
return
vp
->
GetBigintValue
();}
longlong
GetTypedValue
(
PVAL
vp
,
longlong
t
)
{
return
vp
->
GetBigintValue
();}
double
GetTypedValue
(
PVAL
vp
,
double
t
)
{
return
vp
->
GetFloatValue
();}
double
GetTypedValue
(
PVAL
vp
,
double
t
)
{
return
vp
->
GetFloatValue
();}
template
<
class
T
YPE
>
template
<
class
T
>
T
YPE
GetTypedValue
(
PVBLK
blk
,
int
n
,
TYPE
t
)
T
GetTypedValue
(
PVBLK
blk
,
int
n
,
T
t
)
{
return
blk
->
GetIntValue
(
n
);}
{
return
blk
->
GetIntValue
(
n
);}
PSZ
GetTypedValue
(
PVBLK
blk
,
int
n
,
PSZ
t
)
PSZ
GetTypedValue
(
PVBLK
blk
,
int
n
,
PSZ
t
)
{
return
strncpy
(
Tval
,
blk
->
GetCharValue
(
n
),
Len
);}
{
return
strncpy
(
Tval
,
blk
->
GetCharValue
(
n
),
Len
);}
...
@@ -203,8 +203,8 @@ class DllExport TYPVAL : public VALUE {
...
@@ -203,8 +203,8 @@ class DllExport TYPVAL : public VALUE {
double
GetTypedValue
(
PVBLK
blk
,
int
n
,
double
t
)
double
GetTypedValue
(
PVBLK
blk
,
int
n
,
double
t
)
{
return
blk
->
GetFloatValue
(
n
);}
{
return
blk
->
GetFloatValue
(
n
);}
template
<
class
T
YPE
>
template
<
class
T
>
T
YPE
GetTypedValue
(
PSZ
s
,
TYPE
n
)
{
return
atol
(
s
);}
T
GetTypedValue
(
PSZ
s
,
T
n
)
{
return
atol
(
s
);}
PSZ
GetTypedValue
(
PSZ
s
,
PSZ
n
)
{
return
strncpy
(
Tval
,
s
,
Len
);}
PSZ
GetTypedValue
(
PSZ
s
,
PSZ
n
)
{
return
strncpy
(
Tval
,
s
,
Len
);}
short
GetTypedValue
(
PSZ
s
,
short
n
)
{
return
atoi
(
s
);}
short
GetTypedValue
(
PSZ
s
,
short
n
)
{
return
atoi
(
s
);}
longlong
GetTypedValue
(
PSZ
s
,
longlong
n
)
{
return
atoll
(
s
);}
longlong
GetTypedValue
(
PSZ
s
,
longlong
n
)
{
return
atoll
(
s
);}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment