Skip to content

Commit 6c42b1a

Browse files
authored
Merge pull request #760 from czj/cleanup/binary-timestamp-ruby-version-guard
Remove the dead ruby < 2.3 check from the binary timestamp decoder
2 parents 2daa7f1 + c02ce5a commit 6c42b1a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎ext/pg_binary_decoder.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*
55
*/
66

7-
#include "ruby/version.h"
87
#include "pg.h"
98
#include "pg_util.h"
109
#ifdef HAVE_INTTYPES_H
@@ -327,7 +326,7 @@ pg_bin_dec_timestamp(t_pg_coder *conv, const char *val, int len, int tuple, int
327326
sec = (timestamp / 1000000) + 10957L * 24L * 3600L;
328327
nsec = (timestamp % 1000000) * 1000;
329328

330-
#if (RUBY_API_VERSION_MAJOR > 2 || (RUBY_API_VERSION_MAJOR == 2 && RUBY_API_VERSION_MINOR >= 3)) && defined(NEGATIVE_TIME_T) && defined(SIZEOF_TIME_T) && SIZEOF_TIME_T >= 8
329+
#if defined(NEGATIVE_TIME_T) && defined(SIZEOF_TIME_T) && SIZEOF_TIME_T >= 8
331330
/* Fast path for time conversion */
332331
{
333332
struct timespec ts = {sec, nsec};

0 commit comments

Comments
 (0)