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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
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 {
TYPVAL
(
void
)
:
VALUE
(
TYPE_ERROR
)
{}
// Specialized functions
template
<
class
T
YPE
>
T
YPE
GetTypedValue
(
PVAL
vp
,
TYPE
t
)
{
return
vp
->
GetIntValue
();}
template
<
class
T
>
T
GetTypedValue
(
PVAL
vp
,
T
t
)
{
return
vp
->
GetIntValue
();}
PSZ
GetTypedValue
(
PVAL
vp
,
PSZ
t
)
{
char
buf
[
32
];
return
strncpy
(
Tval
,
vp
->
GetCharString
(
buf
),
Len
);}
short
GetTypedValue
(
PVAL
vp
,
short
t
)
{
return
vp
->
GetShortValue
();}
longlong
GetTypedValue
(
PVAL
vp
,
longlong
t
)
{
return
vp
->
GetBigintValue
();}
double
GetTypedValue
(
PVAL
vp
,
double
t
)
{
return
vp
->
GetFloatValue
();}
template
<
class
T
YPE
>
T
YPE
GetTypedValue
(
PVBLK
blk
,
int
n
,
TYPE
t
)
template
<
class
T
>
T
GetTypedValue
(
PVBLK
blk
,
int
n
,
T
t
)
{
return
blk
->
GetIntValue
(
n
);}
PSZ
GetTypedValue
(
PVBLK
blk
,
int
n
,
PSZ
t
)
{
return
strncpy
(
Tval
,
blk
->
GetCharValue
(
n
),
Len
);}
...
...
@@ -203,8 +203,8 @@ class DllExport TYPVAL : public VALUE {
double
GetTypedValue
(
PVBLK
blk
,
int
n
,
double
t
)
{
return
blk
->
GetFloatValue
(
n
);}
template
<
class
T
YPE
>
T
YPE
GetTypedValue
(
PSZ
s
,
TYPE
n
)
{
return
atol
(
s
);}
template
<
class
T
>
T
GetTypedValue
(
PSZ
s
,
T
n
)
{
return
atol
(
s
);}
PSZ
GetTypedValue
(
PSZ
s
,
PSZ
n
)
{
return
strncpy
(
Tval
,
s
,
Len
);}
short
GetTypedValue
(
PSZ
s
,
short
n
)
{
return
atoi
(
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