Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
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
Abuhujair Javed
Postgres FD Implementation
Commits
ae64196a
Commit
ae64196a
authored
Sep 19, 2001
by
D'Arcy J.M. Cain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change the version. We are moving towards the next release.
Fixed a nasty bug that messed up negative money amounts.
parent
9e774ca4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
9 deletions
+31
-9
src/interfaces/python/pgmodule.c
src/interfaces/python/pgmodule.c
+31
-9
No files found.
src/interfaces/python/pgmodule.c
View file @
ae64196a
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
#include <string.h>
#include <string.h>
static
PyObject
*
PGError
;
static
PyObject
*
PGError
;
static
const
char
*
PyPgVersion
=
"3.
2
"
;
static
const
char
*
PyPgVersion
=
"3.
3
"
;
/* taken from fileobject.c */
/* taken from fileobject.c */
#define BUF(v) PyString_AS_STRING((PyStringObject *)(v))
#define BUF(v) PyString_AS_STRING((PyStringObject *)(v))
...
@@ -1844,21 +1844,32 @@ pgquery_getresult(pgqueryobject * self, PyObject * args)
...
@@ -1844,21 +1844,32 @@ pgquery_getresult(pgqueryobject * self, PyObject * args)
val
=
PyFloat_FromDouble
(
strtod
(
s
,
NULL
));
val
=
PyFloat_FromDouble
(
strtod
(
s
,
NULL
));
break
;
break
;
case
3
:
/* get rid of the '$' and commas */
case
3
:
{
int
mult
=
1
;
if
(
*
s
==
'$'
)
/* there's talk of getting rid of
if
(
*
s
==
'$'
)
/* there's talk of getting rid of
* it */
* it */
s
++
;
s
++
;
if
((
s
[
0
]
==
'-'
||
s
[
0
]
==
'('
)
&&
s
[
1
]
==
'$'
)
if
(
*
s
==
'-'
||
*
s
==
'('
)
*
(
++
s
)
=
'-'
;
{
s
++
;
mult
=
-
1
;
}
/* get rid of the '$' and commas */
if
(
*
s
==
'$'
)
/* Just in case we exposed one */
s
++
;
for
(
k
=
0
;
*
s
;
s
++
)
for
(
k
=
0
;
*
s
;
s
++
)
if
(
*
s
!=
','
)
if
(
*
s
!=
','
)
cashbuf
[
k
++
]
=
*
s
;
cashbuf
[
k
++
]
=
*
s
;
cashbuf
[
k
]
=
0
;
cashbuf
[
k
]
=
0
;
val
=
PyFloat_FromDouble
(
strtod
(
cashbuf
,
NULL
));
val
=
PyFloat_FromDouble
(
strtod
(
cashbuf
,
NULL
)
*
mult
);
break
;
break
;
}
default:
default:
val
=
PyString_FromString
(
s
);
val
=
PyString_FromString
(
s
);
...
@@ -1980,21 +1991,32 @@ pgquery_dictresult(pgqueryobject * self, PyObject * args)
...
@@ -1980,21 +1991,32 @@ pgquery_dictresult(pgqueryobject * self, PyObject * args)
val
=
PyFloat_FromDouble
(
strtod
(
s
,
NULL
));
val
=
PyFloat_FromDouble
(
strtod
(
s
,
NULL
));
break
;
break
;
case
3
:
/* get rid of the '$' and commas */
case
3
:
{
int
mult
=
1
;
if
(
*
s
==
'$'
)
/* there's talk of getting rid of
if
(
*
s
==
'$'
)
/* there's talk of getting rid of
* it */
* it */
s
++
;
s
++
;
if
((
s
[
0
]
==
'-'
||
s
[
0
]
==
'('
)
&&
s
[
1
]
==
'$'
)
if
(
*
s
==
'-'
||
*
s
==
'('
)
*
(
++
s
)
=
'-'
;
{
s
++
;
mult
=
-
1
;
}
/* get rid of the '$' and commas */
if
(
*
s
==
'$'
)
/* Just in case we exposed one */
s
++
;
for
(
k
=
0
;
*
s
;
s
++
)
for
(
k
=
0
;
*
s
;
s
++
)
if
(
*
s
!=
','
)
if
(
*
s
!=
','
)
cashbuf
[
k
++
]
=
*
s
;
cashbuf
[
k
++
]
=
*
s
;
cashbuf
[
k
]
=
0
;
cashbuf
[
k
]
=
0
;
val
=
PyFloat_FromDouble
(
strtod
(
cashbuf
,
NULL
));
val
=
PyFloat_FromDouble
(
strtod
(
cashbuf
,
NULL
)
*
mult
);
break
;
break
;
}
default:
default:
val
=
PyString_FromString
(
s
);
val
=
PyString_FromString
(
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