Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstace committed Mar 29, 2023
1 parent 885d8dc commit e470e4d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion geoscpp/bridge_geos.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "bridge_geos.h"
#include <cstring>

void SF_GEOS_Union(char* gi1, char* gi2, char** gr, char** err) {
void SF_GEOS_Union(unsigned char *gi1, unsigned char *gi2, char **gr, char **err) {
*err = new char[1024];
strcpy(*err, "uh oh, something went wrong!");
}
2 changes: 1 addition & 1 deletion geoscpp/bridge_geos.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
extern "C" {
#endif

void SF_GEOS_Union(char* gi1, char* gi2, char** gr, char** err);
void SF_GEOS_Union(unsigned char *gi1, unsigned char *gi2, char **gr, char **err);

#ifdef __cplusplus
} // extern "C"
Expand Down
4 changes: 2 additions & 2 deletions geoscpp/union.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ func Union(g1, g2 geom.Geometry) (geom.Geometry, error) {
g2WKB := g2.AsBinary()
var outputBuf, errBuf *C.char
C.SF_GEOS_Union(
(*C.char)(&g1WKB[0]),
(*C.char)(&g2WKB[0]),
(*C.uchar)(&g1WKB[0]),
(*C.uchar)(&g2WKB[0]),
&outputBuf,
&errBuf,
)
Expand Down

0 comments on commit e470e4d

Please sign in to comment.