aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/preproc/variable.c
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2003-12-17 15:23:45 +0000
committerMichael Meskes <meskes@postgresql.org>2003-12-17 15:23:45 +0000
commit95eea2d89c49fd073ad01407d842c6f8199c74e2 (patch)
treebcb28929ff4a044a6546f74234d50ec4ad47dd14 /src/interfaces/ecpg/preproc/variable.c
parent845109e606557e540d56a43f2da74ab2d43f55bc (diff)
downloadpostgresql-95eea2d89c49fd073ad01407d842c6f8199c74e2.tar.gz
postgresql-95eea2d89c49fd073ad01407d842c6f8199c74e2.zip
- Added just another patch by Dave that fixes a reversed order in
variable listing for output variables in cursor definitions - Fixed incorrect if call in long=>numeric conversion.
Diffstat (limited to 'src/interfaces/ecpg/preproc/variable.c')
-rw-r--r--src/interfaces/ecpg/preproc/variable.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/preproc/variable.c b/src/interfaces/ecpg/preproc/variable.c
index 7a3875832ab..be1cb5f0b74 100644
--- a/src/interfaces/ecpg/preproc/variable.c
+++ b/src/interfaces/ecpg/preproc/variable.c
@@ -299,7 +299,7 @@ remove_variables(int brace_level)
prevvar->next = varptr->next;
}
}
- for (varptr = ptr->argsresult; varptr != NULL; varptr = varptr->next)
+ for (varptr = prevvar = ptr->argsresult; varptr != NULL; varptr = varptr->next)
{
if (p == varptr->variable)
{
@@ -349,7 +349,7 @@ reset_variables(void)
* Note: The list is dumped from the end,
* so we have to add new entries at the beginning */
void
-add_variable(struct arguments ** list, struct variable * var, struct variable * ind)
+add_variable_to_head(struct arguments ** list, struct variable * var, struct variable * ind)
{
struct arguments *p = (struct arguments *) mm_alloc(sizeof(struct arguments));
@@ -361,7 +361,7 @@ add_variable(struct arguments ** list, struct variable * var, struct variable *
/* Append a new variable to our request list. */
void
-append_variable(struct arguments ** list, struct variable * var, struct variable * ind)
+add_variable_to_tail(struct arguments ** list, struct variable * var, struct variable * ind)
{
struct arguments *p,
*new = (struct arguments *) mm_alloc(sizeof(struct arguments));