Skip to content

Commit f229b2e

Browse files
authored
spherepoint_hash32: float8 needs wrapping into a Datum (#107)
1 parent 94e498d commit f229b2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/point.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ Datum
315315
spherepoint_hash32(PG_FUNCTION_ARGS)
316316
{
317317
SPoint *p1 = (SPoint *) PG_GETARG_POINTER(0);
318-
Datum h1 = DirectFunctionCall1(hashfloat8, p1->lat);
319-
Datum h2 = DirectFunctionCall1(hashfloat8, p1->lng);
318+
Datum h1 = DirectFunctionCall1(hashfloat8, Float8GetDatum(p1->lat));
319+
Datum h2 = DirectFunctionCall1(hashfloat8, Float8GetDatum(p1->lng));
320320

321321
PG_RETURN_INT32(DatumGetInt32(h1) ^ DatumGetInt32(h2));
322322
}

0 commit comments

Comments
 (0)