Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit847da1a

Browse files
committed
Remove Perl module's unnecessary dependence on libpq-int.h.
1 parent34ecb9d commit847da1a

File tree

1 file changed

+5
-9
lines changed
  • src/interfaces/perl5

1 file changed

+5
-9
lines changed

‎src/interfaces/perl5/Pg.xs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*-------------------------------------------------------
22
*
3-
* $Id: Pg.xs,v 1.10 1998/12/13 02:50:20 momjian Exp $
3+
* $Id: Pg.xs,v 1.11 1999/02/11 23:25:16 tgl Exp $
44
*
55
* Copyright (c) 1997, 1998 Edmund Mergl
66
*
@@ -14,7 +14,6 @@
1414
#include<fcntl.h>
1515

1616
#include"libpq-fe.h"
17-
#include"libpq-int.h"/* need this for sizeof(PGresult) */
1817

1918
typedefstructpg_conn*PG_conn;
2019
typedefstructpg_result*PG_result;
@@ -352,7 +351,7 @@ PQexec(conn, query)
352351
CODE:
353352
RETVAL=PQexec(conn,query);
354353
if (!RETVAL) {
355-
RETVAL=(PGresult*)calloc(1,sizeof(PGresult));
354+
RETVAL=PQmakeEmptyPGresult(conn,PGRES_FATAL_ERROR);
356355
}
357356
OUTPUT:
358357
RETVAL
@@ -384,7 +383,7 @@ PQgetResult(conn)
384383
CODE:
385384
RETVAL=PQgetResult(conn);
386385
if (!RETVAL) {
387-
RETVAL=(PGresult*)calloc(1,sizeof(PGresult));
386+
RETVAL=PQmakeEmptyPGresult(conn,PGRES_FATAL_ERROR);
388387
}
389388
OUTPUT:
390389
RETVAL
@@ -893,7 +892,7 @@ PQexec(conn, query)
893892
if (RETVAL) {
894893
RETVAL->result=PQexec((PGconn*)conn,query);
895894
if (!RETVAL->result) {
896-
RETVAL->result=(PG_result)calloc(1,sizeof(PGresult));
895+
RETVAL->result=PQmakeEmptyPGresult((PGconn*)conn,PGRES_FATAL_ERROR);
897896
}
898897
}
899898
OUTPUT:
@@ -928,7 +927,7 @@ PQgetResult(conn)
928927
if (RETVAL) {
929928
RETVAL->result=PQgetResult((PGconn*)conn);
930929
if (!RETVAL->result) {
931-
RETVAL->result=(PG_result)calloc(1,sizeof(PGresult));
930+
RETVAL->result=PQmakeEmptyPGresult((PGconn*)conn,PGRES_FATAL_ERROR);
932931
}
933932
}
934933
OUTPUT:
@@ -994,9 +993,6 @@ PQmakeEmptyPGresult(conn, status)
994993
RETVAL= (PG_results)calloc(1,sizeof(PGresults));
995994
if (RETVAL) {
996995
RETVAL->result=PQmakeEmptyPGresult((PGconn*)conn,status);
997-
if (!RETVAL->result) {
998-
RETVAL->result= (PG_result)calloc(1,sizeof(PGresult));
999-
}
1000996
}
1001997
OUTPUT:
1002998
RETVAL

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp