Skip to content

Commit

Permalink
[c_types][C] fixing include/c_types/transitiveClosure_rt.h
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvergara committed Aug 3, 2021
1 parent 0a40f39 commit 6340861
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions include/c_types/transitiveClosure_rt.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
/**************************************************************************
* return type for contraction
* ***********************************************************************/
typedef struct {
struct TransitiveClosure_rt {
int seq;
int64_t vid;
int64_t *target_array;
int target_array_size;
} transitiveClosure_rt;
};

#endif // INCLUDE_C_TYPES_TRANSITIVECLOSURE_RT_H_
8 changes: 4 additions & 4 deletions include/drivers/transitiveClosure/transitiveClosure_driver.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*PGR-GNU*****************************************************************
File: contractGraph_driver.h
File: transitiveClosure_driver.h
Copyright (c) 2015 pgRouting developers
Mail: project@pgrouting.org
Expand Down Expand Up @@ -37,7 +37,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# include <stddef.h>
#endif

#include "c_types/transitiveClosure_rt.h"
typedef struct TransitiveClosure_rt TransitiveClosure_rt;
typedef struct Edge_t Edge_t;

#ifdef __cplusplus
Expand All @@ -46,13 +46,13 @@ extern "C" {
/*********************************************************
edges_sql TEXT,
********************************************************/
void
do_pgr_transitiveClosure(
Edge_t *data_edges,
size_t total_tuples,
transitiveClosure_rt **return_tuples,
TransitiveClosure_rt **return_tuples,
size_t *return_count,
char **log_msg,
char **notice_msg,
Expand Down
6 changes: 3 additions & 3 deletions src/transitiveClosure/transitiveClosure.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static
void
process(char* edges_sql,

transitiveClosure_rt **result_tuples,
TransitiveClosure_rt **result_tuples,
size_t *result_count) {
pgr_SPI_connect();

Expand Down Expand Up @@ -103,7 +103,7 @@ _pgr_transitiveclosure(PG_FUNCTION_ARGS) {
TupleDesc tuple_desc;

/**********************************************************************/
transitiveClosure_rt *result_tuples = NULL;
TransitiveClosure_rt *result_tuples = NULL;
size_t result_count = 0;
/**********************************************************************/

Expand Down Expand Up @@ -139,7 +139,7 @@ _pgr_transitiveclosure(PG_FUNCTION_ARGS) {

funcctx = SRF_PERCALL_SETUP();
tuple_desc = funcctx->tuple_desc;
result_tuples = (transitiveClosure_rt*) funcctx->user_fctx;
result_tuples = (TransitiveClosure_rt*) funcctx->user_fctx;

if (funcctx->call_cntr < funcctx->max_calls) {
HeapTuple tuple;
Expand Down
6 changes: 4 additions & 2 deletions src/transitiveClosure/transitiveClosure_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#include "cpp_common/basePath_SSEC.hpp"
#include "cpp_common/pgr_base_graph.hpp"

#include "c_types/transitiveClosure_rt.h"



template < class G >
Expand All @@ -51,7 +53,7 @@ template <typename G>
static
void get_postgres_result(
G &graph,
transitiveClosure_rt **return_tuples,
TransitiveClosure_rt **return_tuples,
size_t *count) {
boost::adjacency_list <> TC;
TC = pgr_transitiveClosure(graph);
Expand Down Expand Up @@ -94,7 +96,7 @@ void
do_pgr_transitiveClosure(
Edge_t *data_edges,
size_t total_edges,
transitiveClosure_rt **return_tuples,
TransitiveClosure_rt **return_tuples,
size_t *return_count,
char **log_msg,
char **notice_msg,
Expand Down

0 comments on commit 6340861

Please sign in to comment.